:root {
    --sidebar_width: 280px;
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading .spinner {
    font-size: 2.5rem;
    color: #fff;
}

.sidebar-dark-primary {
    background-color: rgba(68, 77, 88, 1);
}

.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active,
.sidebar-light-primary .nav-sidebar > .nav-item > .nav-link.active {
    background-color: #a7a2a9;
}

.main-sidebar,
.main-sidebar::before {
    width: var(--sidebar_width) !important;
}

.sidebar-collapse .main-sidebar,
.sidebar-collapse .main-sidebar::before {
    margin-left: calc(var(--sidebar_width) * -1);
}

.card-primary:not(.card-outline) > .card-header {
    background-color: #444d58;
}

.card-primary.card-outline {
    border-top: 3px solid #444d58;
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background-color: #444d58;
}

.login-page {
    background-image: url(https://system.mxm.com.my/assets/admin/pages/media/bg/4.jpg);
    background-size: cover;
    background-repeat: no-repeat;
}

.bg-primary {
    background-color: #444d58 !important;
    border-color: #444d58 !important;
}

.bg-success-dark {
    background-color: #2c753d !important;
    border-color: #2c753d !important;
}

.bg-blue {
    background-color: #1a73e8 !important;
    border-color: #1a73e8 !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.show > .btn-outline-primary.dropdown-toggle {
    background-color: #444d58 !important;
    color: #fff !important;
}

.btn.bg-primary:hover {
    background-color: #444d58 !important;
    opacity: 0.8;
}

.page-item.active .page-link {
    background-color: #444d58 !important;
    border-color: #444d58 !important;
}

.level2.menu-open {
    background-color: rgba(255, 255, 255, 0.1);
}

.card-primary.card-outline-tabs > .card-header a.active {
    border-top: none;
}

table.dataTable thead > tr > th.sorting:before,
table.dataTable thead > tr > th.sorting:after,
table.dataTable thead > tr > th.sorting_asc:before,
table.dataTable thead > tr > th.sorting_asc:after,
table.dataTable thead > tr > th.sorting_desc:before,
table.dataTable thead > tr > th.sorting_desc:after,
table.dataTable thead > tr > th.sorting_asc_disabled:before,
table.dataTable thead > tr > th.sorting_asc_disabled:after,
table.dataTable thead > tr > th.sorting_desc_disabled:before,
table.dataTable thead > tr > th.sorting_desc_disabled:after,
table.dataTable thead > tr > td.sorting:before,
table.dataTable thead > tr > td.sorting:after,
table.dataTable thead > tr > td.sorting_asc:before,
table.dataTable thead > tr > td.sorting_asc:after,
table.dataTable thead > tr > td.sorting_desc:before,
table.dataTable thead > tr > td.sorting_desc:after,
table.dataTable thead > tr > td.sorting_asc_disabled:before,
table.dataTable thead > tr > td.sorting_asc_disabled:after,
table.dataTable thead > tr > td.sorting_desc_disabled:before,
table.dataTable thead > tr > td.sorting_desc_disabled:after {
    line-height: 12px;
}

.spinner-wrapper {
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    inset: 0;
    background-color: #fff;
    z-index: 99999;
}

.spinner {
    position: absolute;
    left: 50%;
    top: 50%;
    height: 60px;
    width: 60px;
    margin: 0px auto;
    -webkit-animation: rotation 0.6s infinite linear;
    -moz-animation: rotation 0.6s infinite linear;
    -o-animation: rotation 0.6s infinite linear;
    animation: rotation 0.6s infinite linear;
    border-left: 6px solid rgba(0, 174, 239, 0.15);
    border-right: 6px solid rgba(0, 174, 239, 0.15);
    border-bottom: 6px solid rgba(0, 174, 239, 0.15);
    border-top: 6px solid rgba(0, 174, 239, 0.8);
    border-radius: 100%;
}

@-webkit-keyframes rotation {
    from {
        -webkit-transform: rotate(0deg);
    }
    to {
        -webkit-transform: rotate(359deg);
    }
}
@-moz-keyframes rotation {
    from {
        -moz-transform: rotate(0deg);
    }
    to {
        -moz-transform: rotate(359deg);
    }
}
@-o-keyframes rotation {
    from {
        -o-transform: rotate(0deg);
    }
    to {
        -o-transform: rotate(359deg);
    }
}
@keyframes rotation {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(359deg);
    }
}

.table-label {
    inset: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
}

.info-wrapper {
    max-width: 220px;
    min-width: 180px;
    width: 20%;
}

[class*="bg-"].disabled,
.info-box:not(.disabled):hover,
.info-box.active {
    opacity: 0.65;
}

.info-box.disabled:hover {
    opacity: 0.8 !important;
}

.nav-item.menu-is-opening.menu-open > a.nav-link {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Font Weight */
.font-weight-semibold {
    font-weight: 600;
}

.font-weight-medium {
    font-weight: 500;
}

/* Custom Table Theme Color */
.table-info-dark {
    --bs-table-color: #fff;
    --bs-table-bg: #17a2b8;
    --bs-table-border-color: #a6c3ca;
    --bs-table-striped-bg: #c5e8ef;
    --bs-table-striped-color: #000000;
    --bs-table-active-bg: #17a2b8;
    --bs-table-active-color: #000;
    --bs-table-hover-bg: #17a2b8;
    --bs-table-hover-color: #fff;
    color: var(--bs-table-color);
    border-color: var(--bs-table-border-color);
}

.btn-outline-purple {
    color: #4b0983;
    border-color: #4b0983;
    --bs-btn-color: #4b0983;
    --bs-btn-border-color: #4b0983;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #4b0983;
    --bs-btn-hover-border-color: #4b0983;
    --bs-btn-focus-shadow-rgb: 25, 135, 84;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #4b0983;
    --bs-btn-active-border-color: #4b0983;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #4b0983;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: #4b0983;
    --bs-gradient: none;
}

.btn-outline-primary {
    border-color: #444d58;
    color: #444d58;
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: #444d58;
    border-color: #444d58;
}

.btn-outline-primary:not(:disabled):not(.disabled).active,
.btn-outline-primary:not(:disabled):not(.disabled):active,
.show > .btn-outline-primary.dropdown-toggle {
    color: #fff;
    background-color: #444d58;
    border-color: #444d58;
}

.btn-outline-primary {
    --bs-btn-color: #444d58;
    --bs-btn-border-color: #444d58;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #444d58;
    --bs-btn-hover-border-color: #444d58;
    --bs-btn-focus-shadow-rgb: 13, 110, 253;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #444d58;
    --bs-btn-active-border-color: #444d58;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #444d58;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: #444d58;
    --bs-gradient: none;
}

.dropdown-item.active,
.dropdown-item:active {
    color: #212529;
    text-decoration: none;
    background-color: rgba(0, 0, 0, 0.1);
}

.bg-primary.btn.active,
.bg-primary.btn:active,
.bg-primary.btn:not(:disabled):not(.disabled).active,
.bg-primary.btn:not(:disabled):not(.disabled):active {
    background-color: #444d58 !important;
    border-color: #444d58;
    color: #fff;
}

a.bg-primary:focus,
a.bg-primary:hover,
button.bg-primary:focus,
button.bg-primary:hover {
    background-color: #444d58 !important;
}

/* Media Query */
@media (min-width: 768px) {
    body:not(.sidebar-mini-md):not(.sidebar-mini-xs):not(.layout-top-nav)
        .content-wrapper,
    body:not(.sidebar-mini-md):not(.sidebar-mini-xs):not(.layout-top-nav)
        .main-footer,
    body:not(.sidebar-mini-md):not(.sidebar-mini-xs):not(.layout-top-nav)
        .main-header {
        margin-left: var(--sidebar_width);
    }
}

/* Log Body */
.log-body {
    background: #ffffff;
    height: auto;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    max-height: 800px;
    gap: 10px;
}
/* Chat UI */
/* Chat Container */
.chat-container {
    background: #f5f5f5;
    border-radius: 0.25rem;
    width: 100%;
}

/* Chat Header */
.chat-header {
    background: #4b0983;
    color: #ffffff;
    padding: 0.75rem 1.25rem;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    border-radius: 0.25rem 0.25rem 0 0 !important;
    position: relative;
}

/* Chat Body */
.chat-body {
    position: relative;
    background: #ffffff;
    height: 72vh;
    overflow-y: auto;
    padding: 15px 30px;
    display: flex;
    flex-direction: column;
    min-height: 500px;
    max-height: 800px;
    gap: 10px;
}

/* User Messages */
.message {
    margin-bottom: 15px;
    display: flex;
}

.message .bubble {
    max-width: 70%;
    padding: 20px 25px;
    border-radius: 20px;
    background-color: #dbc9eb;
}

.message.sent .bubble {
    background: #4b0983;
    color: #ffffff;
    border-radius: 10px;
    align-self: flex-end;
}

/* Agent/Company Messages */
.message.received .bubble {
    background: #d9c2f0;
    color: #222222;
    border-radius: 10px;
    align-self: flex-start;
}

.message.sent {
    justify-content: flex-end;
}
.message.received {
    justify-content: flex-start;
}

.message-time {
    text-align: right;
    margin-top: 0.5rem;
}

/* Input Field */
.input-container {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-top: 2px solid #4b0983;
    padding: 0.75rem 1.25rem;
    border-radius: 0 0 0.25rem 0.25rem;
}

.input-container input {
    flex: 1;
    border: none;
    padding: 10px;
    font-size: 16px;
    color: #222222;
}

.input-container input:focus {
    outline: none;
}

input:has(+ span.is-invalid) {
    border-color: #dc3545;
}

/* Send Button */
.input-container button {
    background: #4b0983;
    color: #ffffff;
    border: none;
    padding: 10px 15px;
    margin-left: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.date-separator {
    text-align: center;
    font-weight: bold;
    margin: 15px 0;
    padding: 5px 20px;
    background: #e0e0e0;
    border-radius: 0.75rem;
    display: inline-block;
    width: auto;
}

.date-seperator-wrapper {
    display: none; /* Hide if no next element */
    justify-content: center;
}

.date-seperator-wrapper:has(+ *) {
    display: flex; /* Show if next element exists */
}

.floating-date-header {
    position: sticky;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    text-align: center;
    font-weight: bold;
    margin: 15px 0;
    padding: 5px 20px;
    background: #e0e0e0;
    color: #000;
    border-radius: 0.75rem;
    font-size: 1rem;
    width: fit-content;
    transition: opacity 0.3s ease-in-out;
    opacity: 0; /* Start hidden */
    will-change: opacity;
}

.messageing-format {
    white-space: pre-line;
    color: white;
    padding: 0;
    margin: 0;
    font-size: 1rem;
    font-family: inherit;
}

/* eSurvey style */
.donutChatWrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.npsBreakdown {
    flex-direction: column;
}

.donutChatWrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.npsBreakdownWrap {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: flex-start;
    flex-direction: row;
}

.npsDescPoint {
    display: flex;
    align-items: center;
    gap: 5px;
}

.npsDescbadge .badge {
    min-width: 5rem;
    padding: 4px 5px;
}

.bg-success {
    background-color: #08ac75 !important;
}

.bg-secondary {
    background-color: #888b8a !important;
}

.bg-danger {
    background-color: #dd111b !important;
}

.reportTable1 thead tr th {
    text-align: center;
}

.headerNpsDesc {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.headerNpsDesc span {
    border-radius: 0;
    padding: 5px 6px;
    min-width: 5rem;
    font-size: 11px;
}

.headerNpsDesc > div {
    font-size: 12px;
}

.responseNpsReport .card-body > div > p {
    margin: 0;
}

.responseNpsReport .card-body > div > table {
    margin-top: 1rem;
}

.responseNpsReport .card-body > div > h4 > small {
    font-size: 16px;
}

.responseNpsReport table {
    max-width: 35rem;
}

.datePickerWrap {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.datePickerWrap form {
    display: flex !important;
    align-items: center;
    flex-direction: row;
}

.responseNpsReport .card-body {
    max-height: 76rem;
    overflow: hidden;
    overflow-y: scroll;
}

.questionNpsReport .card-body {
    max-height: 53rem;
    overflow: hidden;
    overflow-y: scroll;
}

.responderBtnWrap {
    margin-top: 15px;
}

/* .nav-sidebar ul.nav.nav-treeview > .nav-item {
    margin-left: 20px;
} */

.nav-sidebar a.nav-link {
    display: flex;
    flex-direction: row;
    gap: 5px;
    align-items: center;
}

span.metaPointDetails {
    font-style: italic;
    color: #e600ff;
    font-size: 13px;
}

.form-select {
    background-color: #ffffff;
}

.content-wrapper {
    height: auto !important;
}

.responseNpsReport_feedbackText .textBoxAnswer {
    padding: 0.5em 0.5em;
    box-shadow: 2px 2px 10px hwb(0deg 0% 100% / 20%);
    border-radius: 5px;
}

.responseNpsReport_feedbackText .textBoxAnswer p {
    margin: 0;
}

.responseNpsReport_feedbackText h4 {
    margin: 0;
}

.responseNpsReport_feedbackText .card-body {
    min-height: 100%;
    height: 25rem;
    overflow: hidden;
    overflow-y: scroll;
}

.textboxRespond .textQuestion {
    font-size: 18px;
    font-weight: 500;
}

.textboxRespond .textAnswer {
    background: #ebedef;
    padding: 1em 0.5em;
    max-width: 35rem;
    border: 1px solid #00000038;
    border-radius: 10px;
    margin-top: 10px;
}

.textboxRespond ol {
    list-style: decimal !important;
    padding: 0 12px !important;
}

.textboxRespond li:not(:last-child) {
    margin-bottom: 30px;
}

hr.section-divider {
    margin: 1rem 0;
    border: 1px solid #000;
}

.loader-text {
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    color: #00adee;
    border: 2px solid #00adee;
    border-radius: 6px;
    padding: 6px 10px;
    gap: 8px;
}

/* animated dots after text */
.loader-text .dots::after {
    content: "";
    display: inline-block;
    width: 0.8em;
    text-align: left;
    animation: dots 1s steps(3, end) infinite;
}

@keyframes dots {
    0%,
    20% {
        content: "";
    }
    40% {
        content: ".";
    }
    60% {
        content: "..";
    }
    80%,
    100% {
        content: "...";
    }
}

/* Switch Checkbox */
/* Card Base Styling */
.status-card {
    --active-color: #3bb28c;
    --inactive-color: #ef4444;
    background-color: var(--inactive-color);
    color: white;
    border-radius: 16px;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.4s ease;
    cursor: pointer;
    width: 80px;
}

.status-card:has(.status-checkbox:checked) {
    background-color: var(--active-color);
}

/* Switch Styles */
.toggle-wrapper {
    position: relative;
    width: 70px;
    height: 26px;
    margin-bottom: 0;
}
.status-checkbox {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: 0.4s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "✕";
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--inactive-color);
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}
.status-checkbox:checked + .slider:before {
    transform: translateX(45px);
    content: "✓";
    color: var(--active-color);
}

.fs-xs {
    font-size: 0.75rem;
}

.fs-sm {
    font-size: 0.875rem;
}

.fw-700 {
    font-weight: 700;
}

.cursor-pointer {
    cursor:pointer;
}

/* When the button is open (NOT collapsed), rotate the icon */
[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

/* Add a smooth transition so it doesn't just snap */
.fa-chevron-down {
    transition: transform 0.2s ease-in-out;
}
/* Payment Token Style
--------------------- */
.paymentToken_index .card-header .input-icon {
    position: relative;
    display: flex;
    gap: 15px;
}
