/*
 * COMPLETE REPLACEMENT CSS FILE for the dedicated itinerary profiles file.
 * This ensures the new HTML structure (Season -> Traveler Type) works correctly
 * and includes basic, clean styling for the tabs and itinerary tables.
 * * NOTE: This file assumes your main/global CSS handles body, h1, and general typography.
 */

/* ========================================================================= */
/* 1. ITINERARY SPECIFIC HEADINGS */
/* ========================================================================= */
/* Ensuring the headings within the itinerary content look structured */
.tab-content h3, 
.tab-content h4 {
    color: #4a4a4a;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

/* ========================================================================= */
/* 2. CORE TAB FUNCTIONALITY (Do NOT remove these rules) */
/* ========================================================================= */

/* IMPORTANT: All CONTENT containers are hidden by default (display: none) */
/* This covers all main tab content (Season) and all nested sub-tab content (Traveler Type) */

.tab-content,
.sub-tab-content {
    /* Ensures all content blocks are hidden until JS activates them */
    display: none !important; 
    transition: opacity 0.4s ease-in-out; 
}

/* Only the active content is displayed (display: block) */
.tab-content.active,
.sub-tab-content.active {
    /* Ensures the active block is shown, overriding the 'display: none' above */
    display: block !important;
}


/* ========================================================================= */
/* 3. TAB STYLING (Aesthetic and Layout) */
/* ========================================================================= */

/* --- MAIN TAB CONTAINER (Season Tabs) --- */
.tabs {
    overflow: hidden;
    border: 1px solid #ccc;
    background-color: #f1f1f1;
    margin-bottom: 20px;
    border-radius: 4px 4px 0 0;
}

/* Main Tab Buttons (Season buttons) */
.tab-link {
    background-color: inherit;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 18px;
    transition: background-color 0.3s, color 0.3s;
    font-size: 16px;
    font-weight: 500;
}

/* Hover state for main tab buttons */
.tab-link:hover {
    background-color: #ddd;
}

/* Active state for main tab buttons */
.tab-link.active {
    background-color: #fff; /* White background to match the content area */
    font-weight: bold;
    border-bottom: 3px solid #007bff; /* Accent bar */
    /* Adjust margin to cover the container border */
    margin-bottom: -1px; 
}

/* Content wrapper for main tab content */
.tab-content {
    padding: 15px;
    border: 1px solid #ccc;
    border-top: none;
    background-color: #fff;
    min-height: 400px; /* Helps prevent content jump on load */
}


/* --- SUB-TAB STYLING (Traveler Type Tabs) --- */

/* The sub-tab container (holding Traveler Type buttons) */
.sub-tabs {
    border-bottom: 1px solid #eee; 
    margin: 15px 0 10px 0;
    padding-bottom: 5px;
    display: flex; /* Makes buttons line up */
    gap: 5px;
    flex-wrap: wrap;
}

/* Sub-Tab Buttons (Traveler Type buttons) */
.sub-tab-link {
    background-color: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 14px;
    white-space: nowrap; 
}

/* Hover state for sub-tab buttons */
.sub-tab-link:hover {
    background-color: #e9e9e9;
}

/* Active state for sub-tab buttons */
.sub-tab-link.active {
    background-color: #007bff;
    color: white;
    font-weight: bold;
    border-color: #007bff;
}

/* ========================================================================= */
/* 4. ITINERARY TABLE STYLING */
/* ========================================================================= */

/* Container for itinerary tables */
.itinerary-details {
    margin-bottom: 30px;
    overflow-x: auto; 
}

.itinerary-details table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.itinerary-details th, 
.itinerary-details td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: left;
    vertical-align: top;
}

.itinerary-details th {
    background-color: #f7f7f7;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

/* --- Responsive Table Design (Stacking on Mobile) --- */
@media (max-width: 768px) {
    .itinerary-details table {
        border: 0;
    }
    .itinerary-details thead {
        display: none;
    }
    .itinerary-details tr {
        margin-bottom: 10px;
        display: block;
        border: 1px solid #ccc;
        border-radius: 5px;
    }
    .itinerary-details td {
        display: block;
        text-align: right;
        border: none;
        border-bottom: 1px dotted #ccc;
    }
    .itinerary-details td:last-child {
        border-bottom: 0;
    }
    .itinerary-details td:before {
        /* Use the data-label attribute for the header */
        content: attr(data-label);
        float: left;
        font-weight: bold;
        text-transform: uppercase;
        margin-right: 1em;
        color: #555;
    }
}