/* Premium Menu Styles */

:root {
    --sidebar-bg: #ffffff; /* White Theme */
    --sidebar-text: #5a5c69; /* Dark gray */
    --sidebar-hover-bg: #f8f9fc; /* Light gray */
    --sidebar-hover-text: #4e73df; /* Primary Blue */
    --sidebar-active-bg: #eaecf4; /* Active light gray */
    --sidebar-width: 280px; 
    --sidebar-collapsed-width: 70px;
    --navbar-bg: #ffffff;
    --transition-speed: 0.3s;
}

/* Base Wrapper & Page Wrapper */
#wrapper {
    width: 100%;
}

#page-wrapper {
    margin-left: var(--sidebar-width) !important;
    transition: margin-left var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #f8f9fc;
    min-height: 100vh;
    padding-top: 70px !important; /* Push content down to prevent navbar overlap */
}

/* When collapsed on desktop */
body.sidebar-collapsed #page-wrapper {
    margin-left: var(--sidebar-collapsed-width) !important;
}

/* Sidebar Structure */
.navbar-default.sidebar {
    position: fixed !important;
    width: var(--sidebar-width) !important;
    height: calc(100vh - 50px);
    top: 50px; /* Below navbar */
    left: 0;
    z-index: 1000;
    background-color: var(--sidebar-bg);
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid #e3e6f0;
    box-shadow: 2px 0 15px rgba(0,0,0,0.05);
    margin-top: 0 !important;
}

/* Custom Scrollbar for Sidebar */
.navbar-default.sidebar::-webkit-scrollbar {
    width: 6px;
}
.navbar-default.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.navbar-default.sidebar::-webkit-scrollbar-thumb {
    background: #d1d3e2;
    border-radius: 10px;
}

body.sidebar-collapsed .navbar-default.sidebar {
    width: var(--sidebar-collapsed-width) !important;
}

/* Top Navbar */
.navbar-static-top {
    background-color: var(--navbar-bg) !important;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    border-bottom: none !important;
    height: 50px;
    z-index: 1001;
    position: fixed !important;
    top: 0;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 15px !important;
}

/* Navbar Brand & Toggle Button */
.navbar-brand {
    color: #4e73df !important;
    font-weight: bold !important;
    font-size: 18px !important;
    padding-left: 10px !important;
    display: inline-block !important;
    line-height: 20px;
    height: 50px;
}

#sidebarToggle {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 20px;
    cursor: pointer;
    padding: 15px;
    height: 50px;
    transition: color 0.2s;
    float: left;
}

#sidebarToggle:hover {
    color: #2563eb;
}

/* Sidebar Links */
.sidebar ul li {
    border-bottom: none !important;
    margin: 4px 12px;
    transition: margin var(--transition-speed);
}

.sidebar ul li a {
    color: var(--sidebar-text) !important;
    padding: 10px 14px !important;
    font-size: 14.5px !important;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: normal !important; /* Allow text wrapping */
    line-height: 1.4;
    display: flex;
    align-items: flex-start; /* Align icon to the first line of text */
    text-decoration: none !important;
}

.sidebar ul li a i {
    width: 24px;
    text-align: center;
    margin-right: 12px;
    font-size: 16px !important;
    color: #9ca3af;
    margin-top: 2px; /* Center icon vertically with the first line of text */
    transition: all 0.2s;
}

.sidebar ul li a:hover {
    background-color: var(--sidebar-hover-bg) !important;
    color: var(--sidebar-hover-text) !important;
}

.sidebar ul li a:hover i {
    color: var(--sidebar-hover-text);
    transform: scale(1.1);
}

/* Active State */
.sidebar ul li a.active {
    background-color: #eff6ff !important;
    color: #2563eb !important;
    font-weight: 600;
}

.sidebar ul li a.active i {
    color: #2563eb;
}

/* Arrow for submenus */
.sidebar ul li a .fa.arrow {
    float: right;
    margin-right: 0;
    width: auto;
    font-size: 12px !important;
    color: #9ca3af;
    margin-top: 4px; /* Center arrow vertically with first line */
    transition: transform 0.3s ease;
    margin-left: auto;
}

/* Collapsed State Handling for Icons & Text */
body.sidebar-collapsed .sidebar ul li {
    margin: 4px 8px;
}

body.sidebar-collapsed .sidebar ul li a span.menu-text,
body.sidebar-collapsed .sidebar ul li a .fa.arrow {
    opacity: 0;
    visibility: hidden;
    width: 0;
    height: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
    display: none !important;
}

body.sidebar-collapsed .sidebar ul li a i {
    margin-right: 0;
    margin-top: 0;
    font-size: 20px !important;
    width: 100%;
    text-align: center;
}

body.sidebar-collapsed .sidebar ul li a {
    padding: 12px 0 !important;
    justify-content: center;
    border-radius: 8px;
}

/* Sidebar Footer Toggle Button */
.sidebar-footer-toggle a {
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0;
}
.sidebar-footer-toggle a:hover {
    background-color: #f1f5f9 !important;
    color: #2563eb !important;
}
body.sidebar-collapsed .sidebar-toggle-icon::before {
    content: "\f105" !important; /* fa-angle-right */
}

/* Sub-menus (Second Level) */
.sidebar .nav-second-level {
    background-color: transparent !important;
    padding-left: 0;
    margin-left: 28px;
    border-left: 1.5px solid #eaecf4;
}

.sidebar .nav-second-level li {
    margin: 2px 0 2px 8px;
}

.sidebar .nav-second-level li a {
    padding: 8px 12px !important;
    font-size: 13.5px !important;
    color: #6e707e !important;
    background-color: transparent !important;
    border-radius: 6px;
}

.sidebar .nav-second-level li a:hover {
    background-color: #f8f9fc !important;
    color: var(--sidebar-hover-text) !important;
}

.sidebar .nav-second-level li a.active {
    background-color: #eff6ff !important;
    color: #2563eb !important;
    font-weight: 600;
}

body.sidebar-collapsed .sidebar .nav-second-level {
    display: none !important; /* Hide submenus when collapsed */
}

/* Desktop Layout Fix - Override Bootstrap 3 float-based navbar on desktop */
@media (min-width: 769px) {
    .navbar-static-top {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
    }

    .navbar-header {
        display: flex !important;
        align-items: center !important;
        float: none !important;
        width: auto !important;
        flex-shrink: 0 !important;
    }

    .navbar-top-links.navbar-right {
        display: flex !important;
        align-items: center !important;
        float: none !important;
        margin-right: 0 !important;
        margin-left: auto !important;
        flex-shrink: 0 !important;
        list-style: none !important;
    }

    .navbar-top-links.navbar-right > li {
        display: inline-flex !important;
        align-items: center !important;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body.sidebar-collapsed {
        overflow: hidden !important;
    }

    #page-wrapper {
        margin-left: 0 !important;
    }
    
    .navbar-default.sidebar {
        left: calc(-1 * var(--sidebar-width)); /* Hidden by default on mobile */
    }
    
    /* Force display sidebar navigation on mobile (override collapsed bootstrap/metisMenu nav rules) */
    .navbar-default.sidebar .navbar-collapse,
    .navbar-default.sidebar .sidebar-nav.navbar-collapse,
    .navbar-default.sidebar .sidebar-nav.navbar-collapse.collapse,
    .navbar-default.sidebar .sidebar-nav.navbar-collapse.in,
    .navbar-default.sidebar .collapse {
        display: block !important;
        height: auto !important;
        visibility: visible !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Top Header Layout Alignment for mobile */
    .navbar-header {
        display: flex !important;
        align-items: center !important;
        width: auto !important;
        justify-content: flex-start !important;
        padding-right: 0 !important;
        float: left !important;
    }
    
    .navbar-brand {
        float: none !important;
        flex: none !important;
        line-height: 50px !important;
        padding: 0 8px !important;
        margin-left: 0 !important;
        font-size: 14px !important;
        height: 50px !important;
        max-width: 160px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: inline-block !important;
    }

    #sidebarToggle {
        float: none !important;
        padding: 15px 12px !important;
        height: 50px !important;
    }
    
    /* Override inline margin-right: 50px and force inline flex on top links */
    .navbar-top-links {
        display: flex !important;
        align-items: center !important;
        margin-right: 8px !important;
        float: none !important;
        padding-left: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        list-style: none !important;
    }

    .navbar-top-links li {
        display: flex !important;
        align-items: center !important;
        height: 50px !important;
    }

    .navbar-top-links .user-profile-dropdown > a {
        padding: 6px 8px !important;
    }

    .google-translate-item {
        padding: 0 4px !important;
    }

    .goog-te-gadget-simple {
        padding: 2px 6px !important;
        font-size: 11px !important;
    }
    
    /* On mobile, sidebar-collapsed means OPEN */
    body.sidebar-collapsed .navbar-default.sidebar {
        left: 0; 
        width: var(--sidebar-width) !important;
    }
    
    body.sidebar-collapsed #page-wrapper {
        margin-left: 0 !important; 
    }

    /* On mobile, when sidebar is open, restore normal styling for first-level links and icons */
    body.sidebar-collapsed .sidebar ul.nav > li > a {
        padding: 12px 16px !important;
        justify-content: flex-start !important;
        display: flex !important;
        align-items: center !important;
    }

    body.sidebar-collapsed .sidebar ul.nav > li > a i {
        width: 24px !important;
        margin-right: 12px !important;
        margin-left: 0 !important;
        font-size: 16px !important;
        text-align: center !important;
        flex: none !important;
    }

    body.sidebar-collapsed .sidebar ul.nav > li > a span.menu-text {
        opacity: 1 !important;
        visibility: visible !important;
        display: inline !important;
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
    }

    body.sidebar-collapsed .sidebar ul.nav > li > a .fa.arrow {
        opacity: 1 !important;
        visibility: visible !important;
        display: inline-block !important;
        margin-left: auto !important;
        float: none !important;
        margin-top: 4px !important;
    }

    /* Submenus (Second Level) on Mobile Open state */
    body.sidebar-collapsed .sidebar .nav-second-level {
        display: block !important;
        margin-left: 24px !important;
        padding-left: 0 !important;
        border-left: 1.5px solid #eaecf4 !important;
    }

    body.sidebar-collapsed .sidebar .nav-second-level li {
        margin: 2px 0 2px 8px !important;
    }

    body.sidebar-collapsed .sidebar .nav-second-level li a {
        padding: 8px 12px !important;
        font-size: 13.5px !important;
        display: block !important;
        color: #6e707e !important;
        background-color: transparent !important;
    }
    
    /* Mobile Overlay */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        display: none;
    }
    
    body.sidebar-collapsed .sidebar-overlay {
        display: block;
    }
}

/* ==========================================================================
   User Profile Dropdown & Google Translate Styling
   ========================================================================== */

/* User Profile Toggle on Navbar */
.navbar-top-links .user-profile-dropdown {
    height: 50px;
    display: inline-block;
    vertical-align: top;
}

.navbar-top-links .user-profile-dropdown > a {
    display: flex;
    align-items: center;
    padding: 6px 16px !important;
    min-height: 50px;
    color: #4b5563 !important;
    text-decoration: none !important;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.navbar-top-links .user-profile-dropdown > a:hover,
.navbar-top-links .user-profile-dropdown > a:focus,
.navbar-top-links .user-profile-dropdown.open > a {
    background-color: #f3f4f6 !important;
    color: #1f2937 !important;
}

.user-profile-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(78, 115, 223, 0.25);
    border: 2px solid #ffffff;
}

.user-info-meta {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.3;
}

.user-email {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}

.user-role {
    font-size: 11px;
    color: #4e73df;
    font-weight: 500;
}

.user-role-line {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.user-nav-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    line-height: 1.35;
    letter-spacing: 0.01em;
}

.user-nav-badge.group {
    background: #ede9fe;
    color: #5b21b6;
    border: 1px solid #ddd6fe;
}

.user-nav-badge.dorm {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.user-profile-toggle .fa-caret-down {
    color: #9ca3af;
    margin-left: 4px;
    font-size: 12px;
}

/* User Dropdown Menu Card */
.navbar-top-links .dropdown-user {
    width: 280px;
    padding: 16px 0 8px 0;
    margin-top: 5px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    background-color: #ffffff;
    border-top: 3px solid #4e73df;
    z-index: 1100 !important;
}

/* Fade and Slide Animation */
.animate-slide-in {
    animation: dropdownSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-user .user-header {
    padding: 8px 20px 16px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.user-avatar-large {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 24px;
    box-shadow: 0 4px 10px rgba(78, 115, 223, 0.2);
    border: 3px solid #ffffff;
    outline: 2px solid #eaecf4;
}

.user-email-large {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin: 6px 0 2px 0;
    word-break: break-all;
}

.user-role-badge {
    background-color: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfdbfe !important;
    padding: 4px 12px !important;
    border-radius: 9999px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-shadow: none !important;
    display: inline-block;
}

.user-dropdown-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    max-width: 250px;
}

.user-group-badge-pill {
    background: linear-gradient(135deg, #ede9fe 0%, #e0e7ff 100%);
    color: #4338ca;
    border: 1px solid #c7d2fe;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 1px 3px rgba(67, 56, 202, 0.1);
    transition: all 0.15s ease;
}

.user-group-badge-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(67, 56, 202, 0.18);
}

.user-dorm-badge-pill {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 1px 3px rgba(6, 95, 70, 0.1);
    transition: all 0.15s ease;
}

.user-dorm-badge-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(6, 95, 70, 0.18);
}

.badge-sub-ids {
    font-weight: 500;
    opacity: 0.88;
    margin-left: 2px;
    font-size: 0.92em;
}

.dropdown-user li.divider {
    height: 1px;
    margin: 8px 0;
    background-color: #f3f4f6;
}

.dropdown-user li a {
    padding: 10px 20px !important;
    font-size: 13.5px !important;
    color: #4b5563 !important;
    display: flex !important;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s, color 0.2s;
    font-weight: 500;
}

.dropdown-user li a:hover {
    background-color: #fef2f2 !important; /* Soft Red hover */
    color: #ef4444 !important; /* Premium Red */
    text-decoration: none !important;
}

.dropdown-user li a i {
    font-size: 15px;
    color: #9ca3af;
    transition: color 0.2s;
}

.dropdown-user li a:hover i {
    color: #ef4444;
}

/* Login Button (Not Logged In State) */
.navbar-top-links .login-item {
    height: 50px;
    display: inline-flex !important;
    align-items: center;
    vertical-align: middle;
    margin-right: 8px;
}

.navbar-top-links .login-item > a {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 7px 14px !important;
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
    min-height: auto !important;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 6px rgba(78, 115, 223, 0.2) !important;
    text-decoration: none !important;
}

.navbar-top-links .login-item > a:hover {
    background: linear-gradient(135deg, #2e59d9 0%, #1e40af 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(78, 115, 223, 0.3) !important;
}

.navbar-top-links .login-item > a:active {
    transform: translateY(0);
}

/* Mobile Responsive Navbar & Login Button Adjustments */
@media (max-width: 768px) {
    .navbar-static-top {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        height: 50px !important;
        padding: 0 10px !important;
        overflow: visible !important;
    }

    .navbar-header {
        display: flex !important;
        align-items: center !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        margin: 0 !important;
        float: none !important;
    }

    .navbar-brand {
        font-size: 13.5px !important;
        height: auto !important;
        line-height: 1.2 !important;
        padding: 0 0 0 8px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 140px !important;
        float: none !important;
    }

    .navbar-top-links {
        display: flex !important;
        align-items: center !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        gap: 6px !important;
        float: none !important;
        position: static !important;
    }

    .navbar-top-links .user-profile-dropdown {
        position: static !important;
        height: auto !important;
        display: flex !important;
        align-items: center !important;
    }

    .navbar-top-links .user-profile-dropdown > a {
        padding: 6px 8px !important;
        cursor: pointer !important;
        min-height: auto !important;
        display: flex !important;
        align-items: center !important;
        text-decoration: none !important;
    }

    .user-profile-toggle {
        cursor: pointer !important;
        user-select: none;
        -webkit-user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    .navbar-top-links .dropdown-user {
        position: absolute !important;
        top: 50px !important;
        right: 8px !important;
        left: auto !important;
        width: calc(100vw - 16px) !important;
        max-width: 290px !important;
        margin-top: 4px !important;
        border-radius: 16px !important;
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2) !important;
        z-index: 100010 !important;
    }

    .navbar-top-links .user-profile-dropdown.open .dropdown-user {
        display: block !important;
    }

    .navbar-top-links .login-item {
        height: auto !important;
        margin-right: 0 !important;
        display: flex !important;
        align-items: center !important;
    }

    .navbar-top-links .login-item > a {
        padding: 6px 10px !important;
        font-size: 12px !important;
        gap: 4px !important;
        border-radius: 6px !important;
        white-space: nowrap !important;
        line-height: 1 !important;
    }

    .navbar-top-links .login-item > a i {
        font-size: 12px !important;
    }

    .google-translate-item {
        height: auto !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
    }

    .goog-te-gadget-simple {
        padding: 4px 6px !important;
        font-size: 11px !important;
        border-radius: 6px !important;
        max-width: 95px !important;
        overflow: hidden !important;
    }

    .goog-te-gadget-simple .goog-te-menu-value span:first-child {
        max-width: 58px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        display: inline-block !important;
        vertical-align: middle !important;
    }
}

/* Google Translate Alignment */
.google-translate-item {
    height: 50px;
    display: inline-flex !important;
    align-items: center;
    padding: 0 12px;
    vertical-align: top;
}

#google_translate_element {
    display: inline-block;
    margin: 0;
    padding: 0;
    line-height: 1;
}

/* Google Translate Styling overrides to look clean */
.goog-te-gadget {
    font-family: inherit !important;
    font-size: 12px !important;
    color: #6b7280 !important;
}

.goog-te-gadget-simple {
    background-color: #f3f4f6 !important;
    border: 1px solid #e5e7eb !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    cursor: pointer;
    font-family: inherit !important;
    transition: background-color 0.2s, border-color 0.2s;
    display: inline-flex !important;
    align-items: center;
}

.goog-te-gadget-simple:hover {
    background-color: #e5e7eb !important;
    border-color: #d1d5db !important;
}

.goog-te-menu-value {
    display: inline-flex !important;
    align-items: center;
    margin: 0 !important;
    padding: 0 !important;
}

.goog-te-menu-value span {
    color: #4b5563 !important;
    font-weight: 500 !important;
    font-family: inherit !important;
}

.goog-te-gadget img {
    display: none !important; /* Hide Google logo for clean B2B look */
}

.goog-te-menu-value img {
    display: none !important;
}

.goog-te-menu-frame,
iframe.goog-te-menu-frame {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Universal Google Translate Banner & Layout Adjustment */
.goog-te-menu-frame,
iframe.goog-te-menu-frame {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 100002 !important;
}

.navbar-static-top {
    z-index: 100001 !important;
}

.goog-te-banner-frame,
iframe.goog-te-banner-frame {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 40px !important;
    z-index: 99990 !important;
}

.goog-te-gadget-icon {
    display: none !important;
}

/* Ensure Bootstrap Modal and Backdrop always sit above Navbar (z-index: 100001) */
.modal-backdrop {
    z-index: 100005 !important;
}

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

.modal-dialog {
    margin-top: 80px !important;
}

.modal-content {
    border-radius: 16px !important;
    border: none !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden !important;
}

.modal-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    color: #ffffff !important;
    padding: 16px 24px !important;
    border-bottom: none !important;
}

.modal-header .modal-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    font-family: 'Prompt', sans-serif !important;
}

.modal-header .close {
    color: #ffffff !important;
    opacity: 0.8 !important;
    text-shadow: none !important;
}

.modal-header .close:hover {
    opacity: 1 !important;
}

.modal-body {
    padding: 24px !important;
    font-family: 'Prompt', sans-serif !important;
    font-size: 15px !important;
    color: #334155 !important;
    line-height: 1.6 !important;
}

.modal-footer {
    padding: 14px 24px !important;
    background-color: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
}

