/* Universal CSS start */
* {
    margin: 0;
    padding: 0;
    outline: 0;
    font: sans-serif;
    scrollbar-color: var(--scrollbar-thumb);
    scrollbar-width: thin;
    --scrollbar-thumb: #aaaaaa;
    --thumb-hover: var(--theme-color);
}

select,
select:focus,
textarea,
textarea:focus,
input,
input:focus {
    font-size: 18px;
}

#body-main>.left-side-menu,
#body-main>.right-side-container {
    transition: .4s;
    -webkit-transition: .4s;
    -moz-transition: .4s;
    -ms-transition: .4s;
    -o-transition: .4s;
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

#search_results td {
    text-align: center;
    vertical-align: middle;
}

:root {
    --primary: #FFF;
    --secondary: #3b3b3b;
    --third: #7a7a7a;
    --fourth: #ececec;
    --body-bg: #FAFAFB;
    --theme-color: #FFF;
    --theme-color-rgb: 255, 255, 255;

    --folderColor: #ffc107;
    --pdfColor: #de4436;
    --wroddocColor: #3f87f5;
    --powerpointpptColor: #886cff;
    --excelxlsColor: #00c9a7;

    --disabled-btn: #aaaaaa;

    --scrollbar-thumb: #aaaaaa;
    --thumb-hover: #7a7a7a;
    --scrollbar-primary: #FFF;

    --border-primary: #F4F8FD;
    --border-secondary: #3b3b3b;
    --border-third: #7a7a7a;
    --border-fourth: #ececec;
    --border-theme-color: #FFF;

    --text-primary: #FFF;
    --text-secondary: #3b3b3b;
    --text-third: #7a7a7a;
    --text-theme-color: #FFF;

    --body-flex-direction: row;
    --function-button-justify: flex-end;

    --place-holder-color: #7a7a7a;

    --paragraph-text: #3b3b3b !important;

    --theme-primary: #0970e6;
    --theme-primary-rgb: 9, 112, 230;
    /* Added RGB values for transparency effects */
    --theme-primary-focus: #0053b3;
    --theme-primary-light: #edf5ff;
    --theme-primary-light-rgb: 237, 245, 255;
    /* Added RGB values for transparency effects */
    --theme-secondary: #727cf5;
    --theme-secondary-rgb: 114, 124, 245;
    /* Added RGB values for transparency effects */
    --theme-secondary-focus: #5157bd;
    --theme-font: #3b4863;
    --theme-gray-100: #f9f9f9;
    --theme-gray-200: #f1f1f1;
    --theme-gray-300: #e1e1e1;
    --theme-gray-400: #c4c4c4;
    --theme-gray-400-rgb: 196, 196, 196;
    /* Added RGB values for transparency effects */
    --theme-gray-500: #9f9f9f;
    --theme-gray-500-rgb: 159, 159, 159;
    /* Added RGB values for transparency effects */
    --theme-gray-600: #7b7b7b;
    --theme-white: #ffffff;
    --theme-white-rgb: 255, 255, 255;
    /* Added RGB values for transparency effects */
    --theme-black: #000000;
    --theme-black-rgb: 0, 0, 0;
    /* Added RGB values for transparency effects */
    --theme-padding: 15px;
    --theme-border-radius: 6px;
    --theme-box-shadow: rgba(0, 0, 0, 0.15) 0px 5px 15px 0px;
    --theme-secondary-font: #6e7891;
    --theme-background: #fafbff;
    --doc-popup-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.darkmode {
    --primary: #111727;
    --fourth: #1a2135;
    --body-bg: #202938;
    --theme-color: #111727;
    --theme-color-rgb: 17, 23, 39;

    --border-primary: #1a2135 !important;
    --border-fourth: #1a2135;
    --border-third: #1a2135;
    --border-theme-color: #111727;

    --text-secondary: rgb(231, 231, 231);
    --text-third: #d1d1d1;
    --text-theme-color: #111727;

    --disabled-btn: #1a2135;

    --paragraph-text: #FFF !important;
    --doc-popup-shadow: 0 22px 44px rgba(0, 0, 0, 0.45);
}

.blue {
    --theme-color: #0361FF;
    --theme-color-rgb: 3, 97, 255;
    --border-theme-color: #0361FF;
    --text-theme-color: #0361FF;
    --text-secondary: #0361FF;
}

.orchid {
    --theme-color: #DC6ACF;
    --theme-color-rgb: 220, 106, 207;
    --border-theme-color: #DC6ACF;
    --text-theme-color: #DC6ACF;
    --text-secondary: #DC6ACF;
    --border-primary: #fff6fe;
}

.amber {
    --theme-color: #FF7D00;
    --theme-color-rgb: 255, 125, 0;
    --border-theme-color: #FF7D00;
    --text-theme-color: #FF7D00;
    --text-secondary: #FF7D00;
    --border-primary: #fff7f0;
}

.red {
    --theme-color: #D90429;
    --theme-color-rgb: 217, 4, 41;
    --border-theme-color: #D90429;
    --text-theme-color: #D90429;
    --text-secondary: #D90429;
    --border-primary: #fff0f2;
}

.hunter-green {
    --theme-color: #3A5A40;
    --theme-color-rgb: 58, 90, 64;
    --border-theme-color: #3A5A40;
    --text-theme-color: #3A5A40;
    --text-secondary: #3A5A40;
    --border-primary: #f7fff8;
}

.taupe-gray {
    --theme-color: #948B89;
    --theme-color-rgb: 148, 139, 137;
    --border-theme-color: #948B89;
    --text-theme-color: #948B89;
    --text-secondary: #948B89;
    --border-primary: #fff6f5;
}

.space-cadet {
    --theme-color: #2A324B;
    --theme-color-rgb: 42, 50, 75;
    --border-theme-color: #2A324B;
    --text-theme-color: #2A324B;
    --text-secondary: #2A324B;
    --border-primary: #ebf0ff;
}

.oxford-blue {
    --theme-color: #04052E;
    --theme-color-rgb: 4, 5, 46;
    --border-theme-color: #04052E;
    --text-theme-color: #04052E;
    --text-secondary: #04052E;
    --border-primary: #f6f6ff;
}

.mezenta {
    --primary: #7B4FFF;
    --fourth: #875fff;
    --body-bg: #8860ff;
    --theme-color: #FFF;
    --theme-color-rgb: 255, 255, 255;

    --border-primary: #8860ff !important;
    --border-fourth: #8860ff;
    --border-third: #8860ff;
    --border-theme-color: #8860ff;

    --folderColor: #FFF;
    --pdfColor: #FFF;
    --wroddocColor: #FFF;
    --powerpointpptColor: #FFF;
    --excelxlsColor: #FFF;

    --text-primary: #7B4FFF;
    --text-secondary: #FFF;
    --text-third: #d1d1d1;
    --text-theme-color: #FFF;

    --disabled-btn: #9b7aff;

    --place-holder-color: #d2c3ff;

    --paragraph-text: #FFF !important;
}

.purple {
    --primary: #2b1e29;
    --fourth: #31222f;
    --body-bg: #291b27;
    --theme-color: #f65751;
    --theme-color-rgb: 246, 87, 81;

    --border-primary: #362834 !important;
    --border-fourth: #382836;
    --border-third: #3f2c3c;
    --border-theme-color: #f65751;

    --folderColor: #f65751;
    --pdfColor: #f65751;
    --wroddocColor: #f65751;
    --powerpointpptColor: #f65751;
    --excelxlsColor: #f65751;

    --text-primary: #291b27;
    --text-secondary: #f65751;
    --text-third: #92728d;
    --text-theme-color: #f65751;

    --disabled-btn: #4e3e4c;

    --place-holder-color: #4e3e4c;

    --paragraph-text: #FFF !important;
}

.dark-greeny {
    --primary: #5a685c;
    --fourth: #657267;
    --body-bg: #4a594a;
    --theme-color: #dbfadc;
    --theme-color-rgb: 219, 220, 220;
    --border-primary: #657267 !important;
    --border-fourth: #657267;
    --border-third: #657267;
    --border-theme-color: #dbfadc;

    --folderColor: #dbfadc;
    --pdfColor: #dbfadc;
    --wroddocColor: #dbfadc;
    --powerpointpptColor: #dbfadc;
    --excelxlsColor: #dbfadc;

    --text-primary: #4a594a;
    --text-secondary: #dbfadc;
    --text-third: #8fac8f;
    --text-theme-color: #dbfadc;

    --disabled-btn: #657267;

    --place-holder-color: #819981;

    --paragraph-text: #FFF !important;
}

.light-greeny {
    --primary: #1d2527;
    --fourth: #212b28;
    --body-bg: #2a3633;
    --theme-color: #aadf39;
    --theme-color-rgb: 170, 223, 57;

    --border-primary: #2a3633 !important;
    --border-fourth: #212b28;
    --border-third: #212b28;
    --border-theme-color: #d9fe8d;

    --folderColor: #aadf39;
    --pdfColor: #aadf39;
    --wroddocColor: #aadf39;
    --powerpointpptColor: #aadf39;
    --excelxlsColor: #aadf39;

    --text-primary: #202020;
    --text-secondary: #FFF;
    --text-third: #d4d4d4;
    --text-theme-color: #aadf39;

    --disabled-btn: #43534f;

    --place-holder-color: #43534f;
    --paragraph-text: #FFF !important;
}

.red-dark {
    --primary: #191919;
    --fourth: #242424;
    --body-bg: #141414;
    --theme-color: #E50914;
    --theme-color-rgb: 229, 9, 20;

    --border-primary: #242424 !important;
    --border-fourth: #242424;
    --border-third: #242424;
    --border-theme-color: #E50914;

    --folderColor: #E50914;
    --pdfColor: #E50914;
    --wroddocColor: #E50914;
    --powerpointpptColor: #E50914;
    --excelxlsColor: #E50914;

    --text-primary: #FFF;
    --text-secondary: #FFF;
    --text-third: #d4d4d4;
    --text-theme-color: #E50914;

    --disabled-btn: #303030;

    --place-holder-color: #303030;
    --paragraph-text: #FFF !important;
}

.blue-green-gradient {
    --primary: #121926;
    --fourth: #242424;
    --body-bg: #1d2b43;
    --theme-color: linear-gradient(90deg, rgba(4, 179, 252, 1) 12%, rgba(93, 197, 176, 1) 68%);
    --theme-color-rgb: 4, 179, 252;

    --border-primary: #1a2335 !important;
    --border-fourth: #161e2e;
    --border-third: #161e2e;
    --border-theme-color: #04b3fc;

    --folderColor: #04b3fc;
    --pdfColor: #04b3fc;
    --wroddocColor: #04b3fc;
    --powerpointpptColor: #04b3fc;
    --excelxlsColor: #04b3fc;

    --text-primary: #2252ac;
    --text-secondary: #04b3fc;
    --text-third: #747a86;
    --text-theme-color: #04b3fc;

    --disabled-btn: #747a86;

    --place-holder-color: #747a86;
    --paragraph-text: #FFF !important;
}

.pink-purple-gradient {
    --primary: #15141a;
    --fourth: #242424;
    --body-bg: #1b1c20;
    --theme-color: linear-gradient(90deg, rgba(167, 7, 105, 1) 12%, rgba(96, 31, 123, 1) 68%);
    --theme-color-rgb: 167, 7, 105;

    --border-primary: #1a1920 !important;
    --border-fourth: #1a1920;
    --border-third: #1a1920;
    --border-theme-color: #a70769;

    --folderColor: #a70769;
    --pdfColor: #a70769;
    --wroddocColor: #a70769;
    --powerpointpptColor: #a70769;
    --excelxlsColor: #a70769;

    --text-primary: #FFF;
    --text-secondary: #FFF;
    --text-third: #3a3c42;
    --text-theme-color: #a70769;

    --disabled-btn: #3a3c42;

    --place-holder-color: #3a3c42;
    --paragraph-text: #FFF !important;
}

.rtl {
    --body-flex-direction: row-reverse;
    --function-button-justify: flex-start;
}

body {
    background: var(--body-bg);
}

::placeholder {
    color: var(--place-holder-color);
}

::-webkit-scrollbar {
    width: 7px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--thumb-hover);
}

/* Universal CSS end */
/* Nav CSS start */

#navbar {
    padding: 1px 1px;
    background: var(--primary);
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-primary);
}

.logo {
    font: 700 30px/30px 'Poppins';
    color: var(--text-secondary);
    transition: .4s;
    -webkit-transition: .4s;
    -moz-transition: .4s;
    -ms-transition: .4s;
    -o-transition: .4s;
}

.logo:hover {
    color: var(--text-theme-color) !important;
}

#navbar .settings-button {
    font-size: 24px;
    color: var(--text-third);
    transition: .4s;
    border: none;
    background: none;
    -webkit-transition: .4s;
    -moz-transition: .4s;
    -ms-transition: .4s;
    -o-transition: .4s;
}

#navbar .fullscreen-button {
    font-size: 20px;
    color: var(--text-third);
    transition: .4s;
    border: none;
    background: none;
    -webkit-transition: .4s;
    -moz-transition: .4s;
    -ms-transition: .4s;
    -o-transition: .4s;
}

#navbar .nav-toggler-main {
    display: none;
}

#navbar .nav-toggler {
    font-size: 26px;
    font-weight: 900;
    fill: var(--theme-color);
    transition: .4s;
    border: none;
    background: none;
    -webkit-transition: .4s;
    -moz-transition: .4s;
    -ms-transition: .4s;
    -o-transition: .4s;
}

#navbar .settings-button {
    position: relative;
}

#navbar .settings-button:hover {
    color: var(--text-theme-color)
}

/* Sync notification indicator */
.sync-notification-indicator {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--theme-color), rgba(var(--theme-color-rgb), 0.8));
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
    box-shadow: 0 2px 8px rgba(var(--theme-color-rgb), 0.4);
    animation: syncNotificationPulse 2s ease-in-out infinite;
    z-index: 10;
    transition: all 0.3s ease;
}

.sync-notification-indicator.hidden {
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
}

/* Responsive version for mobile/smaller buttons */
.sync-notification-responsive {
    top: -6px;
    right: -6px;
    width: 16px;
    height: 16px;
    font-size: 8px;
}

/* Pulsing animation */
@keyframes syncNotificationPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(var(--theme-color-rgb), 0.4);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 4px 15px rgba(var(--theme-color-rgb), 0.6);
    }
}

/* Make settings buttons relative positioned for indicator */
.settings-button-responsive {
    position: relative;
}

/* Dark mode adjustments */
.darkmode .sync-notification-indicator {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(var(--theme-color-rgb), 0.5);
}

.darkmode .sync-notification-indicator:hover {
    box-shadow: 0 4px 15px rgba(var(--theme-color-rgb), 0.7);
}

#navbar .fullscreen-button:hover {
    color: var(--text-theme-color)
}

.dropdown-menu {
    padding: 15px 12px 15px 12px;
    border-radius: 5px;
    margin-top: 5px !important;
    border: 1px solid var(--border-fourth);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.09);
    background: var(--primary);
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -ms-border-radius: 5px;
    -o-border-radius: 5px;
    z-index: 10001;
}

.dropdown-menu a {
    font: 400 16px/16px 'Poppins';
    padding: 10px 25px 10px 10px;
    display: inline-block;
    min-width: 200px;
    color: var(--text-secondary) !important;
    box-shadow: none !important;
    transition: .4s;
    border: none !important;
    display: inline-block !important;
    margin-bottom: 0 !important;
    border-radius: 4px;
    -webkit-transition: .4s;
    -moz-transition: .4s;
    -ms-transition: .4s;
    -o-transition: .4s;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    -ms-border-radius: 4px;
    -o-border-radius: 4px;
}

.dropdown-menu a:hover {
    background: var(--border-primary) !important;
    color: var(--text-theme-color) !important;
}

#navbar .profile-button {
    border: none;
    background: none;
    border-radius: 50%;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    -ms-border-radius: 50%;
    -o-border-radius: 50%;
}

#navbar .profile-button img,
#navbar .profile-image img {
    width: 40px;
    height: 40px;
    overflow: hidden;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-primary);
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    -ms-border-radius: 50%;
    -o-border-radius: 50%;
}

#navbar .profile-image img {
    width: 50px;
    height: 50px;
}

#navbar .profile-info {
    border-bottom: 1px solid var(--fourth);
    margin-bottom: 4px;
}

#navbar .profile-info h4 {
    font: 600 20px/22px 'Poppins';
    color: var(--text-secondary);
    margin-bottom: 0;
    padding-bottom: 0;
    margin-top: 5px;
}

#navbar .profile-info p {
    font: 400 14px/16px 'Poppins';
    color: var(--text-third);
    padding-bottom: 0;
    margin-bottom: 10px;
}

/* Nav CSS end */
/* Custom theme bar CSS start */

.theme-bar-wrap {
    padding-left: 3%;
}

.custom-theme-bar {
    width: 300px;
    position: fixed;
    z-index: 999910;
    right: 0;
    background: var(--primary);
    border-left: 1px solid var(--border-primary);
    box-shadow: 0 7px 10px rgba(0, 0, 0, 0.09);
    overflow-y: scroll;
}

.custom-theme-bar .theme-bar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-primary);
}

.custom-theme-bar .theme-bar-head .title {
    font: 600 18px/18px 'Poppins';
    color: var(--text-secondary);
    margin-right: 10px;
}

.custom-theme-bar .inner-title {
    font: 600 18px/18px 'Poppins';
    color: var(--text-secondary);
    text-align: center;
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-theme-bar .inner-title .anticon-question-circle-o {
    font-size: 16px;
    color: var(--text-theme-color);
    cursor: help;
    transition: opacity 0.2s ease;
}

.custom-theme-bar .inner-title .anticon-question-circle-o:hover {
    opacity: 0.8;
}

.custom-theme-bar .theme-bar-head .close-btn {
    background: none;
    border: none;
    outline: none;
    font-size: 20px;
    line-height: 20px;
    color: var(--text-theme-color);
}

.theme-bar-content {
    padding: 0 20px 20px 20px;
}

.dark-mode-toogle {
    display: flex;
    width: 100%;
    justify-content: flex-end;
    padding-top: 25px;
    padding-right: 20px;
}

.dark-mode-btn {
    width: 90px;
    display: flex;
    font: 500 12px/12px 'Poppins';
    text-align: center;
    height: 40px;
    position: relative;
    background: var(--border-primary);
    border-radius: 5px;
    cursor: pointer;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -ms-border-radius: 5px;
    -o-border-radius: 5px;
}


.dark-mode-btn .toggler svg {
    display: inline-block;
}

.dark-mode-btn .light {
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    fill: var(--theme-color);
}

.dark-mode-btn .dark {
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    fill: var(--theme-color);
}

.dark-mode-btn .toggler {
    position: absolute;
    top: 0;
    right: 50%;
    width: 50%;
    height: 100%;
    background: var(--theme-color);
    border-radius: 5px;
    fill: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .4s;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -ms-border-radius: 5px;
    -o-border-radius: 5px;
    -webkit-transition: .4s;
    -moz-transition: .4s;
    -ms-transition: .4s;
    -o-transition: .4s;
}

.dark-mode-btn .toggler-wrap {
    width: 21px;
    height: 21px;
    overflow: hidden;
    border-radius: 50%;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    -ms-border-radius: 50%;
    -o-border-radius: 50%;
}

.dark-mode-btn .toggler-wrap #toggler-sun {
    margin-top: 0px;
    margin-bottom: 10px;
    transition: .4s;
    -webkit-transition: .4s;
    -moz-transition: .4s;
    -ms-transition: .4s;
    -o-transition: .4s;
}

.dark-mode-btn .toggler-wrap #toggler-moon {
    margin-top: 0px;
    transition: .4s;
    -webkit-transition: .4s;
    -moz-transition: .4s;
    -ms-transition: .4s;
    -o-transition: .4s;
}

.dark-mode-btn.darkmode-active .toggler {
    right: 0;
    left: auto;
}

.dark-mode-btn.darkmode-active .toggler-wrap #toggler-sun {
    margin-top: -30px;
}

.dark-mode-btn.darkmode-active .toggler-wrap #toggler-moon {
    margin-top: -16px;
}

.theme-bar-content .type-item {
    border-bottom: 1px solid var(--border-primary);
    padding-bottom: 20px;
    padding-top: 20px;
}

.theme-bar-content .item-head {
    font: 600 15px/15px 'Poppins';
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.layout-btn,
.theme-btn {
    padding: 7px;
    border: 1px solid var(--border-fourth);
    display: inline-block;
    border-radius: 5px;
    width: 100px;
    margin-right: 10px;
    background: var(--primary);
    transition: .4s;
    transition-property: box-shadow;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -ms-border-radius: 5px;
    -o-border-radius: 5px;
    -webkit-transition: .4s;
    -moz-transition: .4s;
    -ms-transition: .4s;
    -o-transition: .4s;
}

.layout-btn.active {
    box-shadow: 0 0 10px rgba(0, 0, 0, .1);
    border: 1px solid var(--border-theme-color);
}

.layout-btn .topbar {
    width: 100%;
    background: var(--fourth);
    padding: 4px;
    display: flex;
    justify-content: flex-start;
    border-radius: 2px;
    -webkit-border-radius: 2px;
    -moz-border-radius: 2px;
    -ms-border-radius: 2px;
    -o-border-radius: 2px;
}

.layout-btn .topbar span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    margin-right: 2px;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    -ms-border-radius: 50%;
    -o-border-radius: 50%;
}

.layout-btn .topbar .green {
    background: #1b4c43;
}

.layout-btn .topbar .yellow {
    background: #ffc107;
}

.layout-btn .topbar .red {
    background: #de4436;
}

.layout-btn .layout-content {
    display: flex;
}

.layout-btn .sidebar {
    width: 30%;
    height: 40px;
    display: inline-block;
    background: var(--fourth);
    margin-top: 5px;
    border-radius: 2px;
    -webkit-border-radius: 2px;
    -moz-border-radius: 2px;
    -ms-border-radius: 2px;
    -o-border-radius: 2px;
}

.layout-btn .gap {
    width: 5%;
    height: 40px;
    display: inline-block;
    background: var(--primary);
    margin-top: 5px;
}

.layout-btn .body {
    width: 65%;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--fourth);
    font: 500 14px/14px 'Poppins';
    color: var(--text-third);
    margin-top: 5px;
    border-radius: 2px;
    -webkit-border-radius: 2px;
    -moz-border-radius: 2px;
    -ms-border-radius: 2px;
    -o-border-radius: 2px;
}

.themes-color .theme-btn {
    width: 25px;
    height: 25px;
    padding: 2px;
    margin-right: 2px;
}

.themes-color .theme-btn span {
    width: 100%;
    height: 100%;
    border-radius: 3px;
    display: block;
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    -ms-border-radius: 3px;
    -o-border-radius: 3px;
}

.themes-color button[data-theme="blue"] span {
    background: #0361FF;
}

.themes-color button[data-theme="orchid"] span {
    background: #DC6ACF;
}

.themes-color button[data-theme="amber"] span {
    background: #FF7D00;
}

.themes-color button[data-theme="red"] span {
    background: #D90429;
}

.themes-color button[data-theme="hunter-green"] span {
    background: #3A5A40;
}

.themes-color button[data-theme="taupe-gray"] span {
    background: #948B89;
}

.themes-color button[data-theme="space-cadet"] span {
    background: #2A324B;
}

.themes-color button[data-theme="oxford-blue"] span {
    background: #04052E;
}

.themes-color button[data-theme="mezenta"] span {
    background: #7B4FFF;
}

.themes-color button[data-theme="purple"] span {
    background: #241722;
}

.themes-color button[data-theme="dark-greeny"] span {
    background: #4a594a;
}

.themes-color button[data-theme="light-greeny"] span {
    background: #aadf39;
}

.themes-color button[data-theme="red-dark"] span {
    background: #E50914;
}

.themes-color button[data-theme="blue-green-gradient"] span {
    background: linear-gradient(90deg, rgba(4, 179, 252, 1) 12%, rgba(93, 197, 176, 1) 68%);
}

.themes-color button[data-theme="pink-purple-gradient"] span {
    background: linear-gradient(90deg, rgba(167, 7, 105, 1) 12%, rgba(96, 31, 123, 1) 68%);
}

.themes-color .theme-btn.active {
    box-shadow: 0 0 10px rgba(0, 0, 0, .1);
    border: 1px solid var(--border-theme-color);
}

.themes-color .theme-btn.theme.active span {
    box-shadow: 0 0 5px rgba(0, 0, 0, .5);
}

/* Custom theme bar CSS end */
/* Body CSS start */

/* Left side menu CSS end */

#body-main {
    height: calc(100vh - 81px);
    overflow-y: hidden;
    padding-top: 15px;
    flex-direction: var(--body-flex-direction);
}

.left-side-menu {
    width: 400px;
    height: 100%;
    overflow-x: hidden;
    z-index: 10000;
}

.left-side-menu-wrap {
    width: 400px;
    height: auto;
    padding: 0 3px 15px 12px;
    overflow-y: auto;
}

.rtl .left-side-menu-wrap {
    padding: 0 12px 15px 0px;
}

.function-button {
    display: flex;
    justify-content: var(--function-button-justify);
    align-items: center;
}

.navigation-button {
    display: flex;
    justify-content: flex-end;

}

.close-button {
    display: none;
}

.close-button .close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid var(--theme-color);
    color: var(--text-primary);
    margin-bottom: 12px;
    transition: .4s;
    background: var(--theme-color);
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    -ms-border-radius: 50%;
    -o-border-radius: 50%;
    -webkit-transition: .4s;
    -moz-transition: .4s;
    -ms-transition: .4s;
    -o-transition: .4s;
}

.close-button .close:hover {
    background: var(--primary);
    color: var(--text-theme-color);
}

.navigation-button button,
.navigation-button a {
    background: var(--primary);
    margin-right: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--border-fourth);
    height: 40px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-theme-color);
    transition: .4s;
    -webkit-transition: .4s;
    -moz-transition: .4s;
    -ms-transition: .4s;
    -o-transition: .4s;
}

.navigation-button>div {
    margin-right: 12px;
}

.navigation-button button:hover,
.navigation-button a:hover {
    background: var(--theme-color);
    color: var(--text-primary);
    border: var(--border-theme-color) 1px solid;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.09);
}

.search-cell-div {
    color: var(--text-primary);
    border: var(--border-theme-color) 5px solid;
}

.search-btn-expedient {
    background: var(--primary);
    color: var(--text-theme-color);
    border: var(--border-theme-color) 1px solid;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.09);
}

.open-expedient-btn {
    background: var(--primary);
    color: var(--text-theme-color);
    border: var(--border-theme-color) 1px solid;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.09);
}

.navigation-button button:last-child {
    margin-right: 0;
}

.navigation-button .dropdown-menu {
    z-index: 100;
}

.right-side-container .navigation-button {
    display: none;
}

.modal {
    z-index: 999999 !important;
}

.popover {
    z-index: 999999999 !important;
    font-size: 14px;
}

.modal-backdrop {
    z-index: 999995;
}

.modal-header {
    border-bottom: 1px solid var(--fourth);
    padding: 15px;
}

.modal-footer {
    border-top: 1px solid var(--fourth);
}

.modal-header button {
    background: var(--primary);
    border-radius: 3px;
    border: 1px solid var(--border-fourth);
    height: 30px;
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-theme-color);
}

.modal-header button:hover {
    background: var(--theme-color);
    color: var(--text-primary);
    border: var(--border-theme-color) 1px solid;
}

.modal-header h4 {
    color: var(--text-secondary);
    font: 500 18px/20px 'Poppins';
    margin-bottom: 0;
}


.modal-content {
    background: var(--primary);
}

.ui-widget-content {
    background: var(--primary);
}

#downloadModal {
    z-index: 10002;
}

#adquirePlanModal {
    z-index: 10002;
}

#intelligentSummaryModal {
    z-index: 10002;
}

#helpModal {
    z-index: 10002;
}

.left-side-menu .settings-main {
    display: none;
}

.search-wrap,
.search-history-wrap {
    padding: 15px 15px;
    border: 1px solid var(--border-fourth);
    background: var(--primary);
    margin-bottom: 15px;
}

.input-wrap {
    border: 1px solid var(--border-third);
    border-radius: 4px;
    padding: 4px 3px;
    margin-bottom: 15px;
    position: relative;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    -ms-border-radius: 4px;
    -o-border-radius: 4px;
    z-index: 10001;
}

.input-wrap * {
    cursor: text;
}

.input-wrap label {
    font: 400 12px/10px 'Poppins';
    padding-left: 5px;
    color: var(--text-third);
}

.input-wrap input,
.input-wrap select {
    border: 0;
    outline: 0;
    font: 400 16px/14px 'Poppins';
    color: var(--text-secondary);
    background: var(--primary);
    padding-bottom: 4px;
    appearance: none;
    padding: 0 5px;
}

.input-wrap.focused {
    border: 1px solid var(--theme-color) !important;
    box-shadow: 0px 4px 5px rgba(0, 0, 0, 0.09);
    transition: .4s;
    -webkit-transition: .4s;
    -moz-transition: .4s;
    -ms-transition: .4s;
    -o-transition: .4s;
}

.input-wrap.error {
    border: 1px solid var(--pdfColor) !important;
}

.input-wrap.focused .icon svg {
    fill: var(--theme-color);
}

.input-wrap .icon {
    top: 50%;
    right: 0;
    padding: 10px;
    position: absolute;
    fill: var(--secondary);
    cursor: pointer;
    transform: translateY(-50%);
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    -o-transform: translateY(-50%);
}

.input-wrap .icon svg {
    cursor: pointer;
}

form button,
.smart-result-summary-btn,
#submitFiles,
#startMultiChatButton,
#startMultiVirtualAssistantButton,
#deleteDocumentsButton,
.adquire-plan,
.credentials-buttons,
#signInButton,
#registerButton,
.suggested-question,
.next-prev-arrows,
.search-close,
.usage-guide-btn,
.backup-btn,
.confirm-add-document-button,
.open-doc-button,
.get-summary-button {
    color: var(--text-primary);
    background: var(--theme-color) !important;
    text-transform: capitalize;
    border: var(--border-theme-color) 1px solid;
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.09);
    transition: .3s;
    -webkit-transition: .3s;
    -moz-transition: .3s;
    -ms-transition: .3s;
    -o-transition: .3s;
}

#deleteDocumentsButton {
    background: #D90429 !important;
}

form button {
    padding: 15px 40px;
    font: 500 15px/15px 'Poppins';
}

form button:hover,
.smart-result-summary-btn:hover,
#submitFiles:hover,
#startMultiChatButton:hover,
#startMultiVirtualAssistantButton:hover,
.dropdown-item:hover,
.next-prev-arrows:hover,
.search-close:hover,
.open-chat-doc-button:hover,
.usage-guide-btn:hover,
.backup-btn:hover,
.suggested-question:hover,
.confirm-add-document-button:hover,
.open-doc-button:hover,
.get-summary-button:hover {
    background: var(--primary) !important;
    color: var(--text-theme-color) !important;
}

#deleteDocumentsButton:hover {
    background: white !important;
    color: var(--text-theme-color) !important;
}

.search-history-wrap {
    padding: 15px;
    margin-bottom: 0;
}

.clean-history-btn {
    color: var(--text-theme-color);
    border-radius: 4px;
    border: 1px solid var(--border-fourth);
    background: var(--primary);
    margin-bottom: 15px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    -ms-border-radius: 4px;
    -o-border-radius: 4px;
}

.search-history-wrap .search-history-btn {
    font: 600 18px/18px 'Poppins', sans-serif;
    margin-bottom: 0 !important;
    padding: 20px 25px !important;
    background: var(--theme-color);
    color: var(--text-primary);
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.09);
    display: flex;
    border: none;
    fill: var(--text-primary);
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.search-history-item-btn {
    background: var(--theme-color);
    color: var(--text-primary);
}

.search-history-item {
    max-height: 200px;
    overflow-y: scroll;
}

/* Pagination styles for search history */
.search-history-pagination-info {
    text-align: center;
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
}

.search-history-pagination-controls {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.pagination-controls {
    flex-wrap: wrap;
    gap: 0.25rem;
}

.pagination-controls .btn {
    min-width: 2.5rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-ellipsis {
    padding: 0.375rem 0.5rem;
    color: #6c757d;
    font-weight: 500;
}

.page-size-selector {
    margin-top: 0.5rem;
}

.page-size-selector .form-select {
    width: auto;
    min-width: 4rem;
}

.search-history-wrap .search-history-item {
    padding-left: 0;
    margin-bottom: 0;
    margin-top: 15px;
}

.search-history-wrap .search-history-item li {
    padding: 10px 0;
    border-bottom: 1px solid var(--fourth);
}

.search-history-wrap .history-item-wrap {
    padding: 10px;
    border-radius: 4px;
    transition: .4s;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    -ms-border-radius: 4px;
    -o-border-radius: 4px;
    -webkit-transition: .4s;
    -moz-transition: .4s;
    -ms-transition: .4s;
    -o-transition: .4s;
}

.search-history-wrap .search-history-item li:hover .history-item-wrap {
    background: var(--border-primary);
}

.search-history-wrap .search-history-item li:last-child {
    border-bottom: 0;
}

.search-history-wrap .search-history-item li a {
    font: 500 18px/20px 'Poppins';
    color: var(--text-secondary);
    display: inline-block;
    margin-bottom: 5px;
}

.search-history-wrap .search-history-item li span {
    display: block;
    font: 400 14px/14px 'Poppins';
    color: var(--text-third);
}

/* Left side menu CSS end */

/* Container CSS start */

/* Disable scrolling on the body */
body {
    overflow: hidden;
}

.right-side-container {
    padding: 0 12px 15px 12px;
    width: calc(100vw - 400px);
    overflow-y: auto !important;
}

.body-header {
    padding: 15px;
    background: var(--primary);
    border: 1px solid var(--border-fourth);
    font: 600 22px/25px 'Poppins';
    margin-bottom: 15px;
    color: var(--text-secondary);
    position: sticky !important;
    top: 0 !important;
    z-index: 10000;
}

#page-title {
    max-height: 75px;
    overflow-y: scroll;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

#page-title::-webkit-scrollbar {
    display: none;
}

.white-background {
    background-color: #FFF !important;
}

.month_name {
    color: var(--paragraph-text) !important;
}

.main-container {
    padding: 25px;
    background: var(--primary) !important;
    border: 1px solid var(--border-fourth);
    border-radius: 4px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    -ms-border-radius: 4px;
    -o-border-radius: 4px;
    color: var(--paragraph-text) !important;
}

#search_results,
#search_results_laws,
#jurisprudenceView {
    color: var(--paragraph-text) !important;
}

.dynamic-color,
.dropdown-item,
.dataTables_length select[name="search_results_length"],
.dataTables_length select[name="jurisprudenceView_length"],
.intelligent-summary-icon-right-click,
.bot-response table,
#searchSummaryResult table {
    color: var(--paragraph-text) !important;
    background-color: var(--primary) !important;
}

/* Style for nested lists */
.modal-body ul ul,
.modal-body ul ol,
.modal-body ol ul,
.modal-body ol ol {
    padding-left: 25px;
    /* Increase or decrease this value as needed */
    margin-top: 0;
    /* Optional: adjust margin for nested lists */
    margin-bottom: 0;
    /* Optional: adjust margin for nested lists */
}

#searchSummaryResult ul ul,
#searchSummaryResult ul ol,
#searchSummaryResult ol ul,
#searchSummaryResult ol ol {
    padding-left: 25px;
}

.document-container {
    padding-bottom: 5%;
}

/* Generated transcription styles */
.document-container p:has(.transcription-time-section),
.document-container p:has(.transcription-speaker) {
    background: var(--primary);
    border: 1px solid var(--border-fourth);
    border-radius: 10px;
    padding: 16px 18px;
    line-height: 1.7;
    color: var(--paragraph-text);
    box-shadow: 0 2px 8px rgba(var(--theme-black-rgb), 0.05);
}

.transcription-time-section {
    display: inline-block;
    font-size: 12px;
    color: var(--theme-color);
    background-color: color-mix(in srgb, var(--theme-color) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--theme-color) 25%, transparent);
    padding: 2px 10px;
    border-radius: 999px;
    margin-right: 10px;
    letter-spacing: 0.3px;
}

.transcription-speaker {
    display: inline-block;
    color: var(--theme-color);
    background-color: color-mix(in srgb, var(--theme-color) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--theme-color) 25%, transparent);
    padding: 2px 8px;
    border-radius: 8px;
    margin-right: 8px;
}

.darkmode .document-container p:has(.transcription-time-section),
.darkmode .document-container p:has(.transcription-speaker) {
    background: var(--primary);
    border-color: var(--border-fourth);
    box-shadow: none;
}

.darkmode .transcription-time-section {
    color: var(--theme-white);
    background-color: rgba(var(--theme-color-rgb), 0.35);
    border-color: rgba(var(--theme-color-rgb), 0.55);
}

.darkmode .transcription-speaker {
    color: var(--theme-white);
    background-color: rgba(var(--theme-color-rgb), 0.28);
    border-color: rgba(var(--theme-color-rgb), 0.50);
}

/* Extra contrast for Blue theme in dark mode */
.darkmode.blue .transcription-time-section,
.blue.darkmode .transcription-time-section {
    color: #ffffff;
    background-color: rgba(9, 112, 230, 0.45);
    /* closer to theme-primary for stronger contrast */
    border-color: rgba(9, 112, 230, 0.65);
}

/* Mezenta theme tweaks for transcription readability */
.mezenta .document-container p:has(.transcription-time-section),
.mezenta .document-container p:has(.transcription-speaker) {
    background: #ffffff;
    color: #111727 !important;
    border-color: rgba(0, 0, 0, 0.08);
}

.mezenta .transcription-time-section {
    color: #5e3ffe;
    background-color: rgba(123, 79, 255, 0.12);
    border-color: rgba(123, 79, 255, 0.28);
}

.mezenta .transcription-speaker {
    color: #5e3ffe;
    background-color: rgba(123, 79, 255, 0.10);
    border-color: rgba(123, 79, 255, 0.24);
}

.avoid-overflow {
    overflow-wrap: break-word;
    word-break: break-word;
    /* Use 'break-all' only if necessary, as it can break words at any character */
    overflow: auto;
    /* Optional based on design requirements */
}

.file-type {
    font: 500 19px/20px 'Poppins';
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.search-type {
    font: 500 30px/20px 'Poppins';
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.files {
    display: flex;
    flex-wrap: wrap;
}

.file-container {
    width: calc(33.3% - 24px);
    min-width: 200px;
    max-width: 300px;
    cursor: pointer;
    transition: .4s;
    border-radius: 4px;
    margin: 12px 12px;
    -webkit-transition: .4s;
    -moz-transition: .4s;
    -ms-transition: .4s;
    -o-transition: .4s;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    -ms-border-radius: 4px;
    -o-border-radius: 4px;
}

.file-container:hover {
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.09);
}

.file-container.active {
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.09);
}

.file-container.active .file-container-wrap {
    background: var(--border-primary);
    border: 1px solid var(--border-primary);
}

.file-container-wrap {
    border: 1px solid var(--border-fourth);
    transition: .4s;
    border-radius: 4px;
    background: var(--primary);
    padding: 20px 15px;
    display: flex;
    align-items: center;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    -ms-border-radius: 4px;
    -o-border-radius: 4px;
    -webkit-transition: .4s;
    -moz-transition: .4s;
    -ms-transition: .4s;
    -o-transition: .4s;
}

.fileform .file-container-wrap {
    flex-direction: column;
    justify-content: center;
    padding: 35px 25px;
}

.file-container-wrap .icon {
    margin-right: 15px;
}

.file-container-wrap .icon i {
    font-size: 35px;
    line-height: 35px;
}

.fileform .icon {
    margin-bottom: 15px;
    margin-right: 0;
}

.fileform .icon i {
    font-size: 60px;
}

.fileform .info-sub {
    text-align: center;
}

.anticon-search,
.anticon-user,
#anticon-setting-for-lg,
#fullscreen-setting-for-lg {
    color: var(--text-theme-color);
    /* Icon size */
    font-size: 120% !important;
}

.search-history-item-delete,
.user-file-delete {
    color: var(--text-theme-color);
    cursor: pointer;
    padding-top: 10px;
    padding-bottom: 10px;
    display: inline-block;
}

.anticon-setting {
    color: var(--text-theme-color);
}

.files .anticon {
    color: var(--text-theme-color);
}

.files .anticon-folder {
    color: var(--folderColor);
}

.files .anticon-file-pdf {
    color: var(--pdfColor);
}

.anticon-file-pdf {
    color: var(--pdfColor);
}

.files .anticon-file-word {
    color: var(--wroddocColor);
}

.anticon-file-word {
    color: var(--wroddocColor);
}

.files .anticon-file-excel {
    color: var(--excelxlsColor);
}

.files .anticon-file-ppt {
    color: var(--powerpointpptColor);
}

.file-container-wrap .info .name {
    font: 500 17px/20px 'Poppins';
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.file-container-wrap .info .info-sub {
    font: 400 15px/18px 'Poppins';
    color: var(--text-third);
}

.copyright {
    font: 400 14px/20px 'Poppins';
    color: var(--text-third);
    padding-top: 15px;
    border-top: 1px solid var(--fourth);
    margin-top: 15px;
}

/* Container CSS end */

/* Body CSS end */


/* Datepicker CSS start */

#ui-datepicker-div {
    max-width: 400px;
    width: auto !important;
    padding: 25px 20px;
    border-radius: 5px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.09);
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -ms-border-radius: 5px;
    -o-border-radius: 5px;
}

.ui-datepicker-header {
    background: none;
    border: none;
    font: 600 16px/16px 'Poppins';
}

.ui-state-default {
    border: none !important;
    background: none !important;
    text-align: center !important;
    font: 400 14px/14px 'Poppins';
    color: var(--text-secondary) !important;
    width: 35px !important;
    height: 35px !important;
    margin: 2px;
    display: flex !important;
    justify-content: center;
    align-items: center;
}

.ui-datepicker-calendar .ui-state-active,
.ui-datepicker-calendar .ui-state-hover,
.ui-datepicker-calendar .ui-state-highlight {
    background: var(--border-primary) !important;
    border-radius: 50%;
    font-weight: 600 !important;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    -ms-border-radius: 50%;
    -o-border-radius: 50%;
}

.ui-datepicker-header .ui-state-active,
.ui-datepicker-header .ui-state-hover,
.ui-datepicker-header .ui-state-highlight {
    background: none !important;
    border-radius: 0 !important;
    border: none !important;
    -webkit-border-radius: 0 !important;
    -moz-border-radius: 0 !important;
    -ms-border-radius: 0 !important;
    -o-border-radius: 0 !important;
}

.ui-datepicker-calendar th span {
    font: 700 14px/14px 'Poppins';
    color: var(--text-secondary);
}

.ui-icon-circle-triangle-w {
    background-position: -97px -0px !important;
    cursor: pointer;
}

.ui-icon-circle-triangle-e {
    background-position: -32px -0px !important;
    cursor: pointer;
}

.ui-datepicker-next {
    color: var(--text-third)
}

.ui-datepicker-month {
    color: var(--text-secondary);
}

.ui-datepicker-year {
    border: 1px solid var(--border-fourth);
    border-radius: 4px;
    font: 400 14px/14px 'Poppins' !important;
    padding: 4px;
    transition: .4s;
    background: var(--body-bg);
    color: var(--text-secondary);
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    -ms-border-radius: 4px;
    -o-border-radius: 4px;
    -webkit-transition: .4s;
    -moz-transition: .4s;
    -ms-transition: .4s;
    -o-transition: .4s;
}

.ui-datepicker-year:focus {
    border: 1px solid var(--theme-color);
    box-shadow: 0 0px 10px rgba(0, 0, 0, 0.09);
}

.ui-datepicker-year option {
    writing-mode: vertical-lr !important;
    -webkit-writing-mode: vertical-lr !important;
    -ms-writing-mode: vertical-lr !important;
}

/* Datepicker CSS end */

/* Select menu CSS start */
.ui-widget-content {
    color: var(--text-secondary);
}

.ui-menu-item div {
    padding: 10px 10px !important;
    font: 400 15px/15px 'Poppins';
    border-radius: 3px;
    border: none !important;
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    -ms-border-radius: 3px;
    -o-border-radius: 3px;
}

.ui-menu-item div.ui-state-active {
    background: var(--border-primary);
    color: var(--text-theme-color);
}

.ui-selectmenu-text {
    color: var(--text-theme-color);
}

.ui-selectmenu-menu ul {
    border-radius: 5px !important;
    border: 1px solid var(--border-fourth);
    padding: 10px 10px !important;
    box-shadow: 0 4px 5px rgba(0, 0, 0, 0.09);
    -webkit-border-radius: 5px !important;
    -moz-border-radius: 5px !important;
    -ms-border-radius: 5px !important;
    -o-border-radius: 5px !important;
}

.hidden {
    display: none;
}

.width-100 {
    width: 100%;
}

.width-0 {
    width: 0px;
    /* margin-left: -25px; */

}

.no-animate {
    transition: none !important;
}

.width-70 {
    width: 70%;
}

.width-30 {
    width: 30%;
}

.menu-collapse-button .shape {
    fill: var(--text-theme-color);
}

.menu-collapse-button .arrow {
    fill: var(--text-primary);
}

.rtl .menu-collapse-button {
    transform: rotate(180deg);
    margin-left: 5px;
}

.left-side-menu-parent {
    display: flex;
    align-items: center;
}

.menu-collapse-button .arrow.original {
    transition: .4s;
    transform-origin: center;
}

.menu-collapse-button.rotate .arrow.original {
    transform: rotate(180deg);
}

.rtl .menu-collapse-button.rotate .arrow.original {
    transform: rotate(-180deg) !important;
}

.side-bar-collapsed .right-side-container .navigation-button {
    display: flex !important;
}


.block {
    display: block;
}

/* Select menu CSS end */

/* Select menu CSS end */
.anticon {
    font-size: 18px;
}

/* Search CSS start */
.search-div {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    top: -75px;
    right: 0px;
    margin: 10px;
    padding: 10px;
    z-index: 9999999999;
    background: var(--primary);
    border: 1px solid var(--border-fourth);
    transition: .4s;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.09);
    -webkit-transition: .4s;
    -moz-transition: .4s;
    -ms-transition: .4s;
    -o-transition: .4s;
}

.search-div.active {
    top: 0px;
}

.search-div input {
    border: none;
    border-radius: 0;
    font: 400 14px/14px 'Poppins';
    color: var(--text-third);
    padding-right: 10px;
    background: var(--primary);
    -webkit-border-radius: 0;
    -moz-border-radius: 0;
    -ms-border-radius: 0;
    -o-border-radius: 0;
}

.search-div button {
    background: var(--primary) !important;
    margin-right: 5px;
    border-radius: 3px;
    border: 1px solid var(--border-fourth);
    height: 30px;
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    fill: var(--theme-color);
    transition: .4s;
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    -ms-border-radius: 3px;
    -o-border-radius: 3px;
    -webkit-transition: .4s;
    -moz-transition: .4s;
    -ms-transition: .4s;
    -o-transition: .4s;
}

.search-div button:focus {
    background: var(--theme-color);
    color: var(--text-primary);
    fill: var(--text-primary);
    border: var(--border-theme-color) 1px solid;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.09);
}

.search-div button:last-child {
    margin-right: 0;
}

.count {
    font: 400 12px/12px 'Poppins';
    color: var(--text-third);
    margin-right: 7px;
}

.search button {
    background: none;
    border: none;
    outline: none;
}

.search button svg {
    fill: var(--text-third);
}

mark {
    background: #ffdb70;
}

mark.current {
    background: orange !important;
    color: black;
}

extractmark {
    background: #fce5a1;
    color: black;
}

extractmark.current-extract {
    background: orange !important;
    color: black;
}

.next-prev-arrows:disabled {
    fill: var(--disabled-btn);
}

.is-hidden {
    display: none;
}

#search-box {
    width: 20%;
    border: 1px solid #dfdfdf;
    border-radius: 4px;
    font: 400 14px/14px 'Poppins';
    padding-bottom: 4px;
    transition: .4s;
}

.count {
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .search-div {
        width: calc(100% - 20px);
    }

    .search-input {
        width: 100%;
    }

}

.spinner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    height: 60px;
    width: 60px;
    margin: 0px auto;
    -webkit-animation: rotation .6s infinite linear;
    -moz-animation: rotation .6s infinite linear;
    -o-animation: rotation .6s infinite linear;
    animation: rotation .6s infinite linear;
    border-left: 6px solid rgba(0, 174, 239, .15);
    border-right: 6px solid rgba(0, 174, 239, .15);
    border-bottom: 6px solid rgba(0, 174, 239, .15);
    border-top: 6px solid var(--theme-color);
    border-radius: 100%;
    /* Make sure the element is in front everything else */
    z-index: 100000000000000;
}

.downloading-spinner {
    height: 30px;
    width: 30px;
    margin: 0px auto;
    -webkit-animation: rotation .6s infinite linear;
    -moz-animation: rotation .6s infinite linear;
    -o-animation: rotation .6s infinite linear;
    animation: rotation .6s infinite linear;
    border-left: 6px solid rgba(0, 174, 239, .15);
    border-right: 6px solid rgba(0, 174, 239, .15);
    border-bottom: 6px solid rgba(0, 174, 239, .15);
    border-top: 6px solid var(--theme-color);
    border-radius: 100%;
    /* Make sure the element is in front everything else */
    z-index: 100000000000000;
}


#cancel-spinner {
    /* We want this element to be at the top of the screen */
    position: absolute;
    top: -10px;
    left: -10px;
    z-index: 100000000000000;
}

#initial-spinner-text {
    position: absolute;
    left: 50%;
    top: 60%;
    color: var(--text-third);
    text-align: center;
    z-index: 100000000000000;
}

.mini-spinner {
    position: absolute;
    height: 20px;
    width: 20px;
    -webkit-animation: rotation .6s infinite linear;
    -moz-animation: rotation .6s infinite linear;
    -o-animation: rotation .6s infinite linear;
    animation: rotation .6s infinite linear;
    border-left: 2px solid rgba(0, 174, 239, .15);
    border-right: 2px solid rgba(0, 174, 239, .15);
    border-bottom: 2px solid rgba(0, 174, 239, .15);
    border-top: 2px solid var(--theme-color);
    border-radius: 100%;
    /* Make sure the element is in front everything else */
    z-index: 100000000000000;
}

#mini-spinner-lawyer {
    position: relative !important;
}

@-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);
    }
}

.link-disabled {
    pointer-events: none;
    color: lightgray;
}

#context-menu {
    z-index: 99999999999;
}

.tooltip-element {
    /* Avoid the element to have link-like color (make it black instead of blue) */
    color: var(--theme-color) !important;
}

.tooltip {
    z-index: 999999999999 !important;
}

#dateFrom,
#dateTo {
    /* Change cursor to pointer */
    cursor: pointer;
}

#analyze-count {
    font: 400 14px/14px 'Poppins';
    color: var(--text-third);
    padding: 1px;
    padding-bottom: 10px;
}

#analyze-count-number {
    font: 400 14px/14px 'Poppins';
    color: var(--text-secondary);
    padding: 1px;
    padding-bottom: 10px;
}

.index-table {
    border-color: var(--border-theme-color);
    border-style: solid;
    border-width: 2px;
    border-collapse: collapse;
}

.main-index-table {
    border-width: 0px !important;
}

#provide_new_password_modal {
    z-index: 100000000000;
    padding: 5px;
}

.account-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 5px;
}

#font-size-slider {
    height: 2px;
    border: none;
    border-radius: none;
    background: var(--fourth);
}

#font-size-slider .ui-slider-range {
    background: var(--theme-color);
}

#font-size-slider .custom-handle {
    width: 30px !important;
    height: 30px !important;
    border-radius: 50%;
    font-size: 10px;
    color: var(--text-theme-color) !important;
    margin-top: -1em !important;
    margin-left: -15px;
    text-align: center !important;
    line-height: 12px !important;
    background: var(--primary) !important;
    border: 1px solid var(--fourth) !important;
}

#font-size-slider .custom-handle:focus {
    background: var(--theme-color) !important;
    color: var(--text-primary) !important;
}

#font-size-row {
    font: 400 15px/25px 'Poppins';
    color: var(--text-third);
    padding: 15px 25px;
}

#font-size-row button {
    background: var(--primary);
    border-radius: 3px;
    border: 1px solid var(--border-fourth);
    height: 30px;
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-theme-color);
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    -ms-border-radius: 3px;
    -o-border-radius: 3px;
}

#font-size-row button:hover {
    background: var(--theme-color);
    color: var(--text-primary);
    border: var(--border-theme-color) 1px solid;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.09);
}

button.large-text {
    font-size: 25px;
}

button.large-text[disabled=disabled],
button.small-text[disabled=disabled] {
    opacity: .5;
    pointer-events: none;
}

button.small-text {
    font-size: 14px;
}

.condition-badge span {
    background: var(--primary);
    border: 1px solid var(--border-fourth);
    color: var(--text-theme-color);
    padding: 3px 15px;
    font-size: 12px;
    border-radius: 4px;
}

#font-size-row {
    background-color: var(--primary);
}

#provide_new_password_modal .modal-content {
    padding: 50px;
}

/* font-size CSS end */

/* Payments */
.adquire-plan,
.credentials-buttons {
    display: none;
}

/* Smart summary */
.intelligent-summary-icon {
    font-size: 24px;
    color: var(--theme-color);
}

.virtual-assistant-icon,
.help-button,
.help-button-top {
    font-size: 24px;
    color: var(--theme-color);
}

.loading-virtual-assistant-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#intelligent-summary-title {
    color: var(--text-secondary);
}

/* ==========================annotation css start========================== */

@media (max-width: 640px) {
    .r6o-editor {
        width: calc(100vw - 20px);
    }
}



.r6o-editor-inner {
    border-radius: 6px !important;
    overflow: hidden;
    background: var(--body-bg);
}

.r6o-editor .r6o-arrow:after {
    background: var(--body-bg);
}

.r6o-footer {
    background: var(--primary);
}

.r6o-widget.comment.editable {
    background: var(--body-bg);
    color: var(--paragraph-text);
}

.r6o-widget.comment {
    background: var(--primary);
}

.r6o-widget.comment .r6o-arrow-down {
    background: var(--body-bg);
    border: 1px solid var(--border-fourth);
    color: var(--text-theme-color);
}

.r6o-widget.comment .r6o-arrow-down.r6o-menu-open {
    border-color: var(--border-theme-color);
}

.r6o-widget.comment .r6o-comment-dropdown-menu {
    background: var(--body-bg);
    border: 1px solid var(--border-fourth);
    border-radius: 4px;
    color: var(--text-secondary);
    font: 400 13px/13px 'Poppins', sans-serif;
}

.r6o-editor .r6o-footer .r6o-btn.delete-annotation {
    color: var(--text-theme-color);
    background: none;
}

.r6o-editor .r6o-footer .r6o-btn.delete-annotation:hover {
    background: var(--theme-color);
    color: var(--text-primary);
}

.r6o-widget.comment .r6o-comment-dropdown-menu li {
    padding-top: 5px;
    padding-bottom: 5px;
}

.r6o-widget.comment .r6o-comment-dropdown-menu li:hover {
    background: var(--primary);
}

.r6o-widget.r6o-tag {
    background: var(--body-bg);
    color: var(--text-secondary);
    flex-direction: column;
}

.r6o-widget.r6o-tag ul.r6o-taglist li {
    background: var(--primary);
    border: 1px solid var(--border-theme-color);
}

.r6o-widget.r6o-tag input {
    color: var(--paragraph-text);
}

.r6o-editor .r6o-editor-inner .r6o-widget {
    border-bottom: 1px solid var(--border-fourth);
}

.r6o-widget.r6o-tag ul.r6o-taglist li .r6o-delete-wrapper {
    background: var(--theme-color);
    color: var(--text-primary);
}

.r6o-taglist .r6o-label {
    overflow: hidden;
    display: block;
    line-height: 8px;
}

.r6o-editable-text {
    color: var(--paragraph-text);
}

.r6o-btn {
    background: var(--theme-color);
    border-color: var(--border-theme-color);
    border-radius: 5px;
    font: 400 13px/13px 'Poppins', sans-serif;
    padding: 12px 0;
    color: var(--text-primary);
    transition: .4s;
}

.r6o-btn.outline {
    color: var(--text-theme-color);
    border: 1px solid var(--border-theme-color);
    background: none;
    outline-style: auto !important;
}

.r6o-btn:hover {
    background: none;
    color: var(--text-theme-color);
    border: 1px solid var(--border-theme-color);
}

.r6o-btn:disabled {
    background: var(--theme-color) !important;
    border-color: var(--border-theme-color) !important;
    color: var(--text-primary) !important;
    pointer-events: none;
    opacity: .5;
}

.r6o-annotation.selected {
    background: var(--theme-color);
    border-bottom: 2px solid var(--border-theme-color);
    color: var(--text-primary);
}

/* library Modal css start */

.page-annotations .annotation-items {
    margin-bottom: 30px;
}

.page-annotations .annotation-header .title {
    font: 600 14px/14px 'Poppins', sans-serif;
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.page-annotations .page-actions .dropdown>button {
    background: none;
    outline: none;
    border: none;
    height: 5px;
    color: var(--text-secondary);
}

.page-annotations .page-actions .dropdown>button i {
    line-height: 0;
    height: 5px;
    font-size: 20px;
}

.page-annotations .page-actions .dropdown-menu {
    padding: 5px 0;
    min-width: 120px;
}

.page-annotations .page-actions .dropdown-menu button {
    background: none;
    outline: none;
    border: none;
    padding: 5px 15px;
    font: 500 14px/14px 'Poppins', sans-serif;
    width: 100%;
    text-align: left;
    transition: .3s;
    color: var(--text-secondary);
}

.page-annotations .page-actions .dropdown-menu button:hover {
    background: var(--theme-color);
    color: var(--text-primary);
}

.page-annotations .page-actions .dropdown-menu button i {
    padding-right: 5px;
    font-size: 16px;
}

.annotation-items .annotation-item {
    margin-bottom: 15px;
}

.page-annotations .annotation-body {
    border: 1px solid var(--border-fourth);
    border-radius: 5px;
}

.annot-body-header {
    background: var(--body-bg);
    padding: 7px 7px;
}

.annot-body-header .content {
    width: calc(100% - 45px);
}

.annot-body-header .title {
    font: 500 14px/17px 'Poppins', sans-serif;
    margin-bottom: 10px;
    color: var(--text-secondary);
    overflow: hidden;
    width: calc(100%);
    cursor: pointer;
    user-select: none;
    transition: .3s;
}

.annot-body-header .title:hover {
    color: var(--text-theme-color);
}

.annot-body-header .title {
    text-overflow: ellipsis;
    white-space: nowrap;
}

.annot-body-header .tags {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    gap: 5px;
    word-break: break-all;
}

.annot-body-header .tags li {
    padding: 2px 5px;
    color: var(--text-theme-color);
    background: var(--primary);
    border: 1px solid var(--border-theme-color);
    font: 400 12px/12px 'Poppins', sans-serif;
    border-radius: 3px;
}

.annot-body-header .action button {
    background: none;
    outline: none;
    border: none;
    color: var(--text-theme-color);
}

.annot-text {
    padding: 5px 15px 15px 25px;
}

.annot-text:first-child {
    margin-top: 15px;
}

.annot-text .date {
    font: 600 12px/12px 'Poppins', sans-serif;
    margin-bottom: 3px;
    color: var(--text-secondary);
}

.annot-text .text {
    font: 400 14px/14px 'Poppins', sans-serif;
    color: var(--text-secondary);
}

.show-more-annot {
    border: 1px solid var(--border-fourth);
    border-radius: 5px;
    padding: 10px;
    font: 500 13px/13px 'Poppins', sans-serif;
    color: var(--text-theme-color);
    cursor: pointer;
    transition: .4s;
    user-select: none;
}

.show-more-annot:hover {
    border-color: var(--border-theme-color);
}

.empty-annotation {
    font: 500 16px/18px 'Poppins', sans-serif;
    color: var(--text-third);
    padding: 30px 0;
    margin-bottom: 0;
}


.r6o-btn.left {
    top: 12px !important;
    left: 10px !important;
}

.r6o-btn.custom-button {
    position: absolute;
    left: 55px;
    transition: .3s;
}

.r6o-btn.custom-btn-left {
    position: absolute;
    left: 10px;
    transition: .3s;
}

.r6o-btn.custom-button:hover {
    background: var(--theme-color);
    color: var(--text-primary);
}

.intelligent-summary-annot-button:hover {
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.09);
}

#search-annotations,
input {
    border: 1px solid var(--border-fourth);
    font: 400 17px/17px 'Poppins';
    color: var(--text-third);
    padding-right: 10px;
    background: var(--primary);
}

#search-annotations {
    padding-top: 5px;
}

.annot-cancel-button:hover {
    background: var(--theme-color);
    color: var(--text-primary);
}

.success {
    color: white;
}

.success::before {
    content: '\2713';
    /* Unicode checkmark symbol */
    font-size: 1.2em;
    margin-right: 0.5em;
    animation: checkmark 0.5s ease-in-out;
}

@keyframes checkmark {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* library Modal css end */

/* ==========================annotation css end========================== */

/* Virtual Assistant */
#sortable {
    list-style-type: none;
    margin: 0;
    padding: 0;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

#sortable li {
    margin: 10px;
    padding: 1px;
    font-size: 12px;
    text-align: center;
    width: 200px;
    height: 200px
}

#sortable li img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: move;
}

img {
    display: inline !important;
}

#sortable .ui-state-default {
    border: 1px solid #c5c5c5;
    background: #f6f6f6;
    box-shadow: 1px 1px 1px #c5c5c5;
    cursor: move;
    transition: background 0.2s;
}

#sortable .ui-state-default:hover {
    background: #eaeaea;
}

#sortable .ui-sortable-helper {
    box-shadow: 0px 0px 10px #777;
}


.downloadUI {
    margin: auto;
    width: 90%;
    padding: 15px 0;
    max-width: 800px;
}

.downloadUI fieldset {
    padding: 0;
    margin: 0;
    border: none;
}

.downloadUI h5 {
    color: var(--paragraph-text);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1.1em !important;
    border-bottom: 1px solid var(--border-fourth);
    padding-bottom: 8px;
}

/* Improved File Type Selection */
.downloadUI .file-type-selection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

/* Hide the actual checkbox but keep it functional */
.downloadUI .form-check-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    pointer-events: none;
}

/* Make the entire form-check card act as the checkbox */
.downloadUI .form-check {
    position: relative;
    padding: 15px;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    background-color: var(--primary);
    border: 1px solid var(--border-fourth);
    margin-bottom: 0;
    z-index: 1;
    /* Ensure proper stacking context */
}

/* Enhanced hover state */
.downloadUI .form-check:hover {
    background-color: rgba(var(--theme-primary-rgb), 0.05);
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border-color: var(--border-theme-color);
}

/* Style for the selected card */
.downloadUI .form-check:has(input:checked) {
    border-color: var(--theme-color);
    border-width: 2px;
    background-color: rgba(var(--theme-primary-rgb), 0.08);
}

/* Add a subtle indicator for the selected card */
.downloadUI .form-check:has(input:checked)::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--theme-color);
}

/* Adjust the icon styling for better alignment without checkboxes */
.downloadUI .file-type-icon {
    margin-right: 12px;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    flex-shrink: 0;
    pointer-events: none;
}

/* Make the active icon more prominent */
.downloadUI .form-check:has(input:checked) .file-type-icon {
    transform: scale(1.15);
}

.downloadUI .form-check-input {
    margin-right: 12px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.downloadUI .form-check-input:checked {
    background-color: var(--theme-color);
    border-color: var(--theme-color);
}

/* Make the label cover the entire card area */
.downloadUI .form-check-label {
    cursor: pointer;
    font-weight: 500;
    font-size: 15px;
    display: flex;
    align-items: center;
    flex: 1;
    position: static;
    /* Allow clicks to pass through to the parent */
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
}

/* File type icon styling */
.downloadUI .file-type-icon {
    margin-right: 12px;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
}

/* Specific color for each file type icon */
.downloadUI .file-type-icon.doc-icon {
    color: var(--wroddocColor);
}

.downloadUI .file-type-icon.image-icon {
    color: #8e24aa;
}

.downloadUI .file-type-icon.audio-icon {
    color: #3949ab;
}

.downloadUI .file-type-icon.video-icon {
    color: #d81b60;
}

.downloadUI .file-type-icon.presentation-icon {
    color: orange;
}

.downloadUI .file-type-icon.spreadsheet-icon {
    color: var(--excelxlsColor);
}

/* Selected state styling */
.downloadUI .form-check:has(input:checked) {
    border-color: var(--theme-color);
    background-color: rgba(var(--theme-primary-rgb), 0.08);
}

/* Make the icon more prominent when selected */
.downloadUI .form-check:has(input:checked) .file-type-icon {
    transform: scale(1.15);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .downloadUI .file-type-selection {
        grid-template-columns: 1fr;
    }

    .downloadUI .form-check {
        padding: 14px;
    }

    .downloadUI .file-type-icon {
        font-size: 24px;
    }
}

/* File Upload Sections */
.downloadUI .docUploadSection,
.downloadUI .imgUploadSection,
.downloadUI .audioUploadSection,
.downloadUI .videoUploadSection,
.downloadUI .presentationUploadSection,
.downloadUI .spreadsheetUploadSection {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid var(--border-fourth);
    border-radius: 8px;
    background-color: rgba(var(--theme-color-rgb), 0.02);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.downloadUI .docUploadSection:hover,
.downloadUI .imgUploadSection:hover,
.downloadUI .audioUploadSection:hover,
.downloadUI .videoUploadSection:hover,
.downloadUI .presentationUploadSection:hover,
.downloadUI .spreadsheetUploadSection:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
    border-color: var(--border-theme-color);
}

/* Hide sections by default */
.downloadUI .imgUploadSection,
.downloadUI .audioUploadSection,
.downloadUI .videoUploadSection,
.downloadUI .presentationUploadSection,
.downloadUI .spreadsheetUploadSection {
    display: none;
}

/* Show active section */
.downloadUI .visible {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* File Input Styling */
.downloadUI .form-control[type="file"] {
    padding: 10px;
    background-color: var(--primary);
    border: 1px dashed var(--border-theme-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.downloadUI .form-control[type="file"]:hover {
    background-color: rgba(var(--theme-color-rgb), 0.05);
}

.downloadUI .form-control[type="file"]::file-selector-button {
    background-color: var(--theme-color);
    color: var(--text-primary);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    margin-right: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.downloadUI .form-control[type="file"]::file-selector-button:hover {
    background-color: var(--theme-color-hover);
}

/* Submit Button Styling */
.downloadUI #submitFiles {
    background-color: var(--theme-color);
    color: var(--text-primary);
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    transition: all 0.3s ease;
}

.downloadUI #submitFiles:hover:not(:disabled) {
    background-color: var(--theme-color-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.downloadUI #submitFiles:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.downloadUI #submitFiles::before {
    content: "";
    margin-right: 8px;
    font-size: 16px;
}

/* Progress Bar Styling */
.downloadUI .progress {
    height: 10px;
    border-radius: 5px;
    margin: 10px 0;
    background-color: rgba(var(--theme-color-rgb), 0.1);
}

.downloadUI .progress-bar {
    background-color: var(--theme-color);
    border-radius: 5px;
}

.downloadUI #uploadStatusContainer {
    margin-top: 20px;
}

.downloadUI .postUploadProgress {
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    background-color: rgba(var(--theme-color-rgb), 0.05);
}

.downloadUI .mini-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(var(--theme-color-rgb), 0.3);
    border-radius: 50%;
    border-top-color: var(--theme-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .downloadUI {
        width: 100%;
        padding: 10px 0;
    }

    .downloadUI .form-check {
        padding: 10px;
    }

    .downloadUI .docUploadSection,
    .downloadUI .imgUploadSection,
    .downloadUI .audioUploadSection,
    .downloadUI .videoUploadSection,
    .downloadUI .presentationUploadSection,
    .downloadUI .spreadsheetUploadSection {
        padding: 12px;
        margin: 15px 0;
    }

    .downloadUI #submitFiles {
        width: 100%;
        padding: 12px;
    }
}

/* Help Button Styling */
.downloadUI .feature-section {
    margin-bottom: 10px;
}

.downloadUI .help-button {
    background-color: transparent;
    color: var(--text-theme-color);
    border: 1px solid var(--border-theme-color);
    width: 26px;
    height: 26px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-left: 10px;
    transition: all 0.2s ease;
}

.downloadUI .help-button:hover {
    background-color: var(--theme-color);
    color: var(--text-primary);
}

/* New Feature: Identify Speakers card */
.new-feature-highlight {
    border: 1px dashed #f0ad4e;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255, 193, 7, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
}

/* Emphasize when feature is enabled */
.new-feature-highlight.feature-enabled {
    border-style: solid;
    border-color: #0d6efd;
    background: rgba(13, 110, 253, 0.08);
}

.new-feature-highlight .left-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.new-feature-highlight .label-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.new-feature-highlight .form-check-input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
}

.new-feature-highlight .form-check-label {
    font-weight: 600;
}

.new-feature-highlight .desc {
    margin: 0;
    font-size: 0.9rem;
    color: #6c757d;
}

.new-feature-highlight .right-actions {
    display: flex;
    align-items: center;
}

/* On wider screens, place the help button to the right, with the toggle button under the description */
@media (min-width: 577px) {

    #identifySpeakersAudioContainer .right-actions,
    #identifySpeakersVideoContainer .right-actions {
        align-items: flex-start;
    }
}

/* Add spacing to the new toggle button */
.new-feature-highlight .toggle-identify-feature {
    margin-right: 8px;
    font-weight: 600;
    min-width: 7.5rem;
    /* Prevent layout shift between "Activar" and "Desactivar" */
    white-space: nowrap;
    text-align: center;
}

.darkmode .new-feature-highlight {
    border-color: #e0a800;
    background: rgba(224, 168, 0, 0.12);
}

.darkmode .new-feature-highlight.feature-enabled {
    border-color: #6ea8fe;
    background: rgba(110, 168, 254, 0.12);
}

.darkmode .new-feature-highlight .desc {
    color: #adb5bd;
}

@media (max-width: 576px) {
    .new-feature-highlight {
        flex-direction: column;
        align-items: flex-start;
    }

    .new-feature-highlight .right-actions {
        align-self: flex-end;
    }
}

/* Image Preview Improvements */
.downloadUI #imagePreviewContainer {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    background-color: rgba(var(--theme-color-rgb), 0.02);
}

.downloadUI .preview-instructions {
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 10px;
    text-align: center;
}

/* Separate file type groups visually */
.downloadUI .file-type-group {
    margin-bottom: 25px;
    background-color: var(--primary);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.feature-section {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.help-button {
    margin-bottom: 10px !important;
}

.help-button-top {
    margin-right: 5px !important;
}

.color-bold {
    color: var(--text-theme-color);
    font-weight: bold;
}

h1 {
    font-size: 2.6em !important;
    margin-top: 0.37em !important;
    margin-bottom: 0.37em !important;
    font-weight: bold !important;
}

h2 {
    font-size: 1.95em !important;
    margin-top: 0.37em !important;
    margin-bottom: 0.37em !important;
    font-weight: bold !important;
}

h3 {
    font-size: 1.3em !important;
    margin-top: 0.37em !important;
    margin-bottom: 0.37em !important;
    font-weight: bold !important;
}

h4 {
    font-size: 1.2em !important;
    margin-top: 0.37em !important;
    margin-bottom: 0.37em !important;
    font-weight: bold !important;
}

h5 {
    font-size: 1em !important;
    margin-top: 0.37em !important;
    margin-bottom: 0.37em !important;
    font-weight: bold !important;
}

h6 {
    font-size: 0.8em !important;
    margin-top: 0.37em !important;
    margin-bottom: 0.37em !important;
    font-weight: bold !important;
}

p {
    margin-top: 1.2em !important;
    margin-bottom: 1.2em !important;
}

.bot-response table,
#intelligentSummaryResult table,
#documentSummaryResult table,
#searchSummaryResult table {
    border: 1px solid var(--border-theme-color);
    border-collapse: collapse !important;
    width: 100%;
}

.bot-response a,
#intelligentSummaryResult a,
#documentSummaryResult a,
.footer a,
#adquirePlanModal a,
#searchSummaryResult a {
    color: var(--text-theme-color);
}

.bot-response ol,
.modal-body ol,
#intelligentSummaryResult ol,
#documentSummaryResult ol,
#searchSummaryResult ol {
    list-style-type: decimal;
}

.document-container ol {
    list-style: decimal;
    list-style-type: decimal;
    list-style-image: none;
    list-style-position: inside;
}

.bot-response ul,
.modal-body ul,
#intelligentSummaryResult ul,
#documentSummaryResult ul,
#searchSummaryResult ul {
    list-style-type: disc;
}

.document-container ul {
    list-style: disc;
    list-style-type: disc;
    list-style-image: none;
    list-style-position: inside;
}

.copy-feedback {
    color: #38a169;
    animation: blink 1s linear;
}

.lexiusdoc-card {
    border: 1px solid var(--border-theme-color);
    background: var(--primary);
    border-radius: 18px;
    padding: 18px 22px;
    margin: 22px 0;
    box-shadow: 0 10px 28px rgba(17, 25, 40, 0.06);
    color: var(--text-primary);
}

.lexiusdoc-card__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: clamp(10px, 2.6vw, 16px);
    row-gap: clamp(6px, 1.8vw, 12px);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-theme-color);
}

.lexiusdoc-card__info {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    column-gap: clamp(10px, 2vw, 14px);
    row-gap: 6px;
    min-width: 0;
}

.lexiusdoc-card__icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--theme-color-rgb), 0.12);
    color: var(--text-theme-color);
    font-size: 18px;
    align-self: start;
}

.lexiusdoc-card__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lexiusdoc-card__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
}

.lexiusdoc-card__title {
    font-size: 1.05rem;
    margin: 0;
    font-weight: 600;
}

.lexiusdoc-card__hint {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.35;
    color: var(--text-secondary);
}

.lexiusdoc-card__actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    align-self: start;
}

.lexiusdoc-card__action-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    background: rgba(var(--theme-color-rgb), 0.12);
    color: var(--text-theme-color);
}

.lexiusdoc-card__action-btn i {
    font-size: 14px;
}

.lexiusdoc-card__action-btn:hover {
    background: rgba(var(--theme-color-rgb), 0.25);
}

.lexiusdoc-card__action-btn.is-loading {
    pointer-events: none;
    opacity: 0.7;
}

.lexiusdoc-card__action-btn--pdf {
    color: #c53030;
}

.lexiusdoc-card__action-btn--docx {
    color: #1a56db;
}

.lexiusdoc-card__action-btn--copy {
    color: var(--text-theme-color);
}

.lexiusdoc-card__action-btn--copy.copied {
    background: rgba(56, 161, 105, 0.15);
    color: #2f855a;
}

.lexiusdoc-card__content {
    margin-top: 16px;
    padding-top: 10px;
    font-size: 0.98rem;
    line-height: 1.6;
}

.lexiusdoc-card__content> :first-child {
    margin-top: 0 !important;
}

.lexiusdoc-card__content h1,
.lexiusdoc-card__content h2,
.lexiusdoc-card__content h3,
.lexiusdoc-card__content h4,
.lexiusdoc-card__content h5,
.lexiusdoc-card__content h6 {
    margin-top: 1.6em !important;
    margin-bottom: 0.8em !important;
}

.lexiusdoc-card__content ul,
.lexiusdoc-card__content ol {
    padding-left: 1.2em;
    margin: 1em 0;
}

.lexiusdoc-card__content ul li,
.lexiusdoc-card__content ol li {
    margin-bottom: 0.6em;
}

.lexiusdoc-download-wrapper {
    font-family: 'Poppins', sans-serif;
    color: #111727;
}

.lexiusdoc-download-section {
    margin-bottom: 2.5rem;
}

.lexiusdoc-download-section h1 {
    margin-top: 0;
}

@media (max-width: 640px) {
    .lexiusdoc-card__header {
        grid-template-columns: 1fr;
        align-items: flex-start;
        row-gap: 10px;
        padding-bottom: 8px;
    }

    .lexiusdoc-card {
        padding: 16px;
        margin: 18px 0;
        border-radius: 16px;
    }

    .lexiusdoc-card__info {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: flex-start;
        column-gap: 10px;
        row-gap: 4px;
    }

    .lexiusdoc-card__icon {
        width: 36px;
        height: 36px;
        border-radius: 12px;
        font-size: 16px;
    }

    .lexiusdoc-card__title {
        font-size: 1.05rem;
    }

    .lexiusdoc-card__actions {
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
    }

    .lexiusdoc-card__action-btn {
        width: 34px;
        height: 34px;
        border-radius: 9px;
    }

    .lexiusdoc-card__action-btn i {
        font-size: 15px;
    }

    .lexiusdoc-card__content {
        font-size: 1rem;
        line-height: 1.7;
    }
}

.chat-input {
    min-height: 40px;
    /* Minimum height */
    max-height: 200px;
    /* Maximum height */
    overflow-y: auto;
    /* Add scrollbar when content exceeds max height */
    resize: none;
    /* Disable manual resizing */
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}


.performance-mode-toggle {
    position: relative;
    width: 60px;
    height: 34px;
}

.performance-mode-btn {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.performance-mode-btn .normal,
.performance-mode-btn .high-performance {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.performance-mode-btn .high-performance {
    background-color: #2196F3;
    opacity: 0;
}

.performance-mode-btn .toggler {
    position: absolute;
    cursor: pointer;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.performance-mode-btn.performance-active .high-performance {
    opacity: 1;
}

.performance-mode-btn.performance-active .toggler {
    transform: translateX(26px);
}

.performance-mode-btn .anticon-thunderbolt {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.performance-mode-btn .normal .anticon-thunderbolt {
    left: 10px;
    color: #fff;
}

.performance-mode-btn .high-performance .anticon-thunderbolt {
    right: 10px;
    color: #fff;
}

@keyframes pulse-loading {
    0% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 0.3;
    }
}

.suggested-questions {
    transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
    overflow: hidden;
}

.suggested-questions.collapsed {
    max-height: 0;
    opacity: 0;
    margin: 0 !important;
    padding: 0;
}

.suggested-questions.expanded {
    max-height: 150px;
    opacity: 1;
    margin-bottom: 1rem;
}

.suggested-questions-loading {
    min-height: 50px;
    margin-bottom: 1rem;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 0.5rem;
    animation: pulse-loading 1.5s ease-in-out infinite;
}


.document-item {
    margin-bottom: 5px;
}

.document-item a {
    flex: 1;
}

.delete-document-btn {
    color: #dc3545;
    background: none;
    border: none;
    padding: 2px 5px;
    cursor: pointer;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.delete-document-btn:hover {
    opacity: 0.7;
}

s .help-button-docs:hover {
    color: #fff;
    background-color: var(--theme-color);
    border-color: var(--theme-color);
}

.copy-summary-button {
    cursor: pointer;
    padding: 4px 8px;
    border: none;
    background: transparent;
    transition: color 0.3s ease;
}

.copy-summary-button:hover {
    color: var(--theme-color);
}

.copy-feedback {
    animation: copy-flash 1s ease;
}

@keyframes copy-flash {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* Add these styles after your existing copy button styles */
.download-pdf-button {
    cursor: pointer;
    padding: 4px 8px;
    border: none;
    background: transparent;
    transition: color 0.3s ease;
}

.download-pdf-button:hover {
    color: var(--theme-color);
}

.download-pdf-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.anticon-loading {
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Add after your existing download button styles */
.download-docx-button {
    cursor: pointer;
    padding: 4px 8px;
    border: none;
    background: transparent;
    transition: color 0.3s ease;
}

.download-docx-button:hover {
    color: var(--theme-color);
}

.download-docx-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


.doc-details-popup {
    background: var(--primary);
    border: 1px solid var(--border-fourth);
    box-shadow: var(--doc-popup-shadow);
    color: var(--text-secondary);
    padding: 10px;
    max-width: 40vw;
    /* More responsive width */
    min-width: 300px;
    /* Minimum width */
    max-height: 50vh;
    /* More responsive height */
    min-height: 100px;
    /* Minimum height */
    overflow-y: auto;
    z-index: 9999999;
    border-radius: 8px;
}

/* Add media query for mobile devices */
@media screen and (max-width: 768px) {
    .doc-details-popup {
        max-width: 90vw;
        min-width: auto;
        width: 90vw;
    }
}

.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.fade-enter-from,
.fade-leave-to {
    opacity: 0;
    transform: translateY(-10px);
}

.fade-enter-to,
.fade-leave-from {
    opacity: 1;
    transform: translateY(0);
}

.popup-header {
    display: flex;
    justify-content: flex-end;
    margin: -4px -4px 4px -4px;
    padding: 2px;
}

.popup-close-btn {
    width: 32px;
    /* w-8 equivalent */
    height: 32px;
    /* h-8 equivalent */
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--primary);
    border: 1px solid var(--border-fourth);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 14px;
    /* text-sm equivalent */
    cursor: pointer;
    transition: all 0.2s ease;
}

.popup-close-btn:hover {
    background: var(--theme-color);
    color: var(--text-primary);
    border-color: var(--border-theme-color);
}

.popup-close-btn .anticon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-tabs,
.nav-tabs li {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-fourth);
}

.nav-tabs .nav-item {
    margin-bottom: -1px;
}

.nav-tabs .nav-link {
    border: 1px solid transparent;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    padding: 8px 16px;
    color: var(--text-secondary);
    background: none;
}

.nav-tabs .nav-link:hover {
    border-color: var(--border-fourth);
}

.nav-tabs .nav-link.active {
    color: var(--text-theme-color);
    background-color: var(--primary);
    border-color: var(--border-fourth) var(--border-fourth) var(--primary);
}


.folder-picker-list {
    max-height: 50vh;
    /* or something suitable */
    overflow-y: auto;
}

.folder-picker-item {
    cursor: pointer;
}

.folder-picker-item:hover {
    background-color: #f8f9fa;
}

.mindmap-button {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
}

.mindmap-button:hover {
    opacity: 0.8;
}

#markmapModal .modal-content {
    background-color: var(--primary);
    color: var(--text-color);
}

#markmap {
    background-color: var(--primary);
    font-family: 'Open Sans', sans-serif;
}

/* Mobile styles for markmap */
@media (max-width: 768px),
(pointer: coarse) {
    .markmap-node {
        font-size: 16px !important;
        /* Bigger font for mobile */
    }

    .markmap .markmap-node circle {
        r: 8px !important;
        /* Bigger circles for touch */
        stroke-width: 2px !important;
        /* Thicker border for better visibility */
    }

    /* Increase spacing between nodes for touch */
    #markmap {
        --markmap-height: 40px !important;
        /* More vertical space between nodes */
        --markmap-width: 20px !important;
        /* More horizontal space between nodes */
    }

    /* Make toolbar buttons bigger for touch */
    .mm-toolbar-item {
        width: 44px;
        height: 44px;
    }

    .mm-toolbar-item svg {
        width: 24px;
        height: 24px;
    }
}

.markmap .markmap-link {
    opacity: 1 !important;
    /* For link lines, if needed */
}

.markmap .markmap-node circle {
    fill-opacity: 1 !important;
    /* For node circles */
    stroke-opacity: 1 !important;
}

.mm-toolbar-brand {
    display: none;
}

/* Markmap toolbar styles */
.mm-toolbar {
    background: var(--primary);
    border: 1px solid var(--border-fourth);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 4px;
}

.mm-toolbar-item {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    position: relative;
}

.mm-toolbar-item:hover {
    background: var(--border-primary);
    color: var(--text-theme-color);
    transform: translateY(-1px);
}

.mm-toolbar-item:active {
    transform: translateY(1px);
}

.mm-toolbar-item.active {
    background: var(--theme-color);
    color: var(--text-primary);
}

.mm-toolbar-item.active:hover {
    background: var(--theme-color);
    opacity: 0.9;
}

/* Tooltip styles */
.mm-toolbar-item::after {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    border: 1px solid var(--border-fourth);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mm-toolbar-item:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: -35px;
}

/* SVG icon styles */
.mm-toolbar-item svg {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
}

.mm-toolbar-item:hover svg {
    transform: scale(1.1);
}

.mm-toolbar-item:active svg {
    transform: scale(0.95);
}

.mindmap-mode-toggle {
    position: relative;
    width: 60px;
    height: 34px;
}

.mindmap-mode-btn {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    cursor: pointer;
}

.mindmap-mode-btn .normal,
.mindmap-mode-btn .auto-expand {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.mindmap-mode-btn .auto-expand {
    background-color: #2196F3;
    opacity: 0;
}

.mindmap-mode-btn .toggler {
    position: absolute;
    cursor: pointer;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.mindmap-mode-btn.autoexpand-active .auto-expand {
    opacity: 1;
}

.mindmap-mode-btn.autoexpand-active .toggler {
    transform: translateX(26px);
}

.mindmap-mode-btn .anticon-branches {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.mindmap-mode-btn .normal .anticon-branches {
    left: 10px;
    color: #fff;
}

.mindmap-mode-btn .auto-expand .anticon-branches {
    right: 10px;
    color: #fff;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-title .anticon-branches {
    font-size: 18px;
    color: var(--text-theme-color);
}

/* Loading message animation */
.loading-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.loading-message {
    min-height: 2em;
    display: flex;
    align-items: center;
}

/* Improved loading actions under the thinking indicator */
.loading-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.stop-generate-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(var(--theme-color-rgb), 0.25);
    background: rgba(var(--theme-color-rgb), 0.06);
    color: var(--theme-color);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.stop-generate-btn:hover:not(:disabled) {
    background: rgba(var(--theme-color-rgb), 0.12);
}

.stop-generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Cancelled state card */
.cancelled-notice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #fff2f0;
    /* higher-contrast light error background */
    border: 1px solid #ffccc7;
    border-left-width: 4px;
    border-left-color: #ff4d4f;
    padding: 12px;
    border-radius: 10px;
    margin: 8px 0;
    /* Ensure readable text even when container uses light-on-dark colors */
    color: #262626;
}

.cancelled-icon i {
    color: #ff4d4f;
}

.cancelled-copy strong {
    display: block;
    color: #cf1322;
    /* dark error heading for better contrast */
}

.cancelled-copy p {
    margin: 4px 0 8px 0;
    color: #595959;
    /* readable body text on light error background */
    font-size: 14px;
}

.cancelled-actions {
    display: flex;
    gap: 8px;
}

.cancelled-actions .retry-btn {
    background: var(--theme-color);
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
}

.cancelled-actions .retry-btn:hover {
    filter: brightness(0.95);
}

.cancelled-actions .edit-btn {
    border: 1px solid var(--border-color, #d9d9d9);
    background: #ffffff;
    color: #262626;
    padding: 6px 10px;
    border-radius: 6px;
}

/* Dark mode tweaks for cancelled notice for consistent readability */
.darkmode .cancelled-notice {
    background: rgba(255, 77, 79, 0.12);
    border-color: rgba(255, 77, 79, 0.45);
    color: #f5f5f5;
}

.darkmode .cancelled-copy strong {
    color: #ff7875;
}

.darkmode .cancelled-actions .edit-btn {
    background: transparent;
    color: #f5f5f5;
    border-color: rgba(255, 255, 255, 0.35);
}

.loading-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-theme-color);
    opacity: 0.3;
    animation: loadingDots 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(1) {
    animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loadingDots {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Research Activity Styles */
.research-activity {
    padding: 8px 12px;
    border-radius: 6px;
    background-color: rgba(var(--theme-color-rgb), 0.03);
    transition: all 0.3s ease;
    margin-top: 8px;
}

.research-activity.searching {
    border-left: 3px solid var(--theme-color);
}

.research-activity.reasoning {
    border-left: 3px solid #4CAF50;
}

.research-activity-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.research-activity-icon i {
    font-size: 16px;
    opacity: 0.8;
}

.research-activity.searching .research-activity-icon i {
    color: var(--theme-color);
}

.research-activity.reasoning .research-activity-icon i {
    color: #4CAF50;
}

.research-activity-text {
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--text-secondary);
    opacity: 0.9;
}

/* Add subtle animation for status changes */
.research-activity {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Add hover effect */
.research-activity:hover {
    background-color: rgba(var(--theme-color-rgb), 0.05);
}

/* Image Preview Styling */
.image-preview-container {
    margin-top: 15px;
    display: none;
}

.preview-instructions {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.image-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    min-height: 100px;
}

.image-preview {
    position: relative;
    width: 100px;
    height: 100px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    cursor: grab;
    transition: transform 0.2s ease;
}

.image-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview .remove-image {
    position: absolute;
    top: 3px;
    right: 3px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    /* Increased from 12px */
    color: #f00;
    font-weight: bold;
    /* Added to make the X more visible */
    color: #f00;
}

/* Media query for mobile devices */
@media (max-width: 768px) {
    .image-preview .remove-image {
        width: 32px;
        /* Even larger on mobile */
        height: 32px;
        /* Even larger on mobile */
        font-size: 32px;
        /* Larger font on mobile */
        top: 5px;
        /* Adjust position */
        right: 5px;
        /* Adjust position */
    }
}

.image-preview .image-number {
    position: absolute;
    bottom: 3px;
    left: 3px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 3px;
    padding: 1px 5px;
    font-size: 12px;
}

/* Image Preview Styling */
.image-preview-container {
    margin-top: 15px;
    display: none;
}

.preview-instructions {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.image-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    /* Increased gap for larger previews */
    margin-top: 10px;
    min-height: 150px;
    /* Updated to match new preview size */
}

.image-preview {
    position: relative;
    width: 150px;
    /* Increased width */
    height: 150px;
    /* Increased height */
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    cursor: grab;
    transition: transform 0.2s ease;
}

.image-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview .image-number {
    position: absolute;
    bottom: 3px;
    left: 3px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 3px;
    padding: 1px 5px;
    font-size: 12px;
}

.sortable-ghost {
    opacity: 0.4;
}

.sortable-chosen {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.img-fluid {
    max-width: 100%;
    height: auto;
}

/* Redesigned User Files Library */
.files-library {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 15px 0;
}

.files-library .anticon {
    color: var(--text-theme-color);
}

.file-card {
    position: relative;
    width: 230px;
    height: 250px;
    /* Increased height to accommodate the date */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.file-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.file-card-header {
    padding: 15px;
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-card-checkbox {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
}

.file-card-icon {
    font-size: 60px;
    margin: 15px auto;
    color: var(--theme-primary);
    text-align: center;
    transition: all 0.2s ease;
}

.file-card:hover .file-card-icon {
    transform: scale(1.1);
}

.file-card-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    /* Prevent content overflow */
}

.file-card-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    /* Reduced margin */
    text-align: center;
    word-break: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 40px;
}

.file-card-actions {
    display: flex;
    justify-content: space-around;
    margin-top: auto;
    /* Push to bottom of available space */
}

.file-card-action {
    border: none;
    background: none;
    color: var(--theme-primary);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
    font-size: 16px;
    height: 30px;
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-card-action:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: scale(1.2);
}

.file-type-badge {
    position: absolute;
    right: 15px;
    top: 15px;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    background-color: var(--text-theme-color);
    color: white;
}

.file-card.pdf .file-card-icon {
    color: #e53935;
}

.file-card.docx .file-card-icon {
    color: #1565c0;
}

.file-card.xlsx .file-card-icon {
    color: #43a047;
}

.file-card.pptx .file-card-icon {
    color: #f57c00;
}

.file-card.image .file-card-icon {
    color: #8e24aa;
}

.file-card.audio .file-card-icon {
    color: #3949ab;
}

.file-card.video .file-card-icon {
    color: #d81b60;
}

.files-library-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.files-library-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.files-library-actions {
    display: flex;
    gap: 10px;
}

.files-library-empty {
    width: 100%;
    text-align: center;
    padding: 40px 0;
    color: #777;
}

.files-library-empty i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.select-all-container {
    display: flex;
    align-items: center;
    margin-right: 15px;
    padding: 3px 8px;
    border-radius: 20px;
    background-color: rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.select-all-container:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.select-all-container label {
    margin-left: 5px;
    font-size: 13px;
    cursor: pointer;
}

/* Responsive styles */
@media (max-width: 768px) {
    .files-library {
        justify-content: center;
        gap: 15px;
    }

    .file-card {
        width: calc(50% - 15px);
        max-width: 250px;
        height: 240px;
        /* Increased height for mobile */
    }

    .files-library-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .files-library-actions {
        width: 100%;
        justify-content: space-between;
    }

    .select-all-container {
        margin-bottom: 10px;
        padding: 5px 12px;
    }

    .select-all-container .form-check-input {
        width: 20px;
        height: 20px;
    }

    .select-all-container label {
        font-size: 14px;
        margin-left: 8px;
    }

    /* Make checkboxes bigger on mobile */
    .file-card-checkbox .form-check-input {
        width: 26px;
        height: 26px;
        min-width: 26px;
        min-height: 26px;
        border-width: 2px;
    }

    /* Add more space around the checkbox for easier tapping */
    .file-card-checkbox {
        padding: 5px;
        top: 10px;
        left: 10px;
    }

    /* Make the file icon slightly smaller but still prominent */
    .file-card-icon {
        font-size: 50px;
        margin: 10px auto;
    }

    /* Improve title display */
    .file-card-title {
        font-size: 13px;
        margin-bottom: 8px;
        max-height: 36px;
    }

    /* Enhance action buttons */
    .file-card-action {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .file-type-badge {
        padding: 3px 6px;
        font-size: 9px;
    }
}

@media (max-width: 580px) {
    .files-library {
        gap: 12px;
    }

    .file-card {
        width: calc(100% - 20px);
        max-width: none;
        height: auto;
        min-height: 90px;
        /* Increased minimum height */
        flex-direction: row;
        padding: 12px 15px;
        align-items: center;
    }

    /* File card layout: [checkbox][icon][content][badge] */
    .file-card-checkbox {
        position: absolute;
        padding: 5px;
        top: 50%;
        left: 10px;
        transform: translateY(-50%);
        z-index: 3;
    }

    .file-card-checkbox .form-check-input {
        width: 26px;
        height: 26px;
        min-width: 26px;
        min-height: 26px;
    }

    .file-card-icon {
        font-size: 35px;
        margin-left: 35px;
        /* Space for checkbox */
        flex-shrink: 0;
        width: 40px;
        text-align: center;
    }

    .file-card-content {
        flex: 1;
        padding: 0 10px;
        margin-left: 10px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-width: 0;
        /* Allow content to shrink if needed */
    }

    .file-card-title {
        text-align: left;
        font-size: 13px;
        margin-bottom: 5px;
        /* Reduced margin */
    }

    .file-card-actions {
        gap: 10px;
        margin-top: 5px;
        /* Added margin top */
    }

    /* Mobile upload date style */
    .file-upload-date {
        text-align: left;
        justify-content: flex-start;
        margin-bottom: 5px;
        font-size: 11px;
    }

    .file-card-action {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}

/* Upload date style */
.file-upload-date {
    font-size: 12px;
    color: #777;
    margin-bottom: 8px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-upload-date i {
    margin-right: 5px;
    font-size: 14px;
}

.file-card-actions {
    display: flex;
    justify-content: space-around;
    margin-top: auto;
    /* Push to bottom of available space */
}

/* Desktop checkbox styles */
.file-card-checkbox .form-check-input {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    border-width: 1.5px;
    cursor: pointer;
}

/* File Actions Bar - Improved UI for file actions */
.file-actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
    padding: 15px;
    border-radius: 8px;
    background-color: transparent;
    border: 1px solid var(--border-fourth);
    transition: all 0.3s ease;
}

.file-actions-bar.has-selection {
    background-color: rgba(var(--theme-primary-rgb), 0.05);
}

.file-actions-bar button {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    min-width: 180px;
    justify-content: center;
    border: 1px solid var(--border-fourth);
    background-color: var(--primary);
    color: var(--text-theme-color);
    opacity: 0.7;
    cursor: not-allowed;
}

.file-actions-bar button:not(:disabled) {
    border: var(--border-theme-color) 1px solid;
    background-color: var(--theme-color) !important;
    color: var(--text-primary);
    opacity: 1;
    cursor: pointer;
}

.file-actions-bar button:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.file-actions-bar button i {
    margin-left: 8px;
    font-size: 16px;
}

.file-actions-bar .selection-counter {
    display: flex;
    align-items: center;
    margin-right: auto;
    font-weight: 500;
    color: var(--text-secondary);
}

.file-actions-bar .selection-counter span {
    font-size: 18px;
    margin: 0 5px;
}

/* Different button styles when active */
.file-actions-bar .chat-button:not(:disabled) {
    background-color: var(--theme-color) !important;
}

.file-actions-bar .summary-button:not(:disabled) {
    background-color: var(--theme-color) !important;
}

.file-actions-bar .delete-button:not(:disabled) {
    background-color: #e02424 !important;
}

@media (max-width: 768px) {
    .file-actions-bar {
        flex-direction: column;
        padding: 12px;
    }

    .file-actions-bar .selection-counter {
        margin-bottom: 10px;
        justify-content: center;
        width: 100%;
    }

    .file-actions-bar button {
        width: 100%;
    }
}

/* File type icons - Make sure the icon font is loading properly */
.downloadUI .form-check-label::before {
    font-family: "anticon" !important;
    content: "\e664";
    /* Default file icon */
    margin-right: 12px;
    font-size: 20px;
    color: var(--text-theme-color);
    display: inline-block;
    width: 24px;
    text-align: center;
}

/* Icon definitions with explicit unicode values */
.downloadUI .form-check-label[for="docOption"]::before {
    content: "\e6f3";
    /* document icon */
    color: var(--wroddocColor);
}

.downloadUI .form-check-label[for="imgOption"]::before {
    content: "\e605";
    /* picture icon */
    color: #8e24aa;
}

.downloadUI .form-check-label[for="audioOption"]::before {
    content: "\e667";
    /* sound icon */
    color: #3949ab;
}

.downloadUI .form-check-label[for="videoOption"]::before {
    content: "\e7c0";
    /* video icon */
    color: #d81b60;
}

.downloadUI .form-check-label[for="presentationOption"]::before {
    content: "\e6f7";
    /* ppt icon */
    color: var(--powerpointpptColor);
}

.downloadUI .form-check-label[for="spreadsheetOption"]::before {
    content: "\e6f4";
    /* excel icon */
    color: var(--excelxlsColor);
}

/* Special styling for document option with multiple icons */
.downloadUI .file-type-icon.doc-icons {
    width: auto;
    display: flex;
    gap: 4px;
}

.downloadUI .file-type-icon.doc-icons i:first-child {
    color: var(--wroddocColor);
}

.downloadUI .file-type-icon.doc-icons i:last-child {
    color: var(--pdfColor);
}

/* Make sure the icon container is wide enough for both icons */
.downloadUI .form-check:has(input#docOption:checked) .file-type-icon.doc-icons {
    transform: scale(1.1);
}

.image-filename {
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    padding: 5px;
    text-align: center;
    color: #555;
    margin-top: 5px;
}

.image-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-preview img {
    max-width: 100%;
    max-height: 120px;
    /* Adjust as needed */
    object-fit: contain;
}

/* Research Activity for Summaries */
.research-activity-container {
    margin-bottom: 15px;
    width: 100%;
}

.modal-body .research-activity {
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease-in-out;
}

.modal-body .research-activity.searching {
    background-color: rgba(var(--theme-color-rgb), 0.08);
    border-left: 3px solid rgba(var(--theme-color-rgb), 0.6);
}

.modal-body .research-activity-icon {
    margin-right: 10px;
    font-size: 1.1rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body .research-activity.searching .research-activity-icon {
    color: var(--theme-color);
}


.modal-body .research-activity-text {
    flex: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-actions-bar .delete-button:not(:disabled) {
    color: #e53935;
}

@media (max-width: 768px) {
    .file-actions-bar {
        padding: 10px;
    }

    .file-actions-bar .selection-counter {
        font-size: 13px;
        margin-right: 10px;
    }

    .file-actions-bar button {
        padding: 6px 10px;
    }
}

/* Files search input styling */
.files-search-container {
    margin-bottom: 15px;
    width: 100%;
}

.files-search {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-fourth);
    border-radius: 4px;
    overflow: hidden;
    background: var(--primary);
    transition: all 0.3s ease;
}

.files-search:focus-within {
    border-color: var(--theme-color);
    box-shadow: 0 0 5px rgba(var(--theme-color-rgb), 0.3);
}

.files-search-input {
    flex: 1;
    border: none;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--text-secondary);
    background: transparent;
    outline: none;
}

.files-search-button {
    background: transparent;
    border: none;
    padding: 8px 12px;
    color: var(--text-third);
    cursor: pointer;
    transition: all 0.2s ease;
}

.files-search-button:hover {
    color: var(--theme-color);
}

@media (max-width: 768px) {
    .files-search {
        margin-bottom: 10px;
    }

    .files-search-input {
        font-size: 13px;
    }
}

.downloadUI .form-check-label::before {
    font-family: "anticon" !important;
    content: "\e664";
    /* Default file icon */
    margin-right: 12px;
    font-size: 20px;
    color: var(--text-theme-color);
    display: inline-block;
    width: 24px;
    text-align: center;
}

/* Update files search styling */
.files-search-container {
    margin-bottom: 15px;
    width: 100%;
    padding: 0 5px;
}

.files-search {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-fourth);
    border-radius: 4px;
    overflow: hidden;
    background: var(--primary);
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.files-search:focus-within {
    border-color: var(--theme-color);
    box-shadow: 0 0 5px rgba(var(--theme-color-rgb), 0.3);
}

.files-search-input {
    flex: 1;
    border: none;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-secondary);
    background: transparent;
    outline: none;
}

.files-search-button {
    background: transparent;
    border: none;
    padding: 8px 12px;
    color: var(--text-third);
    cursor: pointer;
    transition: all 0.2s ease;
}

.files-search-button:hover {
    color: var(--theme-color);
}

@media (max-width: 768px) {
    .files-search {
        margin-bottom: 10px;
    }

    .files-search-input {
        font-size: 13px;
        padding: 8px 10px;
    }
}

.downloadUI .form-check-label::before {
    font-family: "anticon" !important;
    content: "\e664";
    /* Default file icon */
    margin-right: 12px;
    font-size: 20px;
    color: var(--text-theme-color);
    display: inline-block;
    width: 24px;
    text-align: center;
}

/* Promotion Banner Styles */
#promo-banner {
    z-index: 1025;
    transition: all 0.3s ease;
    background-color: var(--theme-color) !important;
    color: white !important;
    border-bottom: 1px solid var(--border-fourth);
    position: relative;
}

.promo-dismiss-button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: white;
    font-size: 16px;
    padding: 5px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.promo-dismiss-button:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 576px) {
    .promo-dismiss-button {
        position: absolute;
        top: 5px;
        right: 5px;
        transform: none;
    }
}

.promo-banner-content span {
    margin-bottom: 5px;
}

.visual-countdown span {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 2px 5px;
    border-radius: 3px;
    margin: 0 2px;
    font-weight: bold;
    color: white;
}

.promo-cta-button {
    animation: pulse 2s infinite;
    background-color: white !important;
    border-color: white !important;
    color: var(--theme-color) !important;
}

.promo-cta-button:hover {
    filter: brightness(90%);
    color: var(--theme-color) !important;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* Enhanced Modal Promotion Box Styles */
.promotion-highlight-box {
    background-color: var(--primary) !important;
    border-color: var(--theme-color) !important;
    color: var(--text-secondary) !important;
    border-width: 2px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}


/* Custom Chat Instructions Card */
#chatInstructionsCard {
    background: var(--primary) !important;
    border: 1px solid rgba(var(--theme-color-rgb, 0, 110, 255), 0.25);
    border-radius: 16px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

#chatInstructionsCard .card-body {
    background: linear-gradient(135deg, rgba(var(--theme-color-rgb, 0, 110, 255), 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-radius: 16px;
    position: relative;
    padding: 20px 24px;
}

body.darkmode #chatInstructionsCard .card-body {
    background: linear-gradient(135deg, rgba(var(--theme-color-rgb, 0, 110, 255), 0.16) 0%, rgba(255, 255, 255, 0.04) 100%);
}

#chatInstructionsCard .card-body::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    pointer-events: none;
}

.chat-instructions-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--text-secondary);
}

.chat-instructions-header i {
    font-size: 20px;
    color: var(--theme-color);
}

#chatCustomInstructions {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    border: 1px solid rgba(var(--theme-color-rgb, 0, 110, 255), 0.25);
    min-height: 110px;
    resize: vertical;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.darkmode #chatCustomInstructions {
    background: rgba(18, 22, 33, 0.7);
    color: var(--text-primary);
    box-shadow: inset 0 1px 8px rgba(0, 0, 0, 0.45);
}

#chatCustomInstructions:focus {
    border-color: var(--theme-color);
    box-shadow: 0 0 0 4px rgba(var(--theme-color-rgb, 0, 110, 255), 0.12);
    background: rgba(255, 255, 255, 0.95);
}

body.darkmode #chatCustomInstructions:focus {
    background: rgba(18, 22, 33, 0.9);
}

.highlight-custom-instructions {
    animation: customInstructionsPulse 1.2s ease-in-out 0s 3;
    box-shadow: 0 0 0 4px rgba(var(--theme-color-rgb, 0, 110, 255), 0.25), 0 14px 28px rgba(17, 24, 39, 0.18);
    border-color: var(--theme-color);
}

body.darkmode .highlight-custom-instructions {
    box-shadow: 0 0 0 4px rgba(var(--theme-color-rgb, 0, 110, 255), 0.35), 0 18px 34px rgba(0, 0, 0, 0.55);
}

@keyframes customInstructionsPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.01);
    }

    100% {
        transform: scale(1);
    }
}

.chat-instructions-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.chat-instructions-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-instructions-primary {
    display: flex;
    gap: 8px;
}

.chat-instructions-primary .btn-primary {
    background: var(--theme-color);
    border-color: var(--theme-color);
    color: #fff;
    border-radius: 999px;
    padding: 8px 18px;
    font-weight: 600;
    box-shadow: 0 8px 18px rgba(var(--theme-color-rgb, 0, 110, 255), 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.chat-instructions-primary .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(var(--theme-color-rgb, 0, 110, 255), 0.32);
}

.chat-instructions-primary .btn-outline-secondary {
    border-radius: 999px;
    padding: 8px 18px;
}

.chat-instructions-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(var(--theme-color-rgb, 0, 110, 255), 0.12);
    color: var(--theme-color);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

body.darkmode .chat-instructions-chip {
    background: rgba(var(--theme-color-rgb, 0, 110, 255), 0.2);
    color: #fff;
}

#chatInstructionsStatus {
    border-radius: 12px;
    padding: 12px 14px;
}

.chat-instructions-disabled #chatCustomInstructions,
.chat-instructions-disabled .chat-instructions-primary .btn,
.chat-instructions-disabled .chat-instructions-meta {
    opacity: 0.55;
    pointer-events: none;
}

.chat-instructions-disabled .chat-instructions-primary .btn {
    box-shadow: none;
}

.chat-instructions-disabled-message {
    margin-bottom: 14px;
    border-radius: 12px;
    font-size: 0.9rem;
}

body.darkmode .chat-instructions-disabled-message {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    color: var(--text-primary);
}

.custom-instructions-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(var(--theme-color-rgb, 0, 110, 255), 0.18);
    color: var(--theme-color);
    box-shadow: inset 0 0 0 1px rgba(var(--theme-color-rgb, 0, 110, 255), 0.45);
}

body.darkmode .custom-instructions-indicator {
    background: rgba(var(--theme-color-rgb, 0, 110, 255), 0.32);
    color: #fff;
}

@media (max-width: 768px) {
    .chat-instructions-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .chat-instructions-primary {
        width: 100%;
        justify-content: flex-end;
    }

    .chat-instructions-primary .btn {
        flex: 1;
        text-align: center;
    }
}


.promo-discount-amount {
    color: var(--theme-color);
    font-weight: bold;
    font-size: 1.1em;
}

.promo-coupon-code {
    background-color: rgba(var(--theme-color-rgb), 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: var(--theme-color) !important;
    border: 1px solid rgba(var(--theme-color-rgb), 0.3);
}

.visual-countdown-modal span {
    background-color: var(--theme-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    margin: 0 3px;
    font-weight: bold;
    font-size: 1.2em;
    min-width: 40px;
    display: inline-block;
    text-align: center;
}

/* Highlighted "Adquirir Plan" Button Styles */
.adquire-plan.promo-active {
    position: relative;
    overflow: visible;
    background-color: var(--theme-color) !important;
    border-color: var(--theme-color) !important;
    color: white !important;
    animation: pulse-subtle 2.5s infinite;
}

.adquire-plan.promo-active:hover {
    background-color: var(--theme-hover-color, var(--theme-color)) !important;
    filter: brightness(90%);
    color: white !important;
}

.adquire-plan.promo-active::after {
    content: '¡Oferta!';
    position: absolute;
    top: -10px;
    right: -15px;
    background-color: var(--primary);
    color: var(--theme-color);
    padding: 2px 6px;
    font-size: 0.7em;
    border-radius: 4px;
    font-weight: bold;
    transform: rotate(15deg);
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    z-index: 1;
    border: 1px solid var(--theme-color);
}

@keyframes pulse-subtle {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(var(--theme-color-rgb), 0.4);
    }

    50% {
        transform: scale(1.03);
        box-shadow: 0 0 0 4px rgba(var(--theme-color-rgb), 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(var(--theme-color-rgb), 0);
    }
}

/* Visual Cue in Profile Dropdown */
.promo-tag {
    display: inline-block;
    background-color: var(--theme-color);
    color: white;
    font-size: 0.65em;
    border-radius: 3px;
    margin-left: 1px;
    font-weight: bold;
    vertical-align: middle;
}

.promo-tag::before {
    content: '🔥';
}


@media (max-width: 768px) {
    .files-search {
        margin-bottom: 10px;
    }
}

@media (max-width: 768px) {
    .img-responsive-discount {
        width: 100% !important;
    }
}

/* Unpaid Invoices Banner Styles */
#unpaid-invoices-banner {
    z-index: 1030;
    transition: all 0.3s ease;
    background-color: #dc3545 !important;
    color: white !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.unpaid-invoices-dismiss-button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: white;
    font-size: 16px;
    padding: 5px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.unpaid-invoices-dismiss-button:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 576px) {
    .unpaid-invoices-dismiss-button {
        position: absolute;
        top: 5px;
        right: 5px;
        transform: none;
    }
}

.unpaid-invoices-banner-content span {
    margin-bottom: 5px;
}

.unpaid-invoices-cta-button {
    animation: pulse-urgent 2s infinite;
    background-color: white !important;
    border-color: white !important;
    color: #dc3545 !important;
}

.unpaid-invoices-cta-button:hover {
    filter: brightness(90%);
    color: #dc3545 !important;
    background-color: #f8f9fa !important;
}

@keyframes pulse-urgent {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* Slide Template Selection Styles */
.slide-templates-container {
    margin-top: 15px;
    /* Constrain height and enable in-place scrolling for large template sets */
    max-height: 60vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    /* prevent scrollbar from overlapping content */
    -webkit-overflow-scrolling: touch;
}

/* Template count badge styling */
#slideTemplatesSection label.form-label .templates-count-row,
#vidpod-slideTemplatesSection label.form-label .templates-count-row {
    margin-top: 6px;
}

#slideTemplatesSection .templates-count-badge,
#vidpod-slideTemplatesSection .templates-count-badge {
    background-color: var(--theme-color);
    color: #fff;
}

.slide-template-card,
.vidpod-slide-template-card {
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    background-color: var(--panel-color);
}

.slide-template-card:hover,
.vidpod-slide-template-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.slide-template-card.selected,
.vidpod-slide-template-card.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color), 0 8px 16px rgba(0, 0, 0, 0.15);
}

.template-thumbnail {
    position: relative;
    padding-top: 56.25%;
    /* 16:9 aspect ratio */
    overflow: hidden;
    background-color: #f5f5f5;
}

.template-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 70%, rgba(0, 0, 0, 0.03) 100%);
    z-index: 1;
    pointer-events: none;
}

.template-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.slide-template-card:hover .template-thumbnail img,
.vidpod-slide-template-card:hover .template-thumbnail img {
    transform: scale(1.08);
}

.template-info {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.template-info h6 {
    margin: 0 0 8px 0;
    font-weight: 700;
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.2;
    transition: color 0.2s ease;
}

.slide-template-card:hover .template-info h6,
.vidpod-slide-template-card:hover .template-info h6 {
    color: var(--primary-color);
}

.template-info p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary-color);
    line-height: 1.4;
}

/* Selected indicator */
.slide-template-card.selected::after,
.vidpod-slide-template-card.selected::after {
    content: "✓";
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-color);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    animation: pulse-scale 0.3s ease-out;
}

@keyframes pulse-scale {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Enhanced focus state */
.slide-template-card:focus,
.vidpod-slide-template-card:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.4), 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Responsiveness for different screen sizes */
@media (min-width: 992px) {
    .slide-templates-container .row {
        margin-left: -10px;
        margin-right: -10px;
    }

    .slide-templates-container [class*="col-"] {
        padding-left: 10px;
        padding-right: 10px;
    }
}

@media (max-width: 991px) {

    .slide-template-card,
    .vidpod-slide-template-card {
        margin-bottom: 15px;
    }

    /* Slightly reduce height on smaller viewports */
    .slide-templates-container {
        max-height: 55vh;
    }

    .template-info h6 {
        font-size: 0.95rem;
    }

    .template-info p {
        font-size: 0.8rem;
    }
}

@media (max-width: 767px) {
    .slide-templates-container .row {
        margin-left: -8px;
        margin-right: -8px;
    }

    .slide-templates-container [class*="col-"] {
        padding-left: 8px;
        padding-right: 8px;
    }

    .template-info {
        padding: 12px;
    }

    .template-info p {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .slide-templates-container {
        max-height: 50vh;
    }
}

@media (max-width: 575px) {

    .slide-template-card,
    .vidpod-slide-template-card {
        margin-bottom: 10px;
    }

    .slide-template-card.selected::after,
    .vidpod-slide-template-card.selected::after {
        width: 24px;
        height: 24px;
        top: 8px;
        right: 8px;
        font-size: 0.9rem;
    }

    .template-info {
        padding: 10px;
    }

    .template-info h6 {
        font-size: 0.9rem;
        margin-bottom: 4px;
    }

    .template-info p {
        font-size: 0.7rem;
        line-height: 1.2;
    }
}

/* Video Podcast Soundtrack Styles */
.soundtrack-selection {
    border-radius: 8px;
    padding: 12px;
    background-color: rgba(var(--bs-primary-rgb), 0.05);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.1);
    transition: all 0.3s ease;
}

.soundtrack-selection:hover {
    border-color: rgba(var(--bs-primary-rgb), 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.soundtrack-selection select {
    border-radius: 6px;
    border: 1px solid rgba(var(--bs-primary-rgb), 0.2);
    transition: all 0.2s ease;
}

.soundtrack-selection select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

#previewSoundtrackBtn {
    border-radius: 6px;
    transition: all 0.2s ease;
    border: 1px solid rgba(var(--bs-primary-rgb), 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#previewSoundtrackBtn:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    border-color: rgba(var(--bs-primary-rgb), 0.5);
}

#previewSoundtrackBtn[data-playing="true"] {
    background-color: var(--bs-primary);
    color: #fff;
    border-color: var(--bs-primary);
}

#previewSoundtrackBtn .anticon {
    font-size: 1.2em;
    line-height: 1;
}

.darkmode .soundtrack-selection {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.darkmode .soundtrack-selection:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.darkmode .soundtrack-selection select {
    background-color: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.darkmode #previewSoundtrackBtn {
    border-color: rgba(255, 255, 255, 0.3);
}

.darkmode #previewSoundtrackBtn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 576px) {
    .soundtrack-selection .row {
        flex-direction: column;
    }

    .soundtrack-selection .col-7,
    .soundtrack-selection .col-5,
    .soundtrack-selection .col-sm-7,
    .soundtrack-selection .col-sm-5 {
        width: 100%;
    }

    #previewSoundtrackBtn {
        margin-top: 8px;
    }
}

.promo-tag {
    display: inline-flex;
}

/* Video Podcast Captions Checkbox */
#enableCaptionsCheckbox {
    cursor: pointer;
}

.form-check-label[for="enableCaptionsCheckbox"] {
    cursor: pointer;
    font-weight: 500;
}

.form-check-label[for="enableCaptionsCheckbox"] .anticon {
    margin-right: 4px;
    vertical-align: -1px;
}

.video-podcast-item .badge {
    font-size: 0.7rem;
    padding: 3px 6px;
    border-radius: 4px;
}

/* Tooltip styles for caption badges */
.video-podcast-item .badge[title] {
    cursor: pointer;
    /* Changed from help to pointer */
}

/* Style for when in dark mode */
.darkmode .form-check-label[for="enableCaptionsCheckbox"] {
    color: #e1e1e1;
}

/* Responsive styles */
@media (max-width: 576px) {
    .video-podcast-item .badge {
        padding: 2px 4px;
        font-size: 0.65rem;
    }
}

/* Video Podcast Loading Spinner */
#videoPodcastGeneratingContainer .spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: spin 1s infinite linear;
}

#videoPodcastGeneratingContainer .anticon-loading {
    font-size: 1.5rem;
    color: #f0ad4e;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Video Podcast Help Toggle */
#toggleVideoPodcastHelp {
    padding: 0.25rem 0.5rem;
    line-height: 1;
    font-size: 0.875rem;
    border-radius: 0.2rem;
    transition: all 0.2s ease;
}

#toggleVideoPodcastHelp:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

#videoPodcastHelpContent {
    transition: height 0.2s ease;
}

.darkmode #toggleVideoPodcastHelp {
    color: #f8f9fa;
    border-color: #6c757d;
}

.darkmode #toggleVideoPodcastHelp:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* --- Add Styles for Video Podcast Context Links --- */
.video-podcast-context-links .badge {
    font-size: 0.75rem;
    padding: 0.3em 0.6em;
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
    display: inline-flex;
    /* Use inline-flex for icon alignment */
    align-items: center;
    gap: 4px;
    /* Space between icon and text */
    max-width: 100%;
    /* Prevent badges from overflowing individually IF they were block/flex items, but not needed for inline-flex wrapping */
    /* Remove properties preventing wrapping */
    /* overflow: hidden; */
    /* text-overflow: ellipsis; */
    white-space: normal;
    /* Allow text wrapping */
    word-break: break-word;
    /* Help break long words if necessary */
    text-align: left;
    /* Ensure text aligns left when wrapped */
    line-height: 1.3;
    /* Adjust line height for wrapped text */
}

.video-podcast-context-links .badge:hover {
    background-color: var(--theme-color) !important;
    /* Use theme color on hover */
    color: white !important;
    transform: translateY(-1px);
    /* Slight lift effect */
}

.video-podcast-context-links .badge .anticon {
    font-size: 0.9em;
    /* Adjust icon size relative to badge text */
    line-height: 1;
    /* Ensure icon is vertically centered */
}

/* Dark mode specific styles for context links */
.darkmode .video-podcast-context-links .badge {
    background-color: var(--border-fourth) !important;
    color: var(--text-third) !important;
}

.darkmode .video-podcast-context-links .badge:hover {
    background-color: var(--theme-color) !important;
    color: var(--text-primary) !important;
}


.video-podcast-item .d-flex.w-100 {
    margin-bottom: 0.5rem;
    /* Add some space before context */
}

/* --- End Added Styles --- */

/* --- Styles for Video Podcast History Responsiveness --- */
@media (max-width: 768px) {
    .video-podcast-item .d-flex.w-100 {
        flex-wrap: wrap;
        /* Allow items to wrap */
    }

    .video-podcast-item .flex-grow-1 {
        width: 100%;
        /* Take full width */
        margin-bottom: 0.5rem;
        /* Add space below title/instructions */
    }

    .video-podcast-item .video-podcast-actions {
        width: 100%;
        /* Take full width */
        justify-content: flex-start;
        /* Align buttons to the start */
        margin-left: 0 !important;
        /* Remove left margin when wrapped */
        margin-top: 0.5rem;
        /* Add space above buttons when wrapped */
        flex-wrap: wrap;
        /* Allow buttons to wrap */
        gap: 0.5rem;
        /* Add gap between buttons */
    }

    .video-podcast-item .video-podcast-actions .btn {
        margin-left: 0 !important;
        /* Remove individual button margins */
    }
}

@media (max-width: 480px) {
    .video-podcast-item .video-podcast-actions {
        justify-content: space-around;
        /* Distribute buttons more evenly on very small screens */
    }

    .video-podcast-item .video-podcast-actions .btn {
        /* Optional: Make buttons slightly larger for easier tapping */
        padding: 0.3rem 0.6rem;
        font-size: 0.9rem;
    }
}

/* --- End Video Podcast History Responsiveness Styles --- */

/* === Public Video Podcast Styles === */
.container-podcast {
    max-width: 900px;
    margin: 20px auto;
    background-color: var(--bg-color-secondary, #ffffff);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.podcast-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--theme-primary, #0d6efd);
    border-bottom: 2px solid var(--theme-primary, #0d6efd);
    padding-bottom: 10px;
}

.video-player {
    width: 100%;
    max-width: 100%;
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.details-section {
    margin-bottom: 25px;
}

.details-section h5 {
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-secondary, #555);
}

.details-section p,
.details-section ul {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color, #444);
}

.context-list {
    list-style: none;
    padding-left: 0;
}

.context-item {
    background-color: var(--bg-color-tertiary, #f1f3f5);
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.context-item .icon {
    margin-right: 8px;
    color: #6c757d;
}

.podcast-date {
    font-size: 0.9rem;
    color: var(--text-muted, #6c757d);
    text-align: right;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .podcast-title {
        font-size: 1.5rem;
    }

    .container-podcast {
        padding: 15px;
        margin: 10px;
    }
}

/* Audio Call Popup Styles */
.audio-call-modal {
    z-index: 999999 !important;
}

/* Voice Picker Overlay */
.vp-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    /* Ensure the overlay is above Bootstrap popovers and any modal header controls */
    z-index: 9999999999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.vp-container {
    background: var(--primary);
    color: var(--secondary);
    border-radius: .75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 920px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--fourth);
}

.vp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--fourth);
    background-color: var(--fourth);
}

.vp-title {
    margin: 0;
    font-size: 1.125rem;
}

.vp-tools {
    display: flex;
    gap: .75rem;
    align-items: center;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--fourth);
    flex-wrap: wrap;
}

.vp-tabs {
    display: inline-flex;
    gap: .5rem;
}

.vp-tabs .btn.active {
    background-color: var(--theme-color);
    color: #fff;
    border-color: var(--theme-color);
}

.vp-search {
    margin-left: auto;
}

.vp-search input[type="search"] {
    background: var(--primary);
    color: var(--secondary);
    border: 1px solid var(--fourth);
    border-radius: .5rem;
    padding: .5rem .75rem;
}

.vp-voices-grid {
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    overflow: auto;
}

.vp-voice-card {
    background: var(--primary);
    border: 1px solid var(--border-fourth);
    border-radius: .5rem;
    padding: .75rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.vp-voice-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    border-color: var(--theme-color);
}

.vp-voice-card.selected {
    border-color: var(--theme-color);
    box-shadow: 0 0 0 2px rgba(var(--theme-color-rgb), 0.25);
}

.vp-voice-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 600;
}

.vp-flag {
    opacity: .85;
}

.vp-voice-meta {
    font-size: .85rem;
    color: var(--third);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Gender-specific styling */
.vp-gender-male {
    color: #3b82f6 !important;
    /* Blue color for male */
}

.vp-gender-female {
    color: #ec4899 !important;
    /* Pink color for female */
}

.vp-gender-male .anticon {
    color: #3b82f6;
}

.vp-gender-female .anticon {
    color: #ec4899;
}

/* Gender filter tabs styling */
.vp-tabs .vp-gender-male {
    border-color: #3b82f6;
    color: #3b82f6;
}

.vp-tabs .vp-gender-male:hover {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #3b82f6;
}

.vp-tabs .vp-gender-male.active {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.vp-tabs .vp-gender-female {
    border-color: #ec4899;
    color: #ec4899;
}

.vp-tabs .vp-gender-female:hover {
    background-color: rgba(236, 72, 153, 0.1);
    border-color: #ec4899;
    color: #ec4899;
}

.vp-tabs .vp-gender-female.active {
    background-color: #ec4899;
    border-color: #ec4899;
    color: white;
}

.vp-actions {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    gap: .5rem;
}

.vp-empty {
    text-align: center;
    color: var(--third);
    width: 100%;
}

.vp-section-header {
    grid-column: 1 / -1;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 1.5rem 0 0.75rem 0;
    padding: 0.5rem 0;
    border-bottom: 2px solid var(--border-fourth);
    position: relative;
}

.vp-section-header:first-child {
    margin-top: 0;
}

.vp-country-header {
    grid-column: 1 / -1;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-third);
    margin: 1rem 0 0.5rem 0;
    padding: 0.25rem 0;
    border-bottom: 1px solid var(--border-fourth);
    position: relative;
    padding-left: 1rem;
}

.vp-country-header::before {
    content: "🌍";
    margin-right: 0.5rem;
}

@media (max-width: 992px) {
    .vp-voices-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    .vp-voices-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

/* Voice Picker – Enhanced theme styling */
.vp-overlay {
    backdrop-filter: blur(2px);
}

.vp-container {
    background: var(--primary);
    border: 1px solid var(--border-fourth);
    box-shadow: 0 12px 30px rgba(var(--theme-black-rgb), 0.25);
}

.vp-header {
    background: linear-gradient(90deg, rgba(var(--theme-color-rgb), 0.08), transparent), var(--fourth);
}

.vp-title {
    color: var(--text-secondary);
}

.vp-header .vp-close {
    border: 1px solid var(--border-fourth);
    background: transparent;
    color: var(--text-secondary);
}

.vp-header .vp-close:hover {
    background: rgba(var(--theme-color-rgb), 0.12);
    color: var(--theme-color);
    border-color: var(--theme-color);
}

.vp-tabs .btn {
    background: var(--primary);
    color: var(--text-secondary);
    border: 1px solid var(--border-fourth);
}

.vp-tabs .btn:hover {
    background: rgba(var(--theme-color-rgb), 0.08);
    color: var(--theme-color);
    border-color: var(--theme-color);
}

.vp-tabs .btn.active {
    background: var(--theme-color);
    color: var(--theme-white);
    border-color: var(--theme-color);
}

.vp-search input[type="search"]::placeholder {
    color: var(--text-third);
}

.vp-search input[type="search"]:focus {
    outline: none;
    border-color: var(--theme-color);
    box-shadow: 0 0 0 3px rgba(var(--theme-color-rgb), 0.18);
}

.vp-voice-card {
    border: 1px solid var(--border-fourth);
    background: var(--primary);
    position: relative;
}

.vp-voice-card:hover {
    border-color: var(--theme-color);
}

.vp-voice-card.selected {
    border-color: var(--theme-color);
    box-shadow: 0 0 0 2px rgba(var(--theme-color-rgb), 0.25);
}

.vp-voice-card.excluded {
    opacity: 0.6;
    background: rgba(var(--theme-black-rgb), 0.05);
    border-color: var(--border-fourth);
    cursor: not-allowed;
}

.vp-voice-card.excluded:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border-fourth);
}

.vp-voice-card.excluded .vp-voice-title .vp-name {
    color: var(--text-third);
}

.vp-voice-card.excluded .vp-voice-meta {
    color: var(--text-third);
}

.vp-voice-card.selected::after {
    content: "\2713";
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--theme-color);
    color: var(--theme-white);
    font-size: 12px;
    box-shadow: 0 2px 6px rgba(var(--theme-black-rgb), 0.25);
}

.vp-voice-title .vp-name {
    color: var(--text-secondary);
}

.vp-voice-meta {
    color: var(--text-third);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vp-actions .btn {
    border-radius: 8px;
}

/* Ensure preview button follows theme nicely */
.vp-actions .vp-preview {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-fourth);
}

.vp-actions .vp-preview:hover {
    background: rgba(var(--theme-color-rgb), 0.08);
    color: var(--theme-color);
    border-color: var(--theme-color);
}

.vp-actions .vp-preview[aria-pressed="true"] {
    background: rgba(var(--theme-color-rgb), 0.18);
    color: var(--theme-color);
    border-color: var(--theme-color);
}

/* Fix and enhance primary choose button contrast in all themes */
.vp-container .btn-primary,
.vp-actions .vp-choose {
    background: var(--theme-color) !important;
    border-color: var(--theme-color) !important;
    color: var(--theme-white) !important;
    box-shadow: 0 4px 10px rgba(var(--theme-black-rgb), 0.12);
}

.vp-container .btn-primary:hover,
.vp-actions .vp-choose:hover {
    background: var(--theme-color) !important;
    border-color: var(--theme-color) !important;
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(var(--theme-black-rgb), 0.2);
}

.vp-container .btn-primary:active,
.vp-actions .vp-choose:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(var(--theme-black-rgb), 0.15);
}

.vp-container .btn-primary:disabled,
.vp-actions .vp-choose:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(var(--theme-black-rgb), 0.1);
}

.vp-actions .btn .anticon {
    color: currentColor;
}

.vp-flag {
    filter: saturate(1.1);
}

.vp-voices-grid::-webkit-scrollbar-thumb {
    background: rgba(var(--theme-color-rgb), 0.35);
}

.vp-voices-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--theme-color-rgb), 0.5);
}

/* Video Podcast and Slides Generator History Item Styling */
.video-podcast-item,
.slides-generator-item {
    background-color: var(--primary);
    /* Ensure background for each item */
    border: 1px solid var(--border-fourth) !important;
    /* Override list-group border */
    border-radius: 8px !important;
    /* More pronounced rounding for card look */
    margin-bottom: 15px !important;
    /* Space between cards */
    padding: 15px !important;
    /* Internal padding for content */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.07);
    /* Soft shadow for depth */
}

/* Remove margin from the last item in the list */
.video-podcast-item:last-child,
.slides-generator-item:last-child {
    margin-bottom: 0 !important;
}

/* Increase height and add padding for history containers */
#video-podcasts-history,
#slides-generator-history {
    max-height: 60vh;
    /* Display more items before scrolling (60% of viewport height) */
    overflow-y: auto;
    /* Enable scrolling when content exceeds max-height */
    padding: 10px;
    /* Padding around the group of history cards */
}

.interrupcion-text {
    background-color: #fef3c7;
    color: #92400e;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #f59e0b;
    font-size: 0.875rem;
    display: inline-block;
    margin: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Add hover effect */
.research-activity:hover {
    background-color: rgba(var(--theme-color-rgb), 0.05);
}

/* Research Activity History Styles */
.research-history-section {
    margin-bottom: 1rem;
    background: linear-gradient(135deg, rgba(var(--theme-color-rgb), 0.03) 0%, rgba(var(--theme-color-rgb), 0.01) 100%);
    border-radius: 12px;
    border: 1px solid rgba(var(--theme-color-rgb), 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.research-history-section:hover {
    border-color: rgba(var(--theme-color-rgb), 0.2);
    box-shadow: 0 2px 8px rgba(var(--theme-color-rgb), 0.1);
}

.research-history-header {
    position: relative;
}

.research-history-toggle {
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.research-history-toggle .research-history-title+.research-history-count {
    margin-left: 4px;
}

.research-history-toggle .collapse-icon {
    margin-left: auto;
}

.research-history-toggle:hover {
    background: rgba(var(--theme-color-rgb), 0.05);
    color: var(--theme-color);
}

.research-history-toggle.active {
    background: rgba(var(--theme-color-rgb), 0.08);
    color: var(--theme-color);
}

.research-history-title {
    font-weight: 600;
    text-align: left;
}

.research-history-count {
    background: var(--theme-color);
    color: var(--text-primary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.collapse-icon {
    transition: transform 0.3s ease;
    font-size: 14px;
}

.collapse-icon.rotated {
    transform: rotate(180deg);
}

.research-history-content {
    padding: 16px;
    border-top: 1px solid rgba(var(--theme-color-rgb), 0.1);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }

    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 500px;
    }
}

.research-history-navigator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 8px 12px;
    background: rgba(var(--theme-color-rgb), 0.03);
    border-radius: 8px;
    border: 1px solid rgba(var(--theme-color-rgb), 0.1);
}

.nav-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: rgba(var(--theme-color-rgb), 0.1);
    color: var(--theme-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.nav-btn:hover:not(:disabled) {
    background: var(--theme-color);
    color: var(--text-primary-inverse);
    transform: scale(1.05);
}

.nav-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(var(--theme-color-rgb), 0.05);
}

.research-history-indicators {
    display: flex;
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
    justify-content: center;
    align-items: center;
    overflow-x: auto;
    padding: 4px 0;
    flex-wrap: wrap;
}

.research-history-indicators::-webkit-scrollbar {
    height: 6px;
}

.research-history-indicators::-webkit-scrollbar-thumb {
    background: rgba(var(--theme-color-rgb), 0.3);
    border-radius: 3px;
}

.history-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid rgba(var(--theme-color-rgb), 0.2);
    background: rgba(var(--theme-color-rgb), 0.1);
    flex-shrink: 0;
}

.history-indicator:hover {
    transform: scale(1.3);
    border-color: rgba(var(--theme-color-rgb), 0.5);
}

.history-indicator.active {
    background: var(--theme-color);
    border-color: var(--theme-color);
    transform: scale(1.6);
    box-shadow: 0 0 0 4px rgba(var(--theme-color-rgb), 0.2),
        0 0 15px var(--theme-color);
    animation: activePulse 2s ease-in-out infinite;
}

/* Enhanced active state with pulsing animation */
@keyframes activePulse {
    0% {
        box-shadow: 0 0 0 4px rgba(var(--theme-color-rgb), 0.2),
            0 0 15px var(--theme-color);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(var(--theme-color-rgb), 0.1),
            0 0 25px var(--theme-color);
    }

    100% {
        box-shadow: 0 0 0 4px rgba(var(--theme-color-rgb), 0.2),
            0 0 15px var(--theme-color);
    }
}

/* Add a white dot in the center of active indicator */
.history-indicator.active::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.history-indicator.searching {
    background: #2196F3;
    border-color: #2196F3;
}

.history-indicator.reasoning {
    background: #4CAF50;
    border-color: #4CAF50;
}

.history-indicator.searching.active {
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.2),
        0 0 20px rgba(33, 150, 243, 0.6);
    animation: activeSearchingPulse 2s ease-in-out infinite;
}

.history-indicator.reasoning.active {
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.2),
        0 0 20px rgba(76, 175, 80, 0.6);
    animation: activeReasoningPulse 2s ease-in-out infinite;
}

/* Specific pulsing animations for different types */
@keyframes activeSearchingPulse {
    0% {
        box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.2),
            0 0 20px rgba(33, 150, 243, 0.6);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(33, 150, 243, 0.1),
            0 0 30px rgba(33, 150, 243, 0.8);
    }

    100% {
        box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.2),
            0 0 20px rgba(33, 150, 243, 0.6);
    }
}

@keyframes activeReasoningPulse {
    0% {
        box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.2),
            0 0 20px rgba(76, 175, 80, 0.6);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(76, 175, 80, 0.1),
            0 0 30px rgba(76, 175, 80, 0.8);
    }

    100% {
        box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.2),
            0 0 20px rgba(76, 175, 80, 0.6);
    }
}

/* Add number overlay for better identification */
.history-indicator::before {
    content: attr(data-index);
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--text-third);
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.history-indicator:hover::before,
.history-indicator.active::before {
    opacity: 1;
}

.history-indicator.active::before {
    color: var(--theme-color);
    font-weight: 600;
    font-size: 11px;
}

.research-activity-display {
    background: rgba(var(--theme-color-rgb), 0.02);
    border: 1px solid rgba(var(--theme-color-rgb), 0.1);
    border-radius: 10px;
    padding: 16px;
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.research-activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(var(--theme-color-rgb), 0.1);
}

.activity-type {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid;
}

.activity-type.searching {
    color: #2196F3;
    background: rgba(33, 150, 243, 0.1);
    border-color: rgba(33, 150, 243, 0.3);
}

.activity-type.reasoning {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.3);
}

.activity-type i {
    font-size: 14px;
}

.activity-timestamp {
    font-size: 0.8rem;
    color: var(--text-third);
    font-weight: 500;
    padding: 4px 8px;
    background: rgba(var(--theme-color-rgb), 0.05);
    border-radius: 6px;
    border: 1px solid rgba(var(--theme-color-rgb), 0.1);
}

.research-activity-message {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-secondary);
    max-height: 25vh !important;
    overflow-y: auto;
}

.research-activity-message p {
    margin-bottom: 0.5rem;
}

.research-activity-message p:last-child {
    margin-bottom: 0;
}

.research-activity-message strong {
    color: var(--theme-color);
    font-weight: 600;
}

.research-activity-message code {
    background: rgba(var(--theme-color-rgb), 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--theme-color);
    border: 1px solid rgba(var(--theme-color-rgb), 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .research-history-section {
        margin-left: -1rem;
        margin-right: -1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .research-history-toggle {
        padding: 14px 16px;
        font-size: 0.9rem;
    }

    .research-history-content {
        padding: 12px 16px;
    }

    .research-history-navigator {
        gap: 12px;
        padding: 6px 8px;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .research-history-indicators {
        gap: 8px;
    }

    .history-indicator {
        width: 16px;
        height: 16px;
    }

    .history-indicator.active {
        transform: scale(1.8);
    }

    .history-indicator.active::after {
        width: 6px;
        height: 6px;
    }

    .research-activity-display {
        padding: 12px;
    }

    .research-activity-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .activity-type {
        font-size: 0.85rem;
        padding: 3px 10px;
    }

    .activity-timestamp {
        font-size: 0.75rem;
        align-self: flex-end;
    }
}

/* Dark mode adjustments */
.darkmode .research-history-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border-color: rgba(255, 255, 255, 0.1);
}

.darkmode .research-history-section:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.darkmode .research-history-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
}

.darkmode .research-history-toggle.active {
    background: rgba(255, 255, 255, 0.08);
}

.darkmode .research-history-content {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.darkmode .research-history-navigator {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

.darkmode .research-activity-display {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.1);
}

.darkmode .research-activity-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.darkmode .activity-timestamp {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Animation for real-time updates */
.research-history-count {
    animation: countUpdate 0.3s ease-out;
}

@keyframes countUpdate {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
        background: #4CAF50;
    }

    100% {
        transform: scale(1);
    }
}

/* Accessibility improvements */
.research-history-toggle:focus,
.nav-btn:focus,
.history-indicator:focus {
    outline: 2px solid var(--theme-color);
    outline-offset: 2px;
}

/* Smooth transitions for all interactive elements */
.research-history-section * {
    transition: all 0.2s ease;
}

/* New research activity notification */
.research-history-section.new-activity {
    animation: newActivityPulse 0.6s ease-out;
}

@keyframes newActivityPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--theme-color-rgb), 0.4);
        border-color: rgba(var(--theme-color-rgb), 0.3);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(var(--theme-color-rgb), 0.1);
        border-color: var(--theme-color);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(var(--theme-color-rgb), 0);
        border-color: rgba(var(--theme-color-rgb), 0.1);
    }
}

/* Loading state for research history */
.research-history-loading {
    opacity: 0.7;
    pointer-events: none;
}

.research-history-loading .research-history-toggle::after {
    content: '';
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(var(--theme-color-rgb), 0.3);
    border-top: 2px solid var(--theme-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: translateY(-50%) rotate(0deg);
    }

    100% {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* Enhanced focus states for better accessibility */
.research-history-toggle:focus-visible {
    outline: 2px solid var(--theme-color);
    outline-offset: 2px;
    background: rgba(var(--theme-color-rgb), 0.05);
}

.history-indicator:focus-visible {
    outline: 2px solid var(--theme-color);
    outline-offset: 3px;
    transform: scale(1.3);
}

/* Better contrast for high contrast mode */
@media (prefers-contrast: high) {
    .research-history-section {
        border: 2px solid var(--theme-color);
    }

    .activity-type.searching {
        border-width: 2px;
    }

    .activity-type.reasoning {
        border-width: 2px;
    }

    .history-indicator {
        border-width: 3px;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {

    .research-history-section,
    .research-history-content,
    .research-activity-display,
    .history-indicator,
    .nav-btn,
    .collapse-icon {
        animation: none !important;
        transition: none !important;
    }

    .collapse-icon.rotated {
        transform: none;
    }

    .history-indicator:hover {
        transform: none;
    }

    .history-indicator.active {
        animation: none !important;
        /* Keep the visual distinction without animation */
        transform: scale(1.6);
        box-shadow: 0 0 0 6px rgba(var(--theme-color-rgb), 0.3),
            0 0 20px var(--theme-color);
    }
}

/* Image Preview Styling */

/* Reasoning during summary indicator */
.reasoning-during-summary-indicator {
    display: inline-block;
    margin-left: 8px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}

/* Scroll to reasoning button */
.scroll-to-reasoning-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--theme-color);
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
}

.scroll-to-reasoning-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.scroll-to-reasoning-btn i {
    font-size: 20px;
}

.scroll-to-reasoning-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* --- Custom overrides for search results DataTable --- */
.extracts-column {
    white-space: normal !important;
    /* allow wrapping */
    word-break: break-word;
    /* break long words if needed */
    max-width: 90vw;
    /* never exceed viewport width */
    min-width: 45vw;
    /* ensure readable width on small screens */
    overflow-wrap: anywhere;
}

@media (min-width: 768px) {
    .extracts-column {
        min-width: 35vw;
    }
}

/* Law relevance indicator dots */
.law-extract-entry {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.45rem;
    width: 100%;
}

.law-extract-entry .law-relevance-indicator {
    display: inline-block;
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    /* Keep the indicator always visible while scrolling extracts */
    position: -webkit-sticky;
    /* Safari */
    position: sticky;
    top: 0.25rem;
    margin-top: 0;
    /* avoid double offset with sticky top */
    z-index: 2;
    /* stay above extract text */
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.law-extract-entry .law-relevance-score {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.1rem;
    font-weight: 500;
}

.law-extract-entry .tooltip-element.extract {
    flex: 1;
    line-height: 1.45;
}

.law-extracts-container .search-cell-div {
    margin: 0.75rem 0;
}

.law-relevance-high {
    background-color: #16a34a;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.18);
}

.law-relevance-medium {
    background-color: #fbbf24;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.2);
}

.law-relevance-low {
    background-color: #f87171;
    box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.18);
}

@media (max-width: 576px) {
    .law-extract-entry {
        gap: 0.35rem;
    }

    .law-extract-entry .law-relevance-indicator {
        width: 0.55rem;
        height: 0.55rem;
        top: 0.2rem;
        /* slight offset on small screens */
    }

    .law-extract-entry .law-relevance-score {
        font-size: 0.7rem;
        margin-top: 0.05rem;
    }
}

/* Conversation History Styles */
.conversation-history {
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 12px;
    background: var(--body-bg, #fafafa);
    padding: 16px;
    margin-top: 12px;
}

.conversation-history-header {
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color, #e8e8e8);
}

.conversation-history-content {
    max-height: 500px;
    overflow-y: auto;
}

.conversation-turn {
    background: var(--primary, #ffffff);
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.conversation-turn:last-child {
    margin-bottom: 0;
}

.turn-header {
    background: var(--fourth, #f0f0f0);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    border-bottom: 1px solid var(--border-color, #e8e8e8);
}

.turn-number {
    font-weight: 600;
    color: var(--theme-color);
}

.turn-timestamp {
    color: var(--text-third, #888);
    margin-left: auto;
}

.turn-cancelled-badge {
    background: rgba(255, 77, 79, 0.1);
    color: #ff4d4f;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
}

.turn-content {
    padding: 12px;
}

.previous-user-message,
.previous-bot-response,
.no-bot-response {
    margin-bottom: 16px;
}

.previous-user-message:last-child,
.previous-bot-response:last-child,
.no-bot-response:last-child {
    margin-bottom: 0;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary, #666);
}

.message-header i {
    font-size: 14px;
}

.previous-user-message .message-header i {
    color: var(--theme-color);
}

.previous-bot-response .message-header i {
    color: var(--secondary, #52c41a);
}

.no-bot-response .message-header i {
    color: var(--text-third, #888);
}

.response-cancelled {
    color: #ff4d4f;
    font-size: 10px;
    font-weight: normal;
}

.message-content {
    background: var(--fourth, #f9f9f9);
    padding: 10px 12px;
    border-radius: 6px;
    border-left: 3px solid var(--border-color, #e8e8e8);
    font-size: 14px;
    line-height: 1.5;
}

.previous-user-message .message-content {
    border-left-color: var(--theme-color);
}

.previous-bot-response .message-content {
    border-left-color: var(--secondary, #52c41a);
}

.research-activity-summary {
    margin-top: 8px;
    padding: 6px 10px;
    background: rgba(var(--theme-color-rgb), 0.05);
    border-radius: 4px;
}

.research-header {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--theme-color);
}

.research-header i {
    font-size: 12px;
}

/* Dark mode adjustments */
.darkmode .conversation-history {
    background: var(--body-bg-dark, #1a1a1a);
    border-color: var(--border-color-dark, #333);
}

.darkmode .turn-header {
    background: var(--fourth-dark, #2a2a2a);
    border-color: var(--border-color-dark, #333);
}

.darkmode .conversation-turn {
    background: var(--primary-dark, #1f1f1f);
    border-color: var(--border-color-dark, #333);
}

.darkmode .message-content {
    background: var(--fourth-dark, #262626);
    color: var(--text-primary-dark, #f0f0f0);
}

.darkmode .turn-cancelled-badge {
    background: rgba(255, 77, 79, 0.2);
    color: #ff7875;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .conversation-history {
        padding: 12px;
        margin-left: -20px;
        margin-right: -20px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .turn-header {
        padding: 6px 8px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .turn-timestamp {
        order: 3;
        margin-left: 0;
        width: 100%;
        margin-top: 4px;
    }

    .turn-content {
        padding: 8px;
    }

    .message-content {
        padding: 8px 10px;
        font-size: 13px;
    }

    .conversation-history-content {
        max-height: 400px;
    }
}

/* User Message Button Styles */
.user-message-btn {
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid transparent;
}

.user-message-btn:hover:not(.disabled) {
    background: rgba(var(--theme-color-rgb), 0.1);
    border-color: rgba(var(--theme-color-rgb), 0.2);
}

.user-message-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: var(--text-third, #888) !important;
}

.user-message-btn.disabled:hover {
    background: transparent !important;
    border-color: transparent !important;
}

.user-message-btn.edit-btn.disabled i {
    color: var(--text-third, #888) !important;
}

/* Dark mode adjustments for user message buttons */
.darkmode .user-message-btn:hover:not(.disabled) {
    background: rgba(var(--theme-color-rgb), 0.2);
    border-color: rgba(var(--theme-color-rgb), 0.3);
}

.darkmode .user-message-btn.disabled {
    color: var(--text-third-dark, #555) !important;
}

.darkmode .user-message-btn.edit-btn.disabled i {
    color: var(--text-third-dark, #555) !important;
}

/* Gaceta Oficial contained laws header */
.gaceta-contained-laws {
    background: var(--primary);
    border: 1px solid var(--border-fourth);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(var(--theme-black-rgb), 0.05);
}

.gaceta-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.gaceta-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    margin: 0;
}

.gaceta-title .anticon {
    color: var(--text-theme-color);
}

.gaceta-subtitle {
    color: var(--text-third);
    font-size: 0.95rem;
}

.gaceta-group {
    margin-top: 12px;
}

.gaceta-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.gaceta-group-title .badge {
    background: var(--theme-color);
    color: var(--text-primary);
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.75rem;
}

.gaceta-law-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

@media (max-width: 992px) {
    .gaceta-law-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .gaceta-law-grid {
        grid-template-columns: 1fr;
    }
}

.gaceta-law-card {
    border: 1px solid var(--border-fourth);
    background: var(--primary);
    border-radius: 8px;
    padding: 12px;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

.gaceta-law-card:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
    border-color: var(--border-theme-color);
}

.gaceta-law-title a {
    color: var(--text-secondary);
    font-weight: 600;
}

.gaceta-law-title a:hover {
    color: var(--text-theme-color);
}

.gaceta-law-epigrafe,
.gaceta-law-epigrafe2 {
    color: var(--text-third);
    font-size: 0.95rem;
    margin-top: 6px;
}

.gaceta-law-date {
    color: var(--text-third);
    font-size: 0.85rem;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.darkmode .gaceta-contained-laws {
    background: var(--primary);
    border-color: var(--border-fourth);
    box-shadow: none;
}

/* Linked Gaceta header for Venezuela */
.linked-gaceta-container {
    background: var(--primary);
    border: 1px solid var(--border-fourth);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(var(--theme-black-rgb), 0.05);
}

.linked-gaceta-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.linked-gaceta-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-weight: 600;
}

.linked-gaceta-title .anticon {
    color: var(--text-theme-color);
}

.linked-gaceta-epigrafe,
.linked-gaceta-epigrafe2 {
    color: var(--text-third);
}

.linked-gaceta-date {
    color: var(--text-third);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.linked-gaceta-actions {
    margin-top: 8px;
}

.linked-gaceta-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.gaceta-others {
    margin-top: 8px;
}

.gaceta-others-summary {
    cursor: pointer;
    padding: 8px 10px;
    border: 1px solid var(--border-fourth);
    border-radius: 8px;
    background: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--text-secondary);
}

.gaceta-others[open]>.gaceta-others-summary {
    border-color: var(--border-theme-color);
}

.darkmode .linked-gaceta-container {
    background: var(--primary);
    border-color: var(--border-fourth);
    box-shadow: none;
}

/* ----------------- Sync Modal (Opt-in + Migration) ----------------- */
.sync-modal {
    z-index: 1060;
}

.sync-modal .modal-content {
    border: 0;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(2px);
}

.sync-hero {
    background: linear-gradient(135deg, rgba(var(--theme-color-rgb), 0.08) 0%, rgba(58, 213, 180, 0.06) 100%);
    border-bottom: 1px solid var(--border-primary);
    padding: 2rem;
    position: relative;
}

.sync-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--theme-color), rgba(var(--theme-color-rgb), 0.6));
}

.sync-hero .modal-title {
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 1.4rem;
    margin: 0;
}

.sync-subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
    color: var(--text-third);
    line-height: 1.4;
    margin-top: 0.5rem;
}

.sync-hero-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(var(--theme-color-rgb), 0.15), rgba(var(--theme-color-rgb), 0.25));
    color: var(--theme-color);
    box-shadow: 0 6px 20px rgba(var(--theme-color-rgb), 0.25);
    position: relative;
    flex-shrink: 0;
}

.sync-hero-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1));
    pointer-events: none;
}

.sync-hero-icon .anticon {
    font-size: 26px;
    line-height: 1;
    z-index: 1;
}

.sync-modal .modal-body {
    padding: 2rem;
}

.sync-benefits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: rgba(var(--theme-color-rgb), 0.02);
    border-radius: 12px;
    border: 1px solid rgba(var(--theme-color-rgb), 0.08);
}

@media (max-width: 576px) {
    .sync-benefits {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.25rem;
    }
}

.sync-benefits .benefit {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.sync-benefits .benefit .anticon {
    color: var(--theme-color);
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Step indicator progress line */
.sync-steps-container {
    position: relative;
}

.sync-steps-progress {
    position: absolute;
    left: 20px;
    top: 50px;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--theme-color) 0%, rgba(var(--theme-color-rgb), 0.3) 50%, rgba(var(--theme-color-rgb), 0.1) 100%);
    z-index: 1;
}

.sync-step-card {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding: 1.75rem;
    border: 1px solid var(--border-fourth);
    border-radius: 14px;
    background: var(--primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    margin-bottom: 1rem;
}

.sync-step-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(var(--theme-color-rgb), 0.2);
}

.sync-step-card.active {
    border-color: var(--theme-color);
    box-shadow: 0 6px 20px rgba(var(--theme-color-rgb), 0.15);
}

.sync-step-card .step-number {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(var(--theme-color-rgb), 0.1), rgba(var(--theme-color-rgb), 0.2));
    color: var(--theme-color);
    font-weight: 700;
    font-size: 1.1rem;
    border: 2px solid rgba(var(--theme-color-rgb), 0.2);
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s ease;
}

.sync-step-card.active .step-number {
    background: var(--theme-color);
    color: white;
    transform: scale(1.1);
    border-color: var(--theme-color);
}

.sync-step-card.completed .step-number {
    background: #52c41a;
    color: white;
    border-color: #52c41a;
}

.sync-step-card.completed .step-number::after {
    content: '✓';
    position: absolute;
    font-size: 0.9rem;
}

.sync-step-card .step-content {
    flex: 1;
    min-width: 0;
}

.sync-step-card .step-content h6 {
    margin: 0 0 0.5rem 0;
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.sync-step-card .step-content p {
    color: var(--text-third);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.sync-step-card .code-input {
    max-width: 160px;
    letter-spacing: 0.3rem;
    text-align: center;
    font-weight: 600;
    border-radius: 8px;
    border: 2px solid var(--border-fourth);
    transition: all 0.2s ease;
}

.sync-step-card .code-input:focus {
    border-color: var(--theme-color);
    box-shadow: 0 0 0 3px rgba(var(--theme-color-rgb), 0.1);
    outline: none;
}

.sync-step-card .code-input.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Alert styling within modal */
.sync-modal .alert {
    border-radius: 8px;
    border: none;
    font-size: 0.9rem;
}

.sync-modal .alert-info {
    background: rgba(var(--theme-color-rgb), 0.1);
    color: var(--theme-color);
}

.sync-modal .alert-success {
    background: rgba(82, 196, 26, 0.1);
    color: #52c41a;
}

.sync-modal .alert-warning {
    background: rgba(250, 173, 20, 0.1);
    color: #faad14;
}

.sync-modal .alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.sync-step-card .btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(var(--theme-color-rgb), 0.2);
}

.sync-step-card .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--theme-color-rgb), 0.3);
}

.sync-step-card .btn .anticon {
    margin-right: 0.5rem;
}

/* Enhanced Progress Bar */
.sync-progress {
    margin-top: 1.5rem;
}

.sync-progress .progress {
    height: 12px;
    background: rgba(var(--theme-color-rgb), 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.sync-progress .progress-bar {
    background: linear-gradient(90deg, var(--theme-color), rgba(var(--theme-color-rgb), 0.8));
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.sync-progress .progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
    border-radius: 6px;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.sync-progress-text {
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 0.75rem;
}

.sync-progress-log {
    background: rgba(var(--theme-color-rgb), 0.02);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid rgba(var(--theme-color-rgb), 0.1);
    max-height: 200px;
    overflow-y: auto;
}

.sync-progress-log::-webkit-scrollbar {
    width: 6px;
}

.sync-progress-log::-webkit-scrollbar-thumb {
    background: rgba(var(--theme-color-rgb), 0.3);
    border-radius: 3px;
}

/* Enhanced Completion Section */
.sync-complete-header {
    background: linear-gradient(135deg, rgba(82, 196, 26, 0.1), rgba(82, 196, 26, 0.05));
    border: 1px solid rgba(82, 196, 26, 0.3);
    color: #52c41a;
    border-radius: 12px;
    padding: 1.25rem;
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.sync-complete-header .anticon {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.sync-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .sync-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .sync-stats-grid {
        grid-template-columns: 1fr;
    }
}

.sync-stat-card {
    background: var(--primary);
    border: 1px solid var(--border-fourth);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    display: grid;
    grid-template-areas: "icon value" "icon label";
    gap: 0.5rem 1rem;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.sync-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(var(--theme-color-rgb), 0.2);
}

.sync-stat-card .stat-icon {
    grid-row: 1 / span 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-color);
    font-size: 1.5rem;
    grid-area: icon;
}

.sync-stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-secondary);
    grid-area: value;
    align-self: end;
}

.sync-stat-card .stat-label {
    font-size: 0.85rem;
    opacity: 0.8;
    color: var(--text-third);
    grid-area: label;
    align-self: start;
}

/* Success animation for stats */
.sync-stat-card.animate-in {
    animation: statsSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes statsSlideIn {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Loading states and animations */
.sync-step-card.loading {
    pointer-events: none;
    opacity: 0.7;
}

.sync-step-card.loading .btn {
    position: relative;
}

.sync-step-card.loading .btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.sync-step-card.loading .btn span {
    visibility: hidden;
}

/* Footnote styling */
.sync-footnote {
    background: rgba(var(--theme-color-rgb), 0.05);
    border-left: 4px solid rgba(var(--theme-color-rgb), 0.3);
    padding: 1rem;
    border-radius: 8px;
    color: var(--text-third);
    font-size: 0.9rem;
    margin-top: 1rem;
}

.sync-modal .sync-footnote {
    margin-top: 1.25rem;
}

.sync-footnote .anticon {
    color: var(--theme-color);
    margin-right: 0.5rem;
}

/* Modal responsiveness */
@media (max-width: 768px) {
    .sync-modal .modal-dialog {
        margin: 1rem;
    }

    .sync-hero {
        padding: 1.5rem;
    }

    .sync-modal .modal-body {
        padding: 1.5rem;
    }

    .sync-step-card {
        padding: 1.5rem;
        gap: 1rem;
    }

    .sync-step-card .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .sync-step-card .step-content h6 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .sync-hero {
        padding: 1.25rem;
    }

    .sync-hero .modal-title {
        font-size: 1.2rem;
    }

    .sync-hero-icon {
        width: 48px;
        height: 48px;
    }

    .sync-hero-icon .anticon {
        font-size: 22px;
    }

    .sync-modal .modal-body {
        padding: 1.25rem;
    }

    .sync-step-card .code-input {
        max-width: 140px;
    }

    .sync-benefits {
        padding: 1rem;
    }
}

.sync-stat-card .stat-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.sync-stat-card .stat-label {
    font-size: .85rem;
    opacity: .8;
}

.sync-in-settings {
    background: var(--primary);
    border: 1px solid var(--border-fourth);
    border-radius: 12px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.sync-in-settings::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--theme-color), rgba(var(--theme-color-rgb), 0.6));
}

.sync-in-settings:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--border-theme-color);
}

.sync-in-settings .card-body {
    padding: 1.5rem;
}

.sync-in-settings .sync-badge {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--theme-color), rgba(var(--theme-color-rgb), 0.8));
    color: white;
    box-shadow: 0 4px 15px rgba(var(--theme-color-rgb), 0.3);
    position: relative;
}

.sync-in-settings .sync-badge::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1));
    pointer-events: none;
}

.sync-in-settings .sync-badge .anticon {
    font-size: 22px;
    line-height: 1;
    z-index: 1;
}

.sync-in-settings .sync-content h5 {
    margin: 0 0 0.25rem 0;
    font-weight: 600;
    color: var(--text-secondary);
}

.sync-in-settings .sync-description {
    color: var(--text-third);
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.sync-in-settings .sync-actions .btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(var(--theme-color-rgb), 0.2);
}

.sync-in-settings .sync-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--theme-color-rgb), 0.3);
}

/* Status indicator styles */
.sync-in-settings .sync-status {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #52c41a;
    box-shadow: 0 0 0 2px var(--primary), 0 0 8px rgba(82, 196, 26, 0.3);
}

.sync-in-settings .sync-status.disabled {
    background: #d9d9d9;
    box-shadow: 0 0 0 2px var(--primary);
}

.sync-in-settings .sync-status.pending {
    background: #faad14;
    box-shadow: 0 0 0 2px var(--primary), 0 0 8px rgba(250, 173, 20, 0.3);
    animation: pulse-sync 2s infinite;
}

@keyframes pulse-sync {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Feature highlight for sync */
.sync-in-settings.feature-new {
    position: relative;
}

.sync-in-settings.feature-new::after {
    content: 'Nuevo';
    position: absolute;
    top: -8px;
    right: 12px;
    background: #ff4d4f;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#sync-email-preview {
    color: var(--theme-color);
}

/* Dark mode fine-tuning */
.darkmode .sync-hero {
    background: linear-gradient(135deg, rgba(var(--theme-color-rgb), 0.12), rgba(58, 213, 180, 0.08));
}

.darkmode .sync-modal .modal-content {
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

.darkmode .sync-benefits {
    background: rgba(var(--theme-color-rgb), 0.05);
    border-color: rgba(var(--theme-color-rgb), 0.15);
}

.darkmode .sync-step-card {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.darkmode .sync-step-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.darkmode .sync-progress-log {
    background: rgba(var(--theme-color-rgb), 0.08);
    border-color: rgba(var(--theme-color-rgb), 0.2);
}

.darkmode .sync-footnote {
    background: rgba(var(--theme-color-rgb), 0.08);
    border-left-color: rgba(var(--theme-color-rgb), 0.4);
}

.darkmode .sync-stat-card {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.darkmode .sync-stat-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.darkmode .sync-complete-header {
    background: rgba(56, 158, 13, 0.12);
    border-color: rgba(183, 235, 143, 0.35);
    color: #95de64;
}

.darkmode .sync-step-card,
.darkmode .sync-stat-card {
    box-shadow: none;
}

/* Dark mode improvements for sync in settings */
.darkmode .sync-in-settings {
    background: var(--primary);
    border-color: var(--border-fourth);
}

.darkmode .sync-in-settings:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: var(--border-theme-color);
}

.darkmode .sync-in-settings .sync-badge {
    box-shadow: 0 4px 15px rgba(var(--theme-color-rgb), 0.4);
}

.darkmode .sync-in-settings .sync-content h5 {
    color: var(--text-primary);
}

.darkmode .sync-in-settings .sync-description {
    color: var(--text-third);
}

.darkmode .sync-in-settings .sync-actions .btn {
    box-shadow: 0 2px 8px rgba(var(--theme-color-rgb), 0.3);
}

.darkmode .sync-in-settings .sync-actions .btn:hover {
    box-shadow: 0 4px 12px rgba(var(--theme-color-rgb), 0.4);
}

.darkmode .sync-in-settings .sync-status {
    box-shadow: 0 0 0 2px var(--primary), 0 0 8px rgba(82, 196, 26, 0.4);
}

.darkmode .sync-in-settings .sync-status.disabled {
    background: #555;
    box-shadow: 0 0 0 2px var(--primary);
}

.darkmode .sync-in-settings .sync-status.pending {
    box-shadow: 0 0 0 2px var(--primary), 0 0 8px rgba(250, 173, 20, 0.4);
}

/* Responsive improvements for sync settings */
@media (max-width: 768px) {
    .sync-in-settings .card-body {
        padding: 1.25rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .sync-in-settings .sync-info {
        width: 100%;
    }

    .sync-in-settings .sync-actions {
        width: 100%;
    }

    .sync-in-settings .sync-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .sync-in-settings .card-body {
        padding: 1rem;
    }

    .sync-in-settings .sync-badge {
        width: 45px;
        height: 45px;
    }

    .sync-in-settings .sync-badge .anticon {
        font-size: 20px;
    }
}

/* Make stats and steps text use theme vars */
.sync-stat-card .stat-value {
    color: var(--text-secondary);
}

.sync-stat-card .stat-label {
    color: var(--text-third);
}

.sync-step-card p {
    color: var(--text-third);
}

.sync-refresh-page {
    margin: 10px;
}

/* 
 * Document references styling
 * Shared base styles for both single and grouped document references
 * Edit these properties to change the appearance of all document references
 */
.doc-reference,
.sources-group-trigger {
    align-items: center;
    gap: .35rem;
    padding: 0 .25rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 1px dashed var(--theme-color);
    color: var(--text-theme-color);
    line-height: 1.2;
    transition: all 0.2s ease;
}

.doc-reference:hover,
.doc-reference:focus,
.sources-group-trigger:hover,
.sources-group-trigger:focus {
    outline: none;
    color: var(--theme-color);
    border-bottom-color: var(--theme-color);
}

/* Single document reference specific styles */
.doc-reference {
    text-decoration: none;
}

.doc-reference:hover,
.doc-reference:focus {
    text-decoration: none;
}

/* Multi-source popup content */
.doc-details-popup .sources-group-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.doc-details-popup .sources-group-list.loading {
    opacity: .7;
}

.doc-details-popup .sources-group-item {
    border: 1px solid var(--border-fourth);
    border-radius: 10px;
    padding: .75rem 1rem;
    background: var(--body-bg);
    color: var(--text-secondary);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.doc-details-popup .sources-group-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
    gap: .75rem;
    flex-wrap: wrap;
    /* Allow wrapping to keep actions within bounds */
    color: var(--text-secondary);
}

.doc-details-popup .sources-group-item summary::-webkit-details-marker {
    display: none;
}

.doc-details-popup .sources-group-actions {
    display: flex;
    gap: .5rem;
    flex-shrink: 0;
    flex-wrap: wrap;
    /* Wrap buttons when tight on space */
    justify-content: flex-end;
    /* Keep them aligned to the right */
    width: 100%;
    /* Take full row when wrapped */
}

.doc-details-popup .sources-group-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    color: var(--text-secondary);
}

/* Relevant count badge */
.doc-details-popup .relevant-count {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: rgba(var(--theme-color-rgb), 0.1);
    color: var(--theme-color);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

/* View details button */
.doc-details-popup .view-details-button {
    background: transparent;
    border: 1px solid var(--border-fourth);
    color: var(--text-secondary);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.doc-details-popup .view-details-button:hover {
    background: rgba(var(--theme-primary-rgb), 0.12);
    border-color: var(--theme-primary);
    color: var(--theme-primary);
}

/* Update summary layout to support count display */
.doc-details-popup .sources-group-item summary {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.5rem;
    cursor: pointer;
    list-style: none;
    color: var(--text-secondary);
}

.doc-details-popup .sources-group-item summary .sources-group-title {
    grid-column: 1;
    grid-row: 1;
}

.doc-details-popup .sources-group-item summary .relevant-count {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
}

.doc-details-popup .sources-group-item summary .sources-group-actions {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    width: auto;
}

/* Grouped popup gets a slightly wider default to prevent overflow */
.doc-details-popup.grouped {
    box-sizing: border-box;
    max-width: 720px;
    width: min(90vw, 720px);
    min-width: 320px;
}

.darkmode .doc-details-popup {
    color: rgb(231, 231, 231);
}

.darkmode .doc-details-popup .sources-group-item {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.darkmode .doc-details-popup .view-details-button {
    border-color: rgba(255, 255, 255, 0.18);
    color: rgb(231, 231, 231);
}

.darkmode .doc-details-popup .view-details-button:hover {
    background: rgba(var(--theme-primary-rgb), 0.22);
    border-color: var(--theme-primary);
    color: var(--theme-primary);
}

.darkmode .doc-details-popup .relevant-count {
    background: rgba(var(--theme-primary-rgb), 0.25);
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .doc-details-popup .sources-group-item summary {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .doc-details-popup .sources-group-item summary .sources-group-actions {
        grid-column: 1;
        grid-row: 3;
        width: 100%;
        justify-content: flex-start;
    }
}
