/* ==========================================================================
   CheckMyBooking Multi-Theme Stylesheet
   Supports:
   1. .tp-theme: Modern Travelpack Consumer Site Style (travelpack.com)
   2. .agent-theme: Classic Original Sub-Agent White-label Style
   ========================================================================== */

/* --------------------------------------------------------------------------
   Global Reset & Base Settings
   -------------------------------------------------------------------------- */
:root {
    /* Travelpack Consumer Site Colors */
    --tp-blue: #002d62;
    --tp-blue-dark: #001c4a;
    --tp-purple: #621394;
    --tp-purple-alt: #4c1074;
    --tp-searchbar-bg: #cab1e1;
    --tp-orange: #ff6600;
    --tp-orange-hover: #e65c00;
    --tp-gray-bg: #f4f6fa;

    /* Classic Sub-Agent Colors */
    --agent-purple: #3e2b56;
    --agent-purple-dark: #2f1f42;
    --agent-orange: #ff6600;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    line-height: 1.6;
    background-color: #f8f9fa;
}

/* Hide legacy Bootstrap 3 mobile toggle button */
.navbar-toggle {
    display: none !important;
}


/* ==========================================================================
   1. TRAVELPACK CONSUMER SITE THEME (.tp-theme)
   ========================================================================== */
body.tp-theme {
    font-family: 'Roboto', sans-serif;
    color: var(--tp-blue);
    background-color: var(--tp-gray-bg);
    position: relative;
}

/* Hero Background Image for Travelpack Core (dev-, beta-, and checkmybooking.co.uk) */
body.tp-theme {
    background-image: linear-gradient(rgba(244, 246, 250, 0.30), rgba(244, 246, 250, 0.50)), url('https://travelpack-image-bucket.s3.eu-west-2.amazonaws.com/hero/hero-home.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Sticky Top Header Banner & Navigation Wrapper */
.sticky-banner-wrapper {
    position: sticky;
    top: 0;
    z-index: 1040;
    width: 100%;
    transition: all 0.2s ease-in-out;
}

body.tp-theme .sticky-banner-wrapper {
    background-color: #ffffff;
    box-shadow: 0 4px 18px rgba(0, 45, 98, 0.18);
}

.banner-spacing-block {
    margin-bottom: 2rem;
}

/* White Floating Header matching travelpack.com */
body.tp-theme header,
body.tp-theme #header,
body.tp-theme .tp-header {
    background-color: #ffffff !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: none;
    padding: 0.85rem 0;
    margin: 0;
}

body.tp-theme .tp-brand-logo {
    height: 48px !important;
    width: auto;
    filter: none !important;
    -webkit-filter: none !important;
}

body.tp-theme .tp-header-title {
    color: var(--tp-blue);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.2px;
}

/* Modern Professional Navigation Menu for Travelpack */
body.tp-theme #menu-bar,
body.tp-theme #menu {
    background-color: var(--tp-blue) !important;
    box-shadow: none;
    margin-bottom: 0;
    padding: 0;
}

body.tp-theme #menu-bar .nav,
body.tp-theme #menu .nav {
    gap: 0;
}

body.tp-theme #menu-bar .nav-link,
body.tp-theme #menu .nav-link {
    color: rgba(255, 255, 255, 0.88) !important;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.85rem 1.6rem;
    border-radius: 0;
    border-bottom: 3px solid transparent;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

body.tp-theme #menu-bar .nav-link:hover,
body.tp-theme #menu-bar .nav-link:focus,
body.tp-theme #menu .nav-link:hover,
body.tp-theme #menu .nav-link:focus {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.12);
    border-bottom-color: #ffffff;
}

body.tp-theme #menu-bar .nav-link.active,
body.tp-theme #menu .nav-link.active {
    color: #ffffff !important;
    background-color: var(--tp-blue-dark) !important;
    border-bottom: 3px solid var(--tp-orange) !important;
    font-weight: 700;
}

/* Cards & Containers */
body.tp-theme .card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 45, 98, 0.14);
    background-color: #ffffff;
    overflow: hidden;
}

body.tp-theme .card-header.main-color,
body.tp-theme .card-header {
    background-color: var(--tp-blue) !important;
    color: #ffffff !important;
    font-weight: 600;
    padding: 1.15rem 1.5rem;
    border-bottom: none;
}

body.tp-theme .card-header h4,
body.tp-theme .card-header h5 {
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.2px;
}

body.tp-theme .section-title {
    background-color: #dbe5f1;
    color: var(--tp-blue);
    font-weight: 700;
    font-size: 1.15rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 2px solid #c2d4e7;
    letter-spacing: -0.2px;
}

/* Status Badge in Itinerary Headers */
.itinerary-status-badge {
    background-color: #ffc107 !important;
    color: #000000 !important;
    font-weight: 600;
    font-size: 0.82rem;
    padding: 0.35rem 0.85rem;
    border-radius: 4px;
    display: inline-block;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

/* Itinerary Field Labels (teal/blue matching webinternal2 for Travelpack Consumer) */
body.tp-theme .itin-label,
body.tp-theme .text-info {
    color: #17a2b8 !important;
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 0.2rem;
    letter-spacing: 0.1px;
}

body.agent-theme .itin-label {
    color: #5A5751;
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 0.2rem;
    letter-spacing: 0.1px;
}

body.tp-theme .second-color {
    color: var(--tp-blue) !important;
    font-weight: 600;
}

/* Primary Button fallback */
body.tp-theme .btn-primary {
    background-color: var(--tp-purple) !important;
    border-color: var(--tp-purple) !important;
    color: #ffffff !important;
}

/* Footer */
body.tp-theme footer,
body.tp-theme #footer,
body.tp-theme .tp-footer {
    background-color: var(--tp-blue) !important;
    color: #ffffff;
    padding: 1.25rem 0;
    margin-top: auto;
    font-size: 0.9rem;
    box-shadow: 0 -2px 10px rgba(0, 45, 98, 0.1);
}


/* ==========================================================================
   2. ORIGINAL SUB-AGENT THEME (.agent-theme)
   ========================================================================== */
body.agent-theme {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
    background-color: #f1f5f9;
    background: linear-gradient(180deg, #ecf4f8 0%, #f8fafc 100%);
    background-image: none !important;
}

/* Original Sub-Agent Header (Defaults to slate navy #3f4c6c if agent has no custom header or css) */
body.agent-theme .agent-header,
body.agent-theme #header {
    background-color: #3f4c6c;
    margin: 0;
    padding: 1.15rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

body.agent-theme .agent-brand-title,
body.agent-theme #header h1,
body.agent-theme #header h1 a,
body.agent-theme #header .logo-text {
    color: #ffffff !important;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-decoration: none !important;
}

body.agent-theme .agent-header-title,
body.agent-theme #header .checkmybooking,
body.agent-theme #header .checkmybooking a {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.35rem;
    font-weight: 600;
    text-decoration: none !important;
}

/* Navigation Bar: Follows agent layout CSS #menu ul, defaults to dark slate */
body.agent-theme #menu,
body.agent-theme #menu ul {
    margin-bottom: 0;
}

body.agent-theme #menu {
    background-color: #3f4c6c;
}

body.agent-theme #menu ul {
    background-color: transparent;
}

body.agent-theme #menu .nav-link,
body.agent-theme #menu li a {
    color: rgba(255, 255, 255, 0.95);
    padding: 0.65rem 1.4rem;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
    text-decoration: none;
    display: block;
}

body.agent-theme #menu .nav-link:hover,
body.agent-theme #menu .nav-link:focus,
body.agent-theme #menu li:hover a,
body.agent-theme #menu li:hover {
    color: #1e293b !important;
    background-color: #FFFFFF !important;
}

body.agent-theme #menu .nav-link.active,
body.agent-theme #menu li.active a,
body.agent-theme #menu .menu-active,
body.agent-theme #menu li.menu-active a,
body.agent-theme #menu a.menu-active {
    background-color: #FFFFFF !important;
    color: #1e293b !important;
    font-weight: 600;
}

/* Original Card Headers & Colors - Can be overridden by layout specific CSS */
body.agent-theme .main-color {
    background-color: #3f4c6c;
    color: white !important;
}

body.agent-theme .second-color {
    color: #0284c7;
}

body.agent-theme .section-title {
    background-color: #e2e8f0;
    color: #334155;
    font-weight: 700;
    font-size: 1.15rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 2px solid #cbd5e1;
    letter-spacing: -0.2px;
}

body.agent-theme .itin-label {
    color: #475569;
}

body.agent-theme .badge.bg-primary {
    background-color: #3f4c6c !important;
}

body.agent-theme .table-primary {
    --bs-table-bg: #f1f5f9;
}

body.agent-theme .card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

body.agent-theme .card-header {
    padding: 1.25rem 1.75rem;
}

body.agent-theme .form-control {
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.65rem 1rem;
    font-size: 1rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

body.agent-theme .form-control:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 0.25rem rgba(2, 132, 199, 0.15);
}

/* Button & Accent - defaults to orange, or uses agent .main-color */
body.agent-theme .btn-view-booking {
    background-color: var(--agent-orange);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    padding: 0.8rem 2rem;
    letter-spacing: 0.5px;
    width: 100%;
    transition: opacity 0.2s ease, transform 0.1s ease;
}

body.agent-theme .btn-view-booking:hover,
body.agent-theme .btn-view-booking:focus {
    opacity: 0.92;
    color: #fff;
    transform: translateY(-1px);
}

/* Original Footer */
body.agent-theme footer,
body.agent-theme #footer,
body.agent-theme .agent-footer {
    background-color: #3f4c6c;
    color: white;
    padding: 1.25rem 0;
    margin-top: auto;
    font-size: 0.95rem;
}


/* ==========================================================================
   Shared Components: Wait / Search Overlay
   ========================================================================== */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.45);
    z-index: 9999;
    display: none;
}

.search-overlay table {
    width: 100%;
    height: 100%;
}

.search-overlay table td {
    text-align: center;
    vertical-align: middle;
}

.search-overlay .overlay-bg {
    padding: 30px 40px;
    background-color: #ffffff;
    display: inline-block;
    border-radius: 8px;
    box-shadow: 0px 4px 24px rgba(0, 0, 0, 0.25);
    text-align: center;
}

.search-overlay .overlay-bg .txt {
    font-size: 1.15rem;
    font-weight: 600;
}

body.tp-theme .search-overlay .overlay-bg .txt {
    color: var(--tp-blue);
}

body.agent-theme .search-overlay .overlay-bg .txt {
    color: var(--agent-purple);
}

.search-overlay .overlay-bg .bar-loader {
    margin-top: 15px;
}
