/* ============================================
   LAYOUT DEFERRED CSS
   Non-critical styles extracted from inline <style> in app.blade.php
   Loaded non-blocking via media="print" onload pattern
   ============================================ */

/* ============================================
   MOBILE SIDEBAR (#mobileSidebar)
   ============================================ */

/* Overlay */
#msOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 1054;
    opacity: 0;
    transition: opacity 0.35s ease;
}
#msOverlay.show { display: block; opacity: 1; }

/* Sidebar panel */
#mobileSidebar {
    position: fixed;
    top: 0;
    right: -105%;
    width: 82%;
    max-width: 300px;
    height: 100dvh;
    background: #fff;
    box-shadow: -6px 0 30px rgba(0,0,0,0.15);
    z-index: 1055;
    display: flex;
    flex-direction: column;
    transition: right 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
#mobileSidebar.ms-open { right: 0; }

/* --- Header --- */
.ms-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(175,9,139,0.12);
    background: linear-gradient(135deg,rgba(175,9,139,0.04),rgba(23,10,102,0.04));
    flex-shrink: 0;
}
.ms-close-btn {
    border: 2px solid rgba(175,9,139,0.25);
    background: transparent;
    border-radius: 50%;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem;
    color: #af098b;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
}
.ms-close-btn:hover {
    background: #af098b; color: #fff; border-color: #af098b;
    transform: rotate(90deg);
}

/* --- Nav scroll area --- */
.ms-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}
.ms-nav::-webkit-scrollbar { width: 3px; }
.ms-nav::-webkit-scrollbar-thumb { background: rgba(175,9,139,0.2); border-radius: 4px; }

/* nav links */
.ms-link {
    display: flex;
    align-items: center;
    padding: 13px 18px;
    color: #1a1a2e;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.ms-link:hover, .ms-link.active {
    background: rgba(175,9,139,0.07);
    border-left-color: #af098b;
    color: #af098b;
}
.ms-link i { width: 22px; font-size: 1rem; flex-shrink: 0; margin-right: 10px; }
.ms-chevron { margin-left: auto; font-size: 0.75rem; transition: transform 0.25s ease; }
.ms-link.open .ms-chevron { transform: rotate(180deg); }

/* sub-menu */
.ms-submenu {
    display: none;
    background: rgba(175,9,139,0.03);
    border-top: 1px solid rgba(175,9,139,0.07);
}
.ms-submenu.open { display: block; }
.ms-sub-link {
    display: flex;
    align-items: center;
    padding: 11px 18px 11px 50px;
    color: #333;
    text-decoration: none;
    font-size: 0.875rem;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}
.ms-sub-link:hover {
    background: rgba(175,9,139,0.07);
    border-left-color: #af098b;
    color: #af098b;
}
.ms-sub-link i { width: 20px; margin-right: 8px; font-size: 0.9rem; }
.ms-sub-title { font-weight: 600; font-size: 0.875rem; }
.ms-sub-desc { font-size: 0.72rem; color: #888; }

/* --- Footer --- */
.ms-footer {
    flex-shrink: 0;
    border-top: 1px solid #eee;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fafafa;
}
.ms-portal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg,#af098b,#170a66);
    color: #fff !important;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(175,9,139,0.3);
}
.ms-portal-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(175,9,139,0.4); color: #fff !important; }

/* Hide sidebar on desktop */
@media (min-width: 992px) {
    #mobileSidebar, #msOverlay { display: none !important; }
    .enhanced-toggler { display: none !important; }
}

/* ============================================
   ENHANCED DROPDOWN STYLING (Dark Theme)
   ============================================ */
.enhanced-dropdown-menu {
    border: none !important;
    border-radius: 16px !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
    padding: 0 !important;
    min-width: 560px;
    margin-top: 0 !important;
    background-color: #161234 !important;
    background: #161234 !important;
    backdrop-filter: blur(30px) !important;
    border-top: none !important;
    overflow: hidden !important;
}

.enhanced-dropdown-item {
    padding: 0 !important;
    border-radius: 0 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0 !important;
    background-color: transparent !important;
    background: transparent !important;
}

.enhanced-dropdown-item:last-child {
    margin-bottom: 0;
}

.dropdown-item-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    text-decoration: none;
    color: inherit;
    border-radius: 0;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.enhanced-dropdown-item:hover .dropdown-item-content,
.enhanced-dropdown-item:focus .dropdown-item-content {
    background: rgba(175, 9, 139, 0.12);
    border-left-color: #af098b;
    color: #ffffff !important;
}

.dropdown-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #ffffff !important;
    margin-bottom: 0.15rem;
}

.dropdown-desc {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5) !important;
}

.enhanced-dropdown-item:hover .dropdown-title {
    color: #ffffff !important;
}

/* ============================================
   GOOGLE RATING BADGE
   ============================================ */
.google-rating-badge {
    padding: 0.5rem 1.2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 40px;
    border: 1.5px solid #e8eaed;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    height: fit-content;
}

.google-rating-badge:hover {
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.15);
    transform: translateY(-1px);
    border-color: #4285f4;
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
}

.google-rating-badge i.bi-star-fill {
    filter: drop-shadow(0 1px 2px rgba(251, 188, 4, 0.3));
}

/* ============================================
   ENHANCED PORTAL BUTTON
   ============================================ */
.btn-enhanced-portal {
    display: flex;
    align-items: center;
    padding: 0.5rem 1.2rem;
    background: linear-gradient(135deg, #af098b, #7b2ff7);
    border: none;
    border-radius: 40px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 12px rgba(175, 9, 139, 0.3);
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
}

.btn-enhanced-portal::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s;
}

.btn-enhanced-portal:hover::before {
    left: 100%;
}

.btn-enhanced-portal:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(175, 9, 139, 0.5);
    color: white;
    background: linear-gradient(135deg, #c40ea2, #8e3ff9);
}

.btn-icon {
    margin-right: 0.4rem;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.btn-text {
    margin-right: 0.4rem;
}

.btn-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.btn-enhanced-portal:hover .btn-arrow {
    transform: translateX(2px);
}

.btn-enhanced-portal:hover .btn-icon {
    transform: scale(1.05);
}

/* ============================================
   SCROLL PROGRESS BAR
   ============================================ */
.scroll-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, #af098b, #170a66);
    border-radius: 0 2px 2px 0;
    transition: width 0.3s ease;
    width: 0%;
}

/* Header CTA Section */
.header-cta {
    gap: 0.45rem;
    flex-shrink: 0;
}

/* ============================================
   SUPPORT CALL CHIP
   ============================================ */
.support-call-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.62rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.support-call-chip i {
    color: #af098b;
    font-size: 0.85rem;
}

.support-call-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(175, 9, 139, 0.2);
    border-color: rgba(175, 9, 139, 0.4);
    color: #ffffff;
}

.support-call-chip .support-label {
    font-size: 0.64rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.support-call-chip .support-number {
    font-size: 0.78rem;
    line-height: 1;
}

.ms-support-call {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(23,10,102,0.14);
    background: #fff;
    color: #170a66;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 700;
    transition: all 0.25s ease;
}

.ms-support-call i {
    color: #af098b;
}

.ms-support-call:hover {
    color: #170a66;
    border-color: rgba(175,9,139,0.24);
    box-shadow: 0 6px 16px rgba(23,10,102,0.1);
}

/* ============================================
   SUPPORT HOURS MODAL
   ============================================ */
.support-hours-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
}

.support-hours-modal.show {
    display: flex;
}

.support-hours-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 14px;
    padding: 18px 18px 16px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
    border: 1px solid rgba(23, 10, 102, 0.08);
}

.support-hours-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.support-hours-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #170a66;
}

.support-hours-close {
    border: 0;
    background: #f3f4f6;
    color: #344054;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    cursor: pointer;
    line-height: 1;
    font-size: 1rem;
}

.support-hours-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #eaecf0;
    border-radius: 10px;
    overflow: hidden;
}

.support-hours-list li {
    padding: 10px 12px;
    font-size: 0.9rem;
    color: #1f2937;
    background: #fff;
    border-bottom: 1px solid #f2f4f7;
}

.support-hours-list li:last-child {
    border-bottom: 0;
}

.support-hours-list strong {
    color: #111827;
}

.support-hours-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.support-call-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    background: #111827;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
}

.support-call-now:hover {
    color: #fff;
    background: #0b1220;
}

/* ============================================
   OFFER MARQUEE STYLES
   ============================================ */
.offer-marquee {
    background: linear-gradient(90deg, #af098b, #170a66, #af098b);
    color: white;
    padding: 8px 0;
    position: relative;
    overflow: hidden;
    z-index: 1051;
    font-size: 14px;
    font-weight: 500;
    min-height: 38px; /* Reserve space to prevent CLS */
}

.marquee-content {
    display: flex;
    animation: marqueeScroll 25s linear infinite;
    white-space: nowrap;
}

.offer-text {
    padding-right: 100px;
}

.offer-link {
    color: #fff;
    text-decoration: underline;
    font-weight: 600;
    margin-left: 10px;
}

.offer-link:hover {
    color: #ffeb3b;
    text-decoration: none;
}

.marquee-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: all 0.3s ease;
}

.marquee-close:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-50%) scale(1.1);
}

@keyframes marqueeScroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

@media (max-width: 768px) {
    .offer-marquee {
        font-size: 12px;
        padding: 6px 0;
        min-height: 32px;
    }
    
    .marquee-content {
        animation-duration: 20s;
    }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
.navbar-nav {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0;
}

.btn-enhanced-portal {
    padding: 0.45rem 0.9rem;
    font-size: 0.84rem;
    border-radius: 40px;
    white-space: nowrap;
}

.btn-text {
    margin-right: 0.3rem;
}

@media (max-width: 991.98px) {
    .revamped-navbar {
        padding: 0.4rem 0;
    }

    .enhanced-brand {
        margin-right: 0.75rem;
    }

    .brand-host, .brand-asia {
        font-size: 1.1rem;
    }

    .brand-tagline {
        font-size: 0.5rem;
    }

    .enhanced-nav-link {
        padding: 0.5rem 0.75rem;
        margin: 0.15rem 0;
        border-radius: 0.4rem;
        font-size: 0.85rem;
    }

    .btn-enhanced-portal {
        padding: 0.45rem 1rem;
        margin-top: 0.75rem;
        font-size: 0.85rem;
    }

    .support-call-chip {
        display: none;
    }
    
    .google-rating-badge {
        padding: 0.45rem 1rem;
        margin-top: 0.75rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 1320px) {
    .support-call-chip .support-label {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .brand-host, .brand-asia {
        font-size: 1rem;
    }

    .brand-tagline {
        display: none;
    }

    .enhanced-nav-link {
        padding: 0.45rem 0.6rem;
        font-size: 0.8rem;
    }
}

/* Global spinning animation */
.spin {
    animation: spin 1s linear infinite;
}

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