:root {
    /* V17 Baseline Colors */
    --bg-slate: #1e293b;
    --bg-darker: #0f172a;
    --input-bg: rgba(0, 0, 0, 0.25);
    --input-border: rgba(255, 255, 255, 0.12);
    --border-divider: rgba(255, 255, 255, 0.08);

    --accent-blue: #3b82f6;
    --accent-blue-hover: #60a5fa;
    --accent-green: #22c55e;

    --eco-highlight: #22c55e;

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;

    --smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body,
html {
    width: 100%;
    background-color: var(--bg-slate);
    color: var(--text-primary);
}

.vertical-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--bg-slate);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

/* ---------------------------------
   Inputs (Header)
--------------------------------- */
.app-header {
    padding: 24px 20px 20px;
    background-color: var(--bg-slate);
    z-index: 10;
}

.inputs-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tooltip-container {
    position: relative;
    z-index: 60;
}

.gps-tooltip {
    position: absolute;
    top: -46px;
    right: 0;
    width: 260px;
    text-align: right;
    background: var(--bg-darker);
    color: var(--accent-green);
    font-size: 11px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--accent-green);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s step-end;
    pointer-events: none;
    z-index: 50;
    line-height: 1.4;
}

.gps-tooltip.show {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease, visibility 0s step-start;
}

.gps-tooltip.error {
    color: #ef4444;
    border-color: #ef4444;
}

.input-label {
    font-size: 13.5px;
    font-weight: 700;
    color: #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.text-link-btn {
    background: transparent;
    border: none;
    color: var(--accent-blue);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    transition: var(--smooth);
}

.text-link-btn:active {
    transform: scale(0.96);
}

/* Glowing Green Links */
.green-glow {
    color: var(--accent-green) !important;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
}

.green-glow:hover {
    color: #4ade80 !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}

.white-link {
    color: var(--text-primary) !important;
}

.white-link:hover {
    text-decoration: underline;
}

.input-wrapper {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    padding: 15px 16px;
    transition: var(--smooth);
}

.input-wrapper:focus-within {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.input-wrapper input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    width: 100%;
    outline: none;
    font-weight: 500;
}

/* Extended placeholders accommodated cleanly */
.input-wrapper input::placeholder {
    color: var(--text-secondary);
    opacity: 0.8;
    font-size: 14px;
}

/* ---------------------------------
   Scheduling Controls & Pickers
--------------------------------- */
.schedule-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 4px;
}

.schedule-toggle {
    display: flex;
    background: var(--input-bg);
    border-radius: 14px;
    padding: 6px;
    border: 1px solid var(--input-border);
}

.schedule-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    padding: 12px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--smooth);
}

.schedule-btn:hover {
    color: #e2e8f0;
}

.schedule-btn.active {
    background: var(--accent-green);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.schedule-datetime {
    display: flex;
    gap: 12px;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
    max-height: 80px;
    opacity: 1;
}

.schedule-datetime.hidden {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

.date-outer-wrapper {
    flex: 1;
    position: relative;
}

.datetime-input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-primary);
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    color-scheme: dark;
    outline: none;
    position: relative;
    transition: var(--smooth);
}

.datetime-input:focus {
    border-color: rgba(255, 255, 255, 0.4);
}

.datetime-input::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* ------------------------------------
   Maps (Daylight preserved)
------------------------------------ */
.map-container-hud {
    height: 35vh;
    width: 100%;
    flex-shrink: 0;
    border-top: 1px solid var(--border-divider);
    border-bottom: 1px solid var(--border-divider);
    background-color: #ededed;
}

/* ------------------------------------
   Options Section Form Controls
------------------------------------ */
.options-section {
    padding: 24px 20px;
    background-color: var(--bg-slate);
    flex-grow: 1;
}

/* Passengers */
.pax-control {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-divider);
}

.control-label {
    font-size: 16px;
    font-weight: 600;
}

/* V16 Clean Alignment Fixes */
.select-wrapper {
    position: relative;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 8px 16px;
}

.glass-select {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    text-align: left;
    padding-right: 20px;
    direction: ltr;
}

.glass-select option {
    background: #0f172a;
    color: #fff;
    direction: ltr;
}

.select-wrapper::after {
    content: "▾";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    font-size: 14px;
}

/* Checkboxes */
.checkbox-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 24px;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    cursor: pointer;
    font-size: 15.5px;
    font-weight: 500;
    color: #e2e8f0;
    transition: var(--smooth);
    user-select: none;
}

.custom-checkbox:hover {
    color: #ffffff;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 24px;
    width: 24px;
    background-color: var(--input-bg);
    border: 1.5px solid var(--input-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--smooth);
}

.custom-checkbox input:checked~.checkmark {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
}

.checkmark:after {
    content: "";
    display: none;
    width: 6px;
    height: 12px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.custom-checkbox input:checked~.checkmark:after {
    display: block;
}

/* ---------------------------------
   Sticky Footer & CTA Logic Validation (V17 Base Changes)
--------------------------------- */
.sticky-footer {
    position: sticky;
    bottom: 0px;
    padding: 24px 20px 30px;
    background-color: var(--bg-darker);
    border-top: 1px solid var(--border-divider);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.5);
    z-index: 20;
    display: flex;
    flex-direction: column;
}

.estimate-btn {
    width: 100%;
    height: 56px;
    border-radius: 16px;
    font-size: 17.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

/* V17 Default Suppressed Slate Base */
.cta-slate {
    background: #22c55e;
    /* Forced Green by default */
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

.cta-slate:hover {
    background: #475569;
}

/* V17 Active CTA Glow Pulse (Revealed by JS) */
@keyframes pulseGlowCta {
    0% {
        box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
    }

    50% {
        box-shadow: 0 0 24px rgba(34, 197, 94, 0.8);
    }

    100% {
        box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
    }
}

.cta-glow {
    background: var(--accent-green);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: pulseGlowCta 2.5s infinite cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(1.05);
}

.cta-glow:hover {
    background: #16a34a;
    transform: translateY(-2px);
    filter: brightness(1.15);
}

.estimate-btn.loading {
    background: #1f2937;
    color: #9ca3af;
    pointer-events: none;
    animation: none;
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.05);
}

/* The transitional wrapper */
.checkout-section {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease-in, visibility 0.6s step-end;
}

.checkout-section.revealed {
    max-height: 800px;
    opacity: 1;
    visibility: visible;
    transition: max-height 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s ease-out, visibility 0s step-start;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Pricing Display */
.pricing-display {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--input-border);
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    color: var(--text-secondary);
}

.eta-metrics .price-value {
    color: #bae6fd;
    font-weight: 500;
}

.price-row.highlight {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--border-divider);
}

.price-value {
    font-weight: 600;
}

.eco-highlight-text {
    color: var(--eco-highlight) !important;
    font-weight: 600;
}

.disclaimer-text {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-secondary);
    text-align: center;
}

/* Wallet Buttons */
.wallet-buttons {
    display: flex;
    gap: 12px;
}

@keyframes pulseGlowWallet {
    0% { box-shadow: 0 0 10px rgba(34, 197, 94, 0.3); }
    50% { box-shadow: 0 0 22px rgba(34, 197, 94, 0.7); }
    100% { box-shadow: 0 0 10px rgba(34, 197, 94, 0.3); }
}

.wallet-btn {
    flex: 1;
    height: 52px;
    border-radius: 26px;
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    background: rgba(0,0,0,0.85); 
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--smooth);
}

.wallet-btn.conversion-glow {
    animation: pulseGlowWallet 2.5s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.wallet-btn:hover {
    background: #000;
    transform: translateY(-1px);
}

.wallet-btn:active {
    transform: scale(0.96);
}

.wallet-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.apple-icon,
.gpay-icon {
    display: flex;
    align-items: center;
}

.pay-text-apple {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 19px;
    font-weight: 600;
    line-height: 1;
    margin-left: 2px;
    letter-spacing: -0.3px;
}

.pay-text-google {
    font-family: "Product Sans", "Google Sans", Roboto, Arial, sans-serif;
    font-size: 19px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.3px;
}

/* V16 Partnership UI text hooks mapping fluid bottom constraints */
.partnership-text {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 4px;
    margin-bottom: 4px;
    opacity: 0.7;
    letter-spacing: 0.2px;
    line-height: 1.4;
}

/* ------------------------------------
   Toast Validations
------------------------------------ */
.toast-message {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #ef4444;
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    pointer-events: none;
    text-align: center;
}

.toast-message.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ------------------------------------
   In-Page Notifications (Rural Fallback)
------------------------------------ */
.rural-notice {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.5;
    transition: opacity 0.4s ease;
    opacity: 0;
    display: none;
}

.rural-notice.show {
    opacity: 1;
    display: block;
}

/* Rural Warning Amber Fade Animation */
@keyframes amberGlowFade {
    0%   { color: #fbbf24; text-shadow: 0 0 12px rgba(251, 191, 36, 0.8); }
    70%  { color: #fbbf24; text-shadow: 0 0 12px rgba(251, 191, 36, 0.8); }
    100% { color: #ffffff; text-shadow: none; }
}

.amber-fade-text {
    animation: amberGlowFade 4s ease forwards;
    display: inline;
}

/* =========================================
   B2B PARTNER HUD STYLES
========================================= */

/* CRITICAL: Prevent Flexbox Blowout */
.inputs-container, .input-block {
    min-width: 0;
    max-width: 100%;
}

.b2b-hud-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
    min-width: 0; /* Ensures the swipeable menu doesn't stretch screen width */
}

.hud-tabs {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
    scrollbar-width: none; /* Firefox */
}

.hud-tabs::-webkit-scrollbar {
    display: none; /* Safari and Chrome hidden scrollbar */
}

.hud-tab {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--smooth);
}

.hud-tab:hover {
    color: #e2e8f0;
}

.hud-tab.active {
    background: var(--accent-blue);
    color: #ffffff;
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.partner-card {
    display: none; /* Hidden by default */
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 12px;
    animation: fadeIn 0.3s ease;
}

.partner-card.active-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Hero Variant for Direct Affiliates (e.g. Princess Rose) */
.partner-card.hero-card {
    padding: 0;
    overflow: hidden;
    flex-direction: column;
    align-items: stretch;
}

.partner-card.hero-card.active-card {
    display: flex;
    justify-content: flex-start;
}

.partner-hero-img {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.partner-billboard {
    width: 100%;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    padding: 8px 0;
}

.partner-info h4 {
    font-size: 14px;
    color: #ffffff;
    margin-bottom: 2px;
}

.partner-info p {
    font-size: 12px;
    animation: pulseGreenTextGlow 2s infinite ease-in-out;
}

@keyframes pulseGreenTextGlow {
    0% { color: #22c55e; text-shadow: 0 0 4px rgba(34, 197, 94, 0.4); }
    50% { color: #4ade80; text-shadow: 0 0 10px rgba(34, 197, 94, 0.8); }
    100% { color: #22c55e; text-shadow: 0 0 4px rgba(34, 197, 94, 0.4); }
}

.partner-actions {
    display: flex;
    gap: 8px;
}

.hud-btn {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--smooth);
}

.call-btn {
    background: transparent;
    border: 1px solid var(--border-divider);
    color: #ffffff;
}

.cab-btn {
    background: var(--accent-blue);
    border: none;
    color: #ffffff;
    animation: pulseBlueGlow 2.5s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.cab-btn:hover {
    filter: brightness(1.1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Blue Pulse Animation for 'Cab From' Input Wrapper */
@keyframes pulseBlueGlow {
    0% { box-shadow: 0 0 10px rgba(59, 130, 246, 0.3); border-color: rgba(59, 130, 246, 0.5); }
    50% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.8); border-color: rgba(59, 130, 246, 1); }
    100% { box-shadow: 0 0 10px rgba(59, 130, 246, 0.3); border-color: rgba(59, 130, 246, 0.5); }
}

.pulse-blue-permanent {
    animation: pulseBlueGlow 2.5s infinite cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* =========================================
   PREMIUM TOURS SCROLLABLE WHEEL API
========================================= */

.scrollable-partner-card {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

.scrollable-partner-card.active-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.partner-scroll-area {
    display: flex;
    align-items: stretch; /* Forces all cards in the wheel to automatically match the height of the tallest card */
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 8px; /* Appends physical space for shadow breathing */
    width: 100%;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.partner-scroll-area::-webkit-scrollbar {
    display: none;
}

.inner-partner-card {
    flex: 0 0 100%;
    min-width: 100%;
    max-width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    scroll-snap-align: start;
}

.inner-partner-card .partner-info {
    margin-bottom: 12px;
}

/* GetYourGuide Card Specifics */
.gyg-card {
    padding: 0; /* Give iframe full dimension */
    background: #ffffff; /* GYG branding needs white background */
    border: none;
    overflow: hidden;
    justify-content: center;
}

.gyg-widget-wrapper {
    width: 100%;
    height: 100%;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}
