html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

/* Default Light Mode */
body {
    background-color: #ffffff;
    color: #000000;
    transition: background-color 0.3s, color 0.3s;
}

    /* Dark Mode */
    body.dark-mode {
        background-color: #121212;
        color: #ffffff;
    }

/* Navbar */
.navbar {
    transition: background-color 0.3s, color 0.3s;
}

.dark-mode .navbar {
    background-color: #1e1e1e;
    color: #ffffff;
}

/* Links */
a {
    color: #007bff;
}

.dark-mode a {
    color: #90caf9;
}

/* Buttons */
.dark-mode .btn {
    background-color: #444;
    color: #fff;
}


/* theme  light and dark */

/* Default light theme */
.navbar {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    transition: all 0.3s ease;
}

/* Dark theme styles */
body.dark-mode .navbar {
    background: linear-gradient(135deg, #212529 0%, #343a40 100%) !important;
}

body.dark-mode .nav-link {
    color: #ffffff !important;
}

    body.dark-mode .nav-link:hover {
        color: #0d6efd !important;
    }

body.dark-mode .navbar-brand {
    color: #ffffff !important;
}

body.dark-mode .dropdown-menu {
    background-color: #343a40 !important;
    border-color: #495057 !important;
}

    body.dark-mode .dropdown-menu .form-control {
        background-color: #495057 !important;
        border-color: #6c757d !important;
        color: #ffffff !important;
    }

    body.dark-mode .dropdown-menu .input-group-text {
        background-color: #495057 !important;
        border-color: #6c757d !important;
        color: #ffffff !important;
    }

body.dark-mode .dropdown-header {
    color: #ffffff !important;
}

body.dark-mode .text-muted {
    color: #adb5bd !important;
}

body.dark-mode .btn-outline-secondary {
    border-color: #6c757d !important;
    color: #ffffff !important;
}

body.dark-mode .btn-outline-primary {
    border-color: #0d6efd !important;
    color: #0d6efd !important;
    background-color: transparent !important;
}
/* Dark theme form styles */
body.dark-mode {
    background-color: #212529 !important;
    color: #ffffff !important;
}

    /* Form elements */
    body.dark-mode .form-control {
        background-color: #343a40 !important;
        border-color: #495057 !important;
        color: #ffffff !important;
    }

        body.dark-mode .form-control:focus {
            background-color: #343a40 !important;
            border-color: #0d6efd !important;
            color: #ffffff !important;
            box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
        }

        body.dark-mode .form-control::placeholder {
            color: #adb5bd !important;
        }

    /* Form labels */
    body.dark-mode .form-label,
    body.dark-mode label {
        color: #ffffff !important;
    }

    /* Form select */
    body.dark-mode .form-select {
        background-color: #343a40 !important;
        border-color: #495057 !important;
        color: #ffffff !important;
    }

        body.dark-mode .form-select:focus {
            background-color: #343a40 !important;
            border-color: #0d6efd !important;
            color: #ffffff !important;
        }

    /* Input group text */
    body.dark-mode .input-group-text {
        background-color: #495057 !important;
        border-color: #6c757d !important;
        color: #ffffff !important;
    }

    /* Buttons */
    body.dark-mode .btn-primary {
        background-color: #0d6efd !important;
        border-color: #0d6efd !important;
    }

    body.dark-mode .btn-secondary {
        background-color: #6c757d !important;
        border-color: #6c757d !important;
    }

    body.dark-mode .btn-outline-primary {
        border-color: #0d6efd !important;
        color: #0d6efd !important;
    }

    body.dark-mode .btn-outline-secondary {
        border-color: #6c757d !important;
        color: #6c757d !important;
    }

    /* Cards */
    body.dark-mode .card {
        background-color: #343a40 !important;
        border-color: #495057 !important;
        color: #ffffff !important;
    }

    body.dark-mode .card-header {
        background-color: #495057 !important;
        border-color: #6c757d !important;
        color: #ffffff !important;
    }

    body.dark-mode .card-body {
        background-color: #343a40 !important;
        color: #ffffff !important;
    }

    /* Text colors */
    body.dark-mode h1,
    body.dark-mode h2,
    body.dark-mode h3,
    body.dark-mode h4,
    body.dark-mode h5,
    body.dark-mode h6 {
        color: #ffffff !important;
    }

    body.dark-mode p,
    body.dark-mode span,
    body.dark-mode div {
        color: #ffffff !important;
    }

    body.dark-mode .text-muted {
        color: #adb5bd !important;
    }

    body.dark-mode .text-dark {
        color: #ffffff !important;
    }

    /* Links */
    body.dark-mode a {
        color: #66b3ff !important;
    }

        body.dark-mode a:hover {
            color: #0d6efd !important;
        }

    /* Validation messages */
    body.dark-mode .text-danger {
        color: #dc3545 !important;
    }

    body.dark-mode .text-success {
        color: #198754 !important;
    }

    body.dark-mode .text-warning {
        color: #ffc107 !important;
    }

    body.dark-mode .text-info {
        color: #0dcaf0 !important;
    }

    body.dark-mode .about-section {
        background-color: #2c3137 !important; /* A slightly lighter dark background for this section */
        color: #e0e0e0 !important;
        border-top: 1px solid #444 !important; /* Adjust border color */
    }

    /* Alert messages */
    body.dark-mode .alert {
        border: 1px solid #495057 !important;
    }

    body.dark-mode .alert-primary {
        background-color: #1e3a5f !important;
        border-color: #2c5aa0 !important;
        color: #b3d7ff !important;
    }

    body.dark-mode .alert-success {
        background-color: #1a5a1a !important;
        border-color: #2d8f2d !important;
        color: #b3ffb3 !important;
    }

    body.dark-mode .alert-danger {
        background-color: #5a1a1a !important;
        border-color: #8f2d2d !important;
        color: #ffb3b3 !important;
    }

    body.dark-mode .alert-warning {
        background-color: #5a5a1a !important;
        border-color: #8f8f2d !important;
        color: #ffff99 !important;
    }

    /* Tables */
    body.dark-mode .table {
        color: #ffffff !important;
    }

    body.dark-mode .table-dark {
        --bs-table-bg: #343a40 !important;
        --bs-table-striped-bg: #3d444a !important;
        --bs-table-hover-bg: #404649 !important;
    }

    /* Modal */
    body.dark-mode .modal-content {
        background-color: #343a40 !important;
        border-color: #495057 !important;
    }

    body.dark-mode .modal-header {
        background-color: #495057 !important;
        border-color: #6c757d !important;
    }

    body.dark-mode .modal-title {
        color: #ffffff !important;
    }

    body.dark-mode .modal-body {
        color: #ffffff !important;
    }

    /* Checkbox and Radio */
    body.dark-mode .form-check-input:checked {
        background-color: #0d6efd !important;
        border-color: #0d6efd !important;
    }

    body.dark-mode .form-check-label {
        color: #ffffff !important;
    }

    /* Remember me, links etc */
    body.dark-mode .form-check-label,
    body.dark-mode .small,
    body.dark-mode small {
        color: #adb5bd !important;
    }

    /* Breadcrumb */
    body.dark-mode .breadcrumb {
        background-color: #343a40 !important;
    }

    body.dark-mode .breadcrumb-item {
        color: #adb5bd !important;
    }

        body.dark-mode .breadcrumb-item.active {
            color: #ffffff !important;
        }

    /* List group */
    body.dark-mode .list-group-item {
        background-color: #343a40 !important;
        border-color: #495057 !important;
        color: #ffffff !important;
    }

    /* Nav pills/tabs */
    body.dark-mode .nav-pills .nav-link {
        color: #adb5bd !important;
    }

        body.dark-mode .nav-pills .nav-link.active {
            background-color: #0d6efd !important;
            color: #ffffff !important;
        }

    /* Pagination */
    body.dark-mode .page-link {
        background-color: #343a40 !important;
        border-color: #495057 !important;
        color: #0d6efd !important;
    }

    body.dark-mode .page-item.active .page-link {
        background-color: #0d6efd !important;
        border-color: #0d6efd !important;
    }


    body.dark-mode .dew-nova-text {
        fill: #212529 !important;
    }

    body.dark-mode .dew-nova-circle {
        fill: whitesmoke !important;
    }

    body.dark-mode .productindex {
        color: whitesmoke !important;
        background-color: #212529 !important;
    }

    body.dark-mode .productindexTotal {
        background-color: black !important;
    }

    body.dark-mode .footer-social {
        /* dark-mode er bg color ata */
        background-color: #212529 !important;
    }

    body.dark-mode .logout {
        color: dodgerblue !important;
    }
 body.dark-mode .badgedfg {
        background-color: #212529 !important;
    }
    body.dark-mode .badgedfgnc {
        color: black !important;
    }
    body.dark-mode .select2-container--default .select2-results__option {
        background-color: #212529 !important;
    }
    body.dark-mode .select2-container--default .select2-selection--single .select2-selection__rendered {
        color: #212529 !important;
    }
    body.dark-mode .ck.ck-editor__main > .ck-editor__editable {
        background-color: #212529 !important;
        color: #f8f9fa !important;
    }
    /* SweetAlert2 Dark Mode Customization */
    body.dark-mode .swal2-popup {
        background: #1e1e1e !important;
        color: #ffffff !important;
    }

    body.dark-mode .swal2-title {
        color: #ffffff !important;
    }

    body.dark-mode .swal2-content {
        color: #dddddd !important;
    }

    body.dark-mode .swal2-confirm {
        background-color: #4caf50 !important; /* Green */
        color: #fff !important;
    }

    body.dark-mode .swal2-cancel {
        background-color: #f44336 !important; /* Red */
        color: #fff !important;
    }
    body.dark-mode #calendar-dates {
        background-color: #212529 !important;
    }
/* Basic Styles for All Buttons  */
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border: 2px solid transparent;
    border-radius: 40px;
    font-size: 16px;
    color: white;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 3D effect */
    overflow: hidden; /* For ripple effect */
}
    /* 3D effect: when the button is pressed */
    .icon-button:active {
        transform: translateY(4px); /* Button pushes down to simulate pressing */
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    /* Ripple Effect */
    .icon-button::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, 0.3);
        transform: scale(0);
        transition: transform 0.5s;
        border-radius: 20%;
        pointer-events: none;
        opacity: 0%;
    }

    .icon-button:active::after {
        transform: scale(4);
        transition: transform 0.5s;
    }
    /* Icon Styling */
    .icon-button i {
        margin-right: 8px;
        font-size: 20px;
    }
    /* Add Button */
    .icon-button.add {
        background: linear-gradient(135deg, #ff7e5f, #feb47b);
    }

        .icon-button.add:hover {
            background: linear-gradient(135deg, #feb47b, #ff7e5f);
            transform: scale(1.05); /* Slight zoom-in effect on hover */
        }

        .icon-button.add:active {
            transform: translateY(4px);
        }
    /* Edit Button */
    .icon-button.edit {
        background: linear-gradient(135deg, #00c6ff, #0072ff);
    }

        .icon-button.edit:hover {
            background: linear-gradient(135deg, #0072ff, #00c6ff);
            transform: scale(1.05);
        }

        .icon-button.edit:active {
            transform: translateY(4px);
        }
    /* Delete Button */
    .icon-button.delete {
        background: linear-gradient(135deg, #ff4e50, #f9d423);
    }

        .icon-button.delete:hover {
            background: linear-gradient(135deg, #ff0000, #b22222); /* Dark red gradient */
            transform: scale(1.05);
        }

        .icon-button.delete:active {
            transform: translateY(4px);
        }
    /* Detail Button */
    .icon-button.detail {
        background: linear-gradient(135deg, #6a11cb, #2575fc);
    }

        .icon-button.detail:hover {
            background: linear-gradient(135deg, #2575fc, #6a11cb);
            transform: scale(1.05);
        }

        .icon-button.detail:active {
            transform: translateY(4px);
        }
    /* Link Button */
    .icon-button.link {
        background: linear-gradient(135deg, #8e2de2, #4a00e0);
    }

        .icon-button.link:hover {
            background: linear-gradient(135deg, #4a00e0, #8e2de2);
            transform: scale(1.05);
        }

        .icon-button.link:active {
            transform: translateY(4px);
        }
    /* Add to Cart Button */
    .icon-button.add-to-cart {
        background: linear-gradient(135deg, #ff6a00, #ee0979);
    }

        .icon-button.add-to-cart:hover {
            background: linear-gradient(135deg, #ee0979, #ff6a00);
            transform: scale(1.05);
        }

        .icon-button.add-to-cart:active {
            transform: translateY(4px);
        }
    /* Notification Button */
    .icon-button.notification {
        background: linear-gradient(135deg, #ff4b1f, #ff9068);
    }

        .icon-button.notification:hover {
            background: linear-gradient(135deg, #ff9068, #ff4b1f);
            transform: scale(1.05);
        }

        .icon-button.notification:active {
            transform: translateY(4px);
        }
    /* Save  Button */
    .icon-button.save {
        background: linear-gradient(135deg, #28a745, #218838);
    }

        .icon-button.save:hover {
            background: linear-gradient(135deg, #218838, #1e7e34); /* Dark green gradient */
            transform: scale(1.05);
        }

        .icon-button.save:active {
            transform: translateY(2px);
        }
    /* Update  Button */
    .icon-button.update {
        background: linear-gradient(135deg, #007bff, #0056b3);
    }

        .icon-button.update:hover {
            background: linear-gradient(135deg, #0056b3, #004085);
            transform: scale(1.05);
        }

        .icon-button.update:active {
            transform: translateY(4px);
        }

    /* Search  Button */
    .icon-button.search {
        background: linear-gradient(135deg, #ADD8E6, #6495ED);
        color: white;
    }

        .icon-button.search:hover {
            background: linear-gradient(135deg, #6495ED, #4682B4);
            transform: scale(1.05);
            cursor: pointer;
        }

        .icon-button.search:active {
            transform: translateY(2px);
        }
    /* Refresh  Button */
    .icon-button.refresh {
        background: linear-gradient(135deg, #98FB98, #3CB371);
        color: white;
    }

        .icon-button.refresh:hover {
            background: linear-gradient(135deg, #3CB371, #2E8B57);
            transform: scale(1.05);
            cursor: pointer;
        }

        .icon-button.refresh:active {
            transform: translateY(2px);
        }

    /* Cancel Button */
    .icon-button.cancel {
        background: linear-gradient(135deg, #ff416c, #ff4b2b); /* ??? ??? */
    }

        .icon-button.cancel:hover {
            background: linear-gradient(135deg, #ff4b2b, #ff416c);
            transform: scale(1.05);
        }

        .icon-button.cancel:active {
            transform: translateY(4px);
        }
/* Responsive Design */
@media screen and (max-width: 768px) {
    .icon-button {
        font-size: 14px;
        padding: 10px 20px;
    }

        .icon-button i {
            font-size: 18px;
            margin-right: 6px;
        }
}

@media screen and (max-width: 480px) {
    .icon-button {
        font-size: 12px;
        padding: 8px 15px;
    }

        .icon-button i {
            font-size: 16px;
            margin-right: 4px;
        }
}


/* Shared style for tag and keyword */
.tag, .keyword {
    display: inline-block;
    background-color: #0094ff;
    color: white;
    padding: 2px 5px;
    margin: 0 3px 3px 0;
    border-radius: 5px;
    font-size: 12px;
}

    .tag .remove-tag, .keyword .remove-KeyWord {
        margin-left: 8px;
        cursor: pointer;
    }

#tagsContainer, #KeyWordContainer {
    display: flex;
    flex-wrap: wrap;
    margin-top: 3px;
}

/* Container styling //Dropdown search */

.select2-container--default .select2-selection--single {
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 8px; /* smooth corner */
    padding: 6px 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08); /* soft shadow */
    font-size: 14px;
    transition: box-shadow 0.3s ease;
    height: 38px !important; /* Match Bootstrap's default */
    display: flex;
    align-items: center; /* Vertically center content */
}

    /* On focus/active */
    .select2-container--default .select2-selection--single:focus,
    .select2-container--default .select2-selection--single:hover {
        border-color: #0094ff;
        box-shadow: 0 0 0 3px rgba(0, 148, 255, 0.2);
    }

    /* Arrow customization */
    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 100%;
        right: 8px;
    }

    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 1.5; /* Normal line height */
        padding-left: 8px; /* Optional: spacing */
        padding-right: 30px; /* Leave space for arrow */
        color: #212529;
    }

    /* Selected text */
    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: normal;
        color: #333;
    }


/* Dropdown list */
.select2-container--default .select2-results__option {
    padding: 8px 12px;
    font-size: 14px;

}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #0094ff;
    color: white;
}

/* Dropdown itself */
.select2-container--default .select2-dropdown {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: none;
}

/* sticky-navbar CSS  */

#mainNavbar {
    transition: top 0.3s ease-in-out;
    position: fixed;
    width: 100%;
    z-index: 999;
    top: 35px;
}

.navbar-hidden {
    top: -100px;
}
/* COMMENT AND REPLIY SCROLL  */
.highlight-new {
    animation: highlight 3s;
}

@keyframes highlight {
    0% {
        background-color: rgba(255, 255, 140, 0.7);
    }

    100% {
        background-color: transparent;
    }
}


/* NavBar er CSS  Hover Effects using Bootstrap utilities and pseudo-elements */
/* Enhanced Hover Effects */
.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(13, 110, 253, 0.1) 0%, rgba(13, 110, 253, 0.2) 100%);
    transition: width 0.4s ease;
    border-radius: inherit;
    z-index: -1;
}

.nav-link:hover::before {
    width: 100%;
}

.nav-link:hover {
    color: #0d6efd !important;
    transform: translateY(-2px);
    transition: all 0.4s ease;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.2);
}

.navbar-brand:hover {
    transform: scale(1.08);
    transition: transform 0.4s ease;
}

.btn:hover {
    transform: translateY(-2px);
    transition: all 0.4s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Professional dropdown animation */
.dropdown-menu {
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: translateY(-15px) scale(0.95);
    opacity: 0;
    visibility: hidden;
}

    .dropdown-menu.show {
        transform: translateY(0) scale(1);
        opacity: 1;
        visibility: visible;
    }

/* Theme toggle enhanced */
#theme-toggle:hover {
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    border-color: #0d6efd;
    transform: translateY(-2px) rotate(15deg);
}

.theme-icon-dark, .theme-icon-light {
    transition: all 0.3s ease;
}

/* Enhanced input styling */
.input-group-lg .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

/* Mobile specific enhancements */
@media (max-width: 991.98px) {
    .nav-link {
        text-align: center;
        margin: 0.5rem 0;
        font-size: 1.1rem;
    }

    .dropdown-menu {
        position: static !important;
        transform: none !important;
        box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        border: 2px solid #0d6efd !important;
        margin: 1rem 0;
        min-width: 100% !important;
        max-width: none !important;
    }

        .dropdown-menu.show {
            animation: slideDown 0.4s ease;
        }

    .input-group-lg {
        font-size: 1.1rem;
    }

    #theme-toggle {
        width: 45px;
        height: 45px;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar height enhancement */
.navbar {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

/* Additional visual enhancements */
.dropdown-header {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.input-group-text {
    border: 2px solid #e9ecef;
}

.form-control {
    border-top: 2px solid #e9ecef;
    border-bottom: 2px solid #e9ecef;
}

/*digital clock*/
.calendar-date {
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    transition: all 0.2s ease;
    margin: 0 auto;
    color: deepskyblue !important;
}

    .calendar-date:hover {
        background-color: #e9ecef !important;
        color: #000 !important;
    }

.today-date {
    background-color: #dc3545 !important;
    color: white !important;
    font-weight: bold;
}

.nav-btn {
    border: 1px solid rgba(255,255,255,0.3) !important;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .nav-btn:hover {
        background-color: rgba(255,255,255,0.1) !important;
        border-color: rgba(255,255,255,0.5) !important;
    }

.other-month {
    color: #adb5bd !important;
}

.current-month {
    color: #212529 !important;
}

/* main layout er jonne  */
.spaced-section {
    margin-top: 180px;
}

@media (max-width: 768px) {
    .spaced-section {
        margin-top: 130px; 
    }
}



/* Message  */

@keyframes pulse {
    0%, 100%

{
    transform: scale(1);
}

50% {
    transform: scale(1.1);
}

}

#chat-button:active svg {
    transform: scale(0.95) !important;
}

@media (max-width: 768px) {
    #chat-button {
        bottom: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    #chat-button {
        bottom: 10px;
        right: 10px;
    }
}


/* Enhanced Chat Widget Styles chat-widget*/
#chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#chat-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px;
    border-radius: 50%;
    cursor: pointer;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    position: relative;
}

    #chat-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 25px rgba(0,0,0,0.2);
    }

#unread-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chat-box {
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    position: absolute;
    bottom: 70px;
    right: 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

    /* Maximized state */
    #chat-box.maximized {
        position: fixed;
        top: 20px;
        left: 20px;
        right: 20px;
        bottom: 20px;
        width: auto;
        height: auto;
        border-radius: 8px;
        z-index: 10000;
    }

.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0; /* Prevent header from shrinking */
}

    .chat-header h4 {
        margin: 0;
        font-size: 16px;
        font-weight: 600;
    }

.chat-status {
    font-size: 12px;
    opacity: 0.8;
}

.header-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

#maximize-chat {
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 2px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

    #maximize-chat:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

#close-chat {
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    padding: 2px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

    #close-chat:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }



        /*old new */
#chat-history {
    flex: 1;
    padding: 15px;
    overflow-y: auto !important;
    overflow-x: hidden;
    background: #f8f9fa;
    min-height: 0;
    max-height: calc(100% - 140px); /* Fixed height calculation */
    display: flex;
    flex-direction: column;
}

/* Force scrollbar to always show */
#chat-history {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

    #chat-history::-webkit-scrollbar {
        width: 8px !important;
        display: block !important;
    }

    #chat-history::-webkit-scrollbar-track {
        background: #f1f1f1 !important;
        border-radius: 4px;
    }

    #chat-history::-webkit-scrollbar-thumb {
        background: #c1c1c1 !important;
        border-radius: 4px;
    }

        #chat-history::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8 !important;
        }

/*old new */
.message {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}

    .message.user {
        align-items: flex-end;
    }

    .message.admin {
        align-items: flex-start;
    }

.message-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 18px;
    word-wrap: break-word;
    line-height: 1.4;
}

.message.user .message-bubble {
    background: #667eea;
    color: white;
    border-bottom-right-radius: 4px;
}

.message.admin .message-bubble {
    background: white;
    color: #333;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 4px;
}

.message-sender {
    font-size: 11px;
    color: #666;
    margin-bottom: 4px;
    padding: 0 8px;
}

.message-time {
    font-size: 10px;
    color: #999;
    margin-top: 4px;
    padding: 0 8px;
}

.chat-input-area {
    padding: 15px;
    border-top: 1px solid #e9ecef;
    background: white;
    flex-shrink: 0; /* Prevent input area from shrinking */
}

.user-info input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}

#startChatBtn {
    width: 100%;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

#resetChatBtn {
    width: 100%;
    background-color:beige;
    color: yellowgreen;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-top:3px;
}

/*
.input-group {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}*/

#messageContent {
    flex: 1;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    max-height: 100px;
    min-height: 40px;
    box-sizing: border-box;
}

    #messageContent:focus {
        outline: none;
        border-color: #667eea;
    }

#sendMsgBtn {
    background: #667eea;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

    #sendMsgBtn:hover {
        background: #5a67d8;
        transform: scale(1.05);
    }

.typing-indicator {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 5px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    #chat-box {
        width: calc(100vw - 30px);
        height: 70vh;
        right: -10px;
        bottom: 60px;
    }

        #chat-box.maximized {
            top: 10px;
            left: 10px;
            right: 10px;
            bottom: 10px;
        }
}





/* ====== Chat Style (Start Button Swal) ====== */

/* Luxury SweetAlert Styles - Dark & Light Theme Compatible */
.luxury-popup {
    background: var(--popup-bg, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    border: 2px solid var(--popup-border, rgba(255, 255, 255, 0.2));
    border-radius: 25px;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

    .luxury-popup::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
        animation: shimmer 3s ease-in-out infinite;
    }

    .luxury-popup::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient( 45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70% );
        animation: luxury-sweep 4s ease-in-out infinite;
    }

.luxury-title {
    background: linear-gradient(135deg, #ffd700, #ffed4a, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 2.2rem !important;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    animation: luxury-glow 2s ease-in-out infinite alternate;
}

.luxury-text {
    color: var(--text-color, rgba(255, 255, 255, 0.9));
    font-size: 1.1rem;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin: 15px 0;
}

.luxury-button {
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
    background-size: 200% 200%;
    border: none;
    border-radius: 15px;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    padding: 12px 30px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4), 0 4px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: gradient-shift 3s ease infinite;
}

    .luxury-button::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient( 90deg, transparent, rgba(255, 255, 255, 0.3), transparent );
        transition: left 0.5s;
    }

    .luxury-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 15px 35px rgba(102, 126, 234, 0.6), 0 8px 15px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }

        .luxury-button:hover::before {
            left: 100%;
        }

    .luxury-button:active {
        transform: translateY(0);
        box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4), 0 2px 5px rgba(0, 0, 0, 0.3);
    }

.luxury-icon {
    border: 3px solid rgba(255, 215, 0, 0.8) !important;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.2), transparent) !important;
    animation: luxury-pulse 2s ease-in-out infinite;
}

/* Dark Theme Variables */
[data-theme="dark"], .dark-theme, body.dark {
    --popup-bg: linear-gradient(135deg, #2d3748 0%, #4a5568 50%, #2d3748 100%);
    --popup-border: rgba(255, 255, 255, 0.1);
    --text-color: rgba(255, 255, 255, 0.9);
}

/* Light Theme Variables */
[data-theme="light"], .light-theme, body.light {
    --popup-bg: linear-gradient(135deg, #f7fafc 0%, #edf2f7 50%, #e2e8f0 100%);
    --popup-border: rgba(0, 0, 0, 0.1);
    --text-color: rgba(0, 0, 0, 0.8);
}

/* Auto Dark/Light Detection */
@media (prefers-color-scheme: dark) {
    :root {
        --popup-bg: linear-gradient(135deg, #2d3748 0%, #4a5568 50%, #2d3748 100%);
        --popup-border: rgba(255, 255, 255, 0.1);
        --text-color: rgba(255, 255, 255, 0.9);
    }
}

@media (prefers-color-scheme: light) {
    :root {
        --popup-bg: linear-gradient(135deg, #f7fafc 0%, #edf2f7 50%, #e2e8f0 100%);
        --popup-border: rgba(0, 0, 0, 0.1);
        --text-color: rgba(0, 0, 0, 0.8);
    }
}

/* Animations */
@keyframes luxury-glow {
    0% {
        filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
    }

    100% {
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
    }
}

@keyframes luxury-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.7);
    }
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes shimmer {
    0%, 100% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }
}

@keyframes luxury-sweep {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .luxury-title {
        font-size: 1.8rem !important;
    }

    .luxury-button {
        padding: 10px 25px;
        font-size: 0.9rem;
    }

    .luxury-popup {
        border-radius: 20px;
    }
}

/* ====== End Chat Style ====== */
