/* TT Tour Booking Popup - Modern & Creative UI */

:root {
    --tt-primary: #6366f1;
    --tt-secondary: #4f46e5;
    --tt-accent: #f43f5e;
    --tt-bg: #ffffff;
    --tt-text: #1e293b;
    --tt-text-light: #64748b;
    --tt-border: #e2e8f0;
    --tt-radius: 16px;
    --tt-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --tt-backdrop: rgba(15, 23, 42, 0.6);
}

.tt-booking-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--tt-backdrop);
    backdrop-filter: blur(4px);
    z-index: 99990;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tt-booking-overlay.open {
    opacity: 1;
    visibility: visible;
}

.tt-booking-modal {
    background: var(--tt-bg);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: var(--tt-radius);
    box-shadow: var(--tt-shadow);
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    grid-template-rows: 100%;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    height: 90vh;
    /* Forced Height */
}

.tt-booking-overlay.open .tt-booking-modal {
    transform: scale(1);
}

/* Mobile Layout */
@media (max-width: 768px) {
    .tt-booking-modal {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        height: auto;
        max-height: 90vh;
        overflow-y: auto;
    }

    .tt-form-grid {
        grid-template-columns: 1fr !important;
        /* Force stack on mobile */
        gap: 10px;
    }

    .tt-passenger-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .tt-modal-sidebar,
    .tt-modal-content {
        padding: 20px;
        overflow-y: visible;
        height: auto !important;
    }
}

/* Close Button */
.tt-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    color: var(--tt-text);
    transition: transform 0.2s;
}

.tt-close-btn:hover {
    transform: rotate(90deg);
}

/* Sidebar / Info Section - Royal Concierge Theme */
.tt-modal-sidebar {
    background: radial-gradient(circle at 0% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        linear-gradient(165deg, #0f172a 0%, #1e293b 100%);
    padding: 40px 30px;
    color: white;
    overflow-y: auto;
    height: 100%;
    min-height: 0;
    position: relative;
    border-right: 1px solid rgba(255, 255, 255, 0.05);

    /* Subtle light glow effect at the top */
    &::before {
        content: '';
        position: absolute;
        top: -100px;
        left: -100px;
        width: 300px;
        height: 300px;
        background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
        pointer-events: none;
    }

    /* Custom Scrollbar - Premium Dark */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.tt-modal-sidebar::-webkit-scrollbar {
    width: 6px;
}

.tt-modal-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.tt-modal-sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

.tt-modal-sidebar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.25);
}



.tt-modal-sidebar h2 {
    color: white;
    margin-top: 0;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tt-package-meta {
    margin-bottom: 2rem;
    color: #cbd5e1;
    /* Lighter slate for better contrast */
    font-size: 0.95rem;
    line-height: 1.8;
}

.tt-modal-sidebar h3 {
    color: #ffffff;
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    border-left: 3px solid #6366f1;
    padding-left: 12px;
}

.tt-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 2rem;
}

.tt-tag {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tt-itinerary-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

.tt-itinerary-item {
    padding-left: 25px;
    position: relative;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.tt-itinerary-item::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 6px;
    width: 14px;
    height: 14px;
    background: #1e293b;
    border: 3px solid #6366f1;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.tt-itinerary-item::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 20px;
    bottom: -20px;
    width: 2px;
    background: linear-gradient(to bottom, #6366f1, transparent);
}


.tt-activity-list {
    list-style: disc;
    margin: 5px 0 0 0;
    padding-left: 20px;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.9);
}

.tt-activity-list li {
    margin-bottom: 3px;
}

.tt-itinerary-item:last-child::after {
    display: none;
}

/* Form Section */
.tt-modal-content {
    padding: 30px;
    overflow-y: auto;
    background: #f8fafc;
    height: 100%;
    min-height: 0;

    /* Custom Scrollbar for Right Panel */
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.5) rgba(0, 0, 0, 0.05);
}

.tt-modal-content::-webkit-scrollbar {
    width: 8px;
}

.tt-modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.tt-modal-content::-webkit-scrollbar-thumb {
    background-color: rgba(99, 102, 241, 0.5);
    border-radius: 4px;
}

.tt-modal-content::-webkit-scrollbar-thumb:hover {
    background-color: rgba(99, 102, 241, 0.8);
}

.tt-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Force 2 columns for compactness */
    gap: 12px;
    /* Reduced gap */
    margin-bottom: 1rem;
}

.tt-passenger-grid {
    grid-template-columns: repeat(3, 1fr);
}

.tt-booking-modal * {
    box-sizing: border-box;
}

.tt-form-full {
    grid-column: 1 / -1;
}

.tt-form-group {
    margin-bottom: 0;
}

.tt-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--tt-text);
    font-size: 0.9rem;
}

.tt-form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--tt-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background: white;
}

.tt-form-control:focus {
    outline: none;
    border-color: var(--tt-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.tt-price-box {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--tt-border);
    text-align: center;
    margin-bottom: 1.5rem;
}

.tt-price-label {
    color: var(--tt-text-light);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.tt-price-amount {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--tt-primary);
}

.tt-submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--tt-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.tt-submit-btn:hover {
    background: var(--tt-secondary);
}

.tt-submit-btn:active {
    transform: scale(0.98);
}

.tt-submit-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

/* Loading / Error States */
.tt-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border: 5px solid #fff;
    border-bottom-color: var(--tt-primary);
    border-radius: 50%;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.tt-error-message {
    color: var(--tt-accent);
    background: #fff1f2;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    display: none;
}

/* Creative Book Now Trigger Button */
.tt-book-now {
    appearance: none;
    background: linear-gradient(135deg, var(--tt-primary), var(--tt-secondary));
    color: white;
    border: none;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgb(99 102 241 / 0.4), 0 2px 4px -1px rgb(99 102 241 / 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 1;
}

.tt-book-now::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--tt-secondary), var(--tt-primary));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.tt-book-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(99 102 241 / 0.5), 0 4px 6px -2px rgb(99 102 241 / 0.3);
}

.tt-book-now:hover::before {
    opacity: 1;
}

/* Includes / Excludes Cards */
.tt-inc-exc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 2rem;
}

.tt-ie-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tt-ie-card h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    /* Explicit white for contrast */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tt-ie-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
}

.tt-ie-card li {
    margin-bottom: 6px;
    position: relative;
    padding-left: 20px;
    line-height: 1.4;
}

.tt-inc li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #4ade80;
    /* Green */
    font-weight: bold;
}

.tt-exc li::before {
    content: '✕';
    position: absolute;
    left: 0;
    color: #f87171;
    /* Red */
    font-weight: bold;
}

/* Mobile adjustments for cards */
@media (max-width: 768px) {
    .tt-inc-exc-grid {
        grid-template-columns: 1fr;
    }
}

/* WooCommerce Checkout UI Stability Fixes - Aggressive Reset */
.woocommerce-checkout p.form-row.terms,
.woocommerce-checkout .wc-terms-and-conditions {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding: 20px !important;
    background: #fcfcfc !important;
    border: 2px solid #6366f1 !important;
    /* Indigo border for visibility */
    border-radius: 12px !important;
    margin-top: 30px !important;
    margin-bottom: 30px !important;
    width: 100% !important;
    clear: both !important;
    position: relative !important;
    z-index: 999 !important;
}

.woocommerce-checkout p.form-row.terms label.checkbox,
.woocommerce-checkout .wc-terms-and-conditions label {
    display: flex !important;
    align-items: flex-start !important;
    gap: 15px !important;
    cursor: pointer !important;
    font-size: 1rem !important;
    line-height: 1.6 !important;
    color: #1e293b !important;
    font-weight: 600 !important;
}

.woocommerce-checkout p.form-row.terms input#terms,
.woocommerce-checkout p.form-row.terms input[type="checkbox"],
.woocommerce-checkout .wc-terms-and-conditions input[type="checkbox"] {
    -webkit-appearance: checkbox !important;
    -moz-appearance: checkbox !important;
    appearance: checkbox !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    margin: 4px 0 0 0 !important;
    padding: 0 !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    border: 1px solid #cbd5e1 !important;
}

/* Ensure text inside terms is also visible */
.woocommerce-checkout p.form-row.terms .woocommerce-terms-and-conditions-checkbox-text {
    display: inline !important;
}

/* Fix for themes that hide the checkbox using absolute positioning */
.woocommerce-checkout input[type="checkbox"]#terms {
    clip: auto !important;
    -webkit-clip-path: none !important;
    clip-path: none !important;
}

/* Ensure the place order button area is also robust */
#payment .place-order {
    padding: 20px !important;
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    margin-top: 20px !important;
}

@media (max-width: 768px) {
    .woocommerce-checkout p.form-row.terms {
        padding: 15px !important;
        margin-top: 20px !important;
    }

    .woocommerce-checkout p.form-row.terms label.checkbox {
        font-size: 0.9rem !important;
    }
}