/**
 * global-search.css
 *
 * Premium Travel UI/UX styling for T2I Holidays Global Search & Responsive Navbar.
 * - Responsive flex navbar layout
 * - Glassmorphism search input
 * - Polished result cards with smooth hover & slide micro-interactions
 * - Offcanvas mobile navigation menu
 * - Zero horizontal overflow across all viewports
 */

:root {
    --gs-red         : #9D0B0B;
    --gs-red-hover   : #7d0909;
    --gs-red-light   : rgba(157, 11, 11, 0.08);
    --gs-shadow      : 0 20px 45px -10px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.05);
    --gs-border      : #e2e8f0;
    --gs-text-main   : #0f172a;
    --gs-text-muted  : #64748b;
    --gs-bg          : #ffffff;
    --gs-hover-bg    : #f8fafc;
    --gs-radius      : 18px;
    --gs-radius-sm   : 10px;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE NAVBAR CONTAINER & LAYOUT
   ═══════════════════════════════════════════════════════════════════ */

.t2i-navbar {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 36px !important;
    padding-bottom: 20px !important;
    background: transparent;
    transition: all 0.3s ease;
}

.t2i-nav-container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    /* 
      Responsive padding to account for .hero-section margin (20px).
      At mobile (320px), 36px total padding = 20px margin + 16px inner padding.
      At desktop (1440px), 68px total padding = 20px margin + 48px inner padding.
    */
    padding: 0 clamp(36px, 5vw + 20px, 68px) !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
}

@media (max-width: 768px) {
    .t2i-nav-container {
        padding: 0 clamp(36px, 6vw, 44px) !important;
        gap: 12px;
    }
}

/* Logo Sizing */
.t2i-logo-img {
    height: 48px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    transition: all 0.25s ease;
    display: block;
}

@media (max-width: 1400px) {
    .t2i-logo-img {
        height: 44px;
        max-width: 190px;
    }
}
@media (max-width: 991px) {
    .t2i-logo-img {
        height: 38px;
        max-width: 170px;
    }
}
@media (max-width: 480px) {
    .t2i-logo-img {
        height: 32px;
        max-width: 140px;
    }
}

/* Nav Menu Links & Positioning */
.header-dark {
    margin-left: auto;
    margin-right: 32px;
}

@media (max-width: 1400px) {
    .header-dark {
        margin-right: 20px;
    }
}

.t2i-nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (max-width: 1400px) {
    .t2i-nav-menu {
        gap: 20px;
    }
}

.t2i-nav-link {
    font-size: 20px;
    font-weight: 500;
    color: #ffffff !important;
    text-decoration: none !important;
    white-space: nowrap;
    position: relative;
    padding: 4px 0;
    transition: color 0.2s ease;
}

@media (max-width: 1366px) {
    .t2i-nav-link {
        font-size: 17.5px;
    }
}

.t2i-nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -8px;
    width: 0;
    height: 3px;
    background: var(--gs-red);
    transform: translateX(-50%);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.t2i-nav-link:hover,
.t2i-nav-link.active {
    color: #ffffff !important;
}

.t2i-nav-link:hover::after,
.t2i-nav-link.active::after {
    width: 100%;
}

.navbar.scrolled .t2i-nav-link {
    color: #1e293b !important;
}

.navbar.scrolled .t2i-nav-link:hover,
.navbar.scrolled .t2i-nav-link.active {
    color: #1e293b !important;
}

/* Right Actions Container */
.t2i-nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

/* Get Quote Button */
.t2i-btn-get-quote {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    background-color: var(--gs-red);
    color: #ffffff !important;
    border: 1.5px solid var(--gs-red);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(157, 11, 11, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.t2i-btn-get-quote:hover {
    background-color: #ffffff;
    color: var(--gs-red) !important;
    border-color: var(--gs-red);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(157, 11, 11, 0.35);
}

.t2i-btn-get-quote i {
    font-size: 18px;
}

/* Mobile Toggle Buttons */
.t2i-icon-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.t2i-icon-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Override style.css .navbar-toggler (solid white bg) so bars are not white-on-white */
.t2i-icon-btn.navbar-toggler {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    width: 42px;
    height: 42px;
}

.t2i-icon-btn.navbar-toggler i {
    color: inherit;
    font-size: 16px;
    line-height: 1;
}

.navbar.scrolled .t2i-icon-btn {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

.navbar.scrolled .t2i-icon-btn.navbar-toggler {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

/* Offcanvas Sidebar for Mobile */
.t2i-offcanvas {
    width: 320px !important;
    max-width: 85vw !important;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
    border: none;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
}

.t2i-offcanvas .offcanvas-header {
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.t2i-mobile-logo {
    height: 38px;
    width: auto;
}

.t2i-mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.t2i-mobile-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    color: #1e293b !important;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    border-bottom: 1px solid #f8fafc;
    transition: all 0.2s ease;
}

.t2i-mobile-link span {
    display: flex;
    align-items: center;
    gap: 12px;
}

.t2i-mobile-link i:not(.arrow-icon) {
    width: 20px;
    color: #64748b;
    font-size: 15px;
    transition: color 0.2s ease;
    text-align: center;
}

.t2i-mobile-link .arrow-icon {
    font-size: 12px;
    color: #cbd5e1;
}

.t2i-mobile-link:hover,
.t2i-mobile-link.active {
    background: var(--gs-red-light);
    color: var(--gs-red) !important;
}

.t2i-mobile-link:hover i,
.t2i-mobile-link.active i {
    color: var(--gs-red);
}

.t2i-mobile-cta {
    padding: 20px;
    margin-top: 10px;
}

/* ═══════════════════════════════════════════════════════════════════
   DESKTOP GLOBAL SEARCH BAR — embedded in navbar
   ═══════════════════════════════════════════════════════════════════ */

#gs-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.gs-input-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.14);
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 8px 16px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: text;
    width: 240px;
    max-width: 280px;
    flex-shrink: 1;
}

@media (max-width: 1366px) {
    .gs-input-container {
        width: 200px;
        padding: 7px 12px;
    }
}

.gs-input-container:hover,
.gs-input-container:focus-within {
    background: rgba(255, 255, 255, 0.25);
    border-color: var(--gs-red);
    box-shadow: 0 0 0 4px rgba(157, 11, 11, 0.2);
}

.gs-input-icon {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    flex-shrink: 0;
    pointer-events: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.gs-input-container:focus-within .gs-input-icon {
    color: #ffffff;
    transform: scale(1.1);
}

#gs-input {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 500;
    flex: 1;
    min-width: 0;
}

#gs-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 400;
}

/* Clear button (×) */
.gs-clear-btn {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    outline: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
}

.gs-clear-btn:hover {
    background: var(--gs-red);
    color: #ffffff;
    transform: scale(1.12);
}

/* Scrolled Navbar (.navbar.scrolled) */
.navbar.scrolled .gs-input-container {
    background: #f1f5f9;
    border-color: #cbd5e1;
}
.navbar.scrolled .gs-input-icon {
    color: #64748b;
}
.navbar.scrolled #gs-input {
    color: #0f172a;
}
.navbar.scrolled #gs-input::placeholder {
    color: #94a3b8;
}
.navbar.scrolled .gs-input-container:focus-within {
    background: #ffffff;
    border-color: var(--gs-red);
    box-shadow: 0 0 0 4px var(--gs-red-light);
}
.navbar.scrolled .gs-clear-btn {
    background: #e2e8f0;
    color: #475569;
}
.navbar.scrolled .gs-clear-btn:hover {
    background: var(--gs-red);
    color: #ffffff;
}

/* ─── Desktop Dropdown ────────────────────────────────────────────── */

#gs-dropdown {
    display: none;
    position: fixed;
    width: 480px;
    max-height: 500px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--gs-radius);
    box-shadow: var(--gs-shadow);
    z-index: 9999;
    padding: 6px 0;
    color: var(--gs-text-main);
    
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

#gs-dropdown::-webkit-scrollbar {
    width: 6px;
}
#gs-dropdown::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
#gs-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

#gs-dropdown.gs-open {
    display: block;
    animation: gs-slide-down 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes gs-slide-down {
    from { opacity: 0; transform: translateY(-10px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═══════════════════════════════════════════════════════════════════
   MOBILE SEARCH OVERLAY
   ═══════════════════════════════════════════════════════════════════ */

#gs-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

#gs-mobile-overlay.gs-mobile-open {
    display: flex;
    flex-direction: column;
    animation: gs-fade-in 0.2s ease-out;
}

@keyframes gs-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.gs-mobile-panel {
    background: #ffffff;
    border-radius: 0 0 20px 20px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.gs-mobile-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gs-mobile-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    background: #f8fafc;
    border: 1.5px solid var(--gs-border);
    border-radius: 50px;
    padding: 10px 16px;
    transition: all 0.2s;
}
.gs-mobile-input-wrap:focus-within {
    background: #ffffff;
    border-color: var(--gs-red);
    box-shadow: 0 0 0 3px var(--gs-red-light);
}
.gs-mobile-input-wrap .gs-input-icon {
    color: #64748b;
}
#gs-mobile-input {
    background: transparent;
    border: none;
    outline: none;
    font-size: 15px;
    font-weight: 500;
    flex: 1;
    color: var(--gs-text-main);
}
#gs-mobile-input::placeholder { color: #94a3b8; }

#gs-mobile-close {
    background: transparent;
    border: 1.5px solid var(--gs-border);
    border-radius: 50px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--gs-text-muted);
    white-space: nowrap;
    transition: all 0.2s;
}
#gs-mobile-close:hover {
    border-color: var(--gs-red);
    color: var(--gs-red);
    background: var(--gs-red-light);
}

#gs-mobile-dropdown {
    display: none;
    max-height: calc(100dvh - 120px);
    overflow-y: auto;
    border-top: 1px solid var(--gs-border);
    margin-top: 12px;
    padding-top: 8px;
    scrollbar-width: thin;
}
#gs-mobile-dropdown.gs-open {
    display: block;
}

/* ═══════════════════════════════════════════════════════════════════
   SHARED: RESULT CONTENT & CATEGORIES
   ═══════════════════════════════════════════════════════════════════ */

.gs-section {
    padding: 4px 0;
}

.gs-section + .gs-section {
    border-top: 1px solid rgba(226, 232, 240, 0.7);
    margin-top: 4px;
    padding-top: 6px;
}

/* Category header */
.gs-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 18px 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gs-text-muted);
}

.gs-section-count {
    background: #f1f5f9;
    color: #475569;
    padding: 1px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
}

/* Individual Result Row */
.gs-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    margin: 2px 8px;
    text-decoration: none;
    color: var(--gs-text-main);
    border-radius: var(--gs-radius-sm);
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.gs-item:hover,
.gs-item.gs-item-active {
    background: var(--gs-red-light);
    color: var(--gs-red);
    text-decoration: none;
    transform: translateX(4px);
}

/* Icon container */
.gs-icon-box {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #475569;
    font-size: 13px;
    transition: all 0.18s ease;
}

.gs-item:hover .gs-icon-box,
.gs-item.gs-item-active .gs-icon-box {
    background: var(--gs-red);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(157, 11, 11, 0.25);
}

/* Item content stack */
.gs-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.gs-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.18s ease;
}

.gs-item:hover .gs-item-name,
.gs-item.gs-item-active .gs-item-name {
    color: var(--gs-red);
}

.gs-item-subtitle {
    font-size: 11.5px;
    color: #94a3b8;
    font-weight: 400;
    margin-top: 1px;
}

/* Type Badge */
.gs-item-badge {
    font-size: 10px;
    font-weight: 700;
    color: #475569;
    background: #f1f5f9;
    padding: 3px 9px;
    border-radius: 12px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.18s ease;
}

.gs-item:hover .gs-item-badge,
.gs-item.gs-item-active .gs-item-badge {
    background: rgba(157, 11, 11, 0.12);
    color: var(--gs-red);
}

/* Hover Right Arrow */
.gs-arrow {
    font-size: 12px;
    color: var(--gs-red);
    opacity: 0;
    transform: translateX(-6px);
    transition: all 0.18s ease;
    flex-shrink: 0;
}

.gs-item:hover .gs-arrow,
.gs-item.gs-item-active .gs-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Safe Text Highlight */
.gs-highlight {
    background: rgba(157, 11, 11, 0.12);
    color: var(--gs-red);
    font-weight: 700;
    border-radius: 3px;
    padding: 0 2px;
}

/* Footer row */
.gs-footer {
    padding: 10px 18px;
    border-top: 1px solid var(--gs-border);
    background: #f8fafc;
    border-radius: 0 0 var(--gs-radius) var(--gs-radius);
    margin-top: 6px;
}
.gs-view-all {
    font-size: 13px;
    font-weight: 600;
    color: var(--gs-red);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
    transition: opacity 0.15s;
}
.gs-view-all:hover {
    opacity: 0.8;
    text-decoration: none;
}
.gs-view-all .fas {
    font-size: 11px;
}

/* ─── Skeleton Loading ────────────────────────────────────────────── */

.gs-loading {
    padding: 14px 16px;
}

.gs-skeleton-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.gs-skeleton-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #f1f5f9;
    flex-shrink: 0;
}

.gs-skeleton-text-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gs-skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: gs-shimmer 1.2s infinite;
}

.gs-skeleton-line-long  { width: 70%; }
.gs-skeleton-line-short { width: 40%; }

@keyframes gs-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.gs-loading-text {
    font-size: 12px;
    color: var(--gs-text-muted);
    text-align: center;
    margin-top: 10px;
    font-weight: 500;
}

/* ─── Empty State ─────────────────────────────────────────────────── */

.gs-empty {
    padding: 28px 20px;
    text-align: center;
}
.gs-empty-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f8fafc;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
}
.gs-empty-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gs-text-main);
    margin: 0 0 4px;
}
.gs-empty-subtitle {
    font-size: 13px;
    color: var(--gs-text-muted);
    margin: 0 0 16px;
}
.gs-empty-suggestions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}
.gs-suggestion-tag {
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 14px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid #e2e8f0;
}
.gs-suggestion-tag:hover {
    background: var(--gs-red);
    color: #ffffff;
    border-color: var(--gs-red);
}
