/* Modern Booking Plan Detail Design */
:root {
    --primary-color: #ec7171;
    --text-color: #494949;
    --gray-bg: #f9f9f9;
    --card-bg: #ffffff;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius-md: 12px;
    --radius-sm: 8px;
    --font-heading: 'Outfit', 'Noto Sans JP', sans-serif;
    --font-body: 'Noto Sans JP', sans-serif;
    --border-color: #eeeeee;
}

body {
    font-family: var(--font-body);
    background-color: var(--gray-bg);
}

.booking-detail-container {
    padding: 40px 20px;
    max-width: 1000px;
    /* Readability focused */
    margin: 0 auto;
}

/* Header Section */
.detail-header {
    margin-bottom: 30px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.detail-title {
    font-family: var(--font-heading);
    color: var(--text-color);
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
}

.detail-title i {
    color: var(--primary-color);
    margin-right: 12px;
}

.status-badge {
    background-color: #6c757d;
    color: white;
    font-size: 14px;
    padding: 3px 10px;
    border-radius: 4px;
    margin-left: 12px;
    font-weight: normal;
    vertical-align: middle;
}

.scroll-to-calendar-btn {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.scroll-to-calendar-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Common Card Style */
.detail-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

/* Image Slider */
.slider-container {
    max-width: 800px;
    margin: 0 auto 40px auto;
}

.glide__track {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.glide__slide img {
    width: 100%;
    height: 400px;
    /* Fixed height for consistency */
    object-fit: cover;
}

.slide__info {
    font-size: 0.9rem;
    color: #666;
    margin-top: 10px;
    text-align: center;
    height: 24px;
}

.glide__arrow {
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    transition: background-color 0.2s;
}

.glide__arrow:hover {
    background-color: rgba(255, 255, 255, 1);
}

.glide__arrow--left {
    left: 10px;
}

.glide__arrow--right {
    right: 10px;
}

/* Price Section */
.price-section {
    text-align: right;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.price-item {
    display: inline-block;
    margin-left: 20px;
}

.price-desc {
    font-size: 1rem;
    color: #666;
    margin-right: 8px;
}

.price-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.price-unit {
    font-size: 1rem;
    color: #666;
}

/* Description */
.description-section {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 40px;
}

/* Section Common Styles */
.section-header {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
}

.section-title i {
    color: var(--primary-color);
    margin-right: 10px;
    width: 24px;
    text-align: center;
}

/* Location & Payment Tables */
.info-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.info-table th,
.info-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    vertical-align: top;
}

.info-table th {
    width: 30%;
    font-weight: 600;
    color: #555;
    background-color: #fcfcfc;
    border-radius: 8px 0 0 8px;
}

.info-table td {
    border-radius: 0 8px 8px 0;
}

/* Map */
.map-container {
    margin-top: 20px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.map-container iframe {
    width: 100%;
    height: 350px;
    display: block;
}

/* Calendar Section */
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    /* Increased gap */
    margin-bottom: 25px;
    background: transparent;
    /* Remove container background */
    padding: 0;
}

.legend-item {
    font-size: 1rem;
    /* Larger font */
    display: flex;
    align-items: center;
    background: white;
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    font-weight: 500;
}

.legend-icon {
    font-weight: bold;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 0.9rem;
}

/* Calendar Controls */
.calendar-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    /* Center vertically */
    gap: 10px;
}

.calendar-nav-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
    /* margin-top removed for flex centering */
    flex-shrink: 0;
    /* Prevent button shrinking */
}

.calendar-nav-btn:hover {
    background-color: #f0f0f0;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

#picker {
    background: white;
    border-radius: var(--radius-md);
    flex-grow: 1;
    max-width: 600px;
    /* Reasonable limit */
    /* box-shadow: var(--shadow-sm); removed internal shadow */
}

.air-datepicker.-inline- {
    border-color: var(--border-color);
    width: 100%;
    max-width: 100%;
    height: auto;
    /* Allow height to grow */
    font-size: 1.1rem;
}

.air-datepicker-body--cells {
    grid-template-rows: repeat(auto-fit, minmax(80px, 1fr)) !important;
    grid-auto-rows: minmax(80px, 1fr) !important;
}

.air-datepicker-cell {
    height: auto !important;
    min-height: 80px;
    /* Significantly increase cell height */
}

.air-datepicker-cell.-day- {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    /* Horizontal center */
    justify-content: center !important;
    /* Vertical center */
    text-align: center !important;
    /* Text center */
    padding: 0 !important;
    /* Remove any padding interference */
}

/* Weekend Colors */
/* Sunday (1st column) */
.air-datepicker-body--day-names .air-datepicker-body--day-name.-weekend-:first-child,
.air-datepicker-body--cells .air-datepicker-cell:nth-child(7n+1) {
    color: #e53935 !important;
    /* Red */
}

/* Saturday (7th column) */
.air-datepicker-body--day-names .air-datepicker-body--day-name.-weekend-:last-child,
.air-datepicker-body--cells .air-datepicker-cell:nth-child(7n) {
    color: #1e88e5 !important;
    /* Blue */
}

/* Ensure white text on selected/focused weekend cells */
.air-datepicker-body--cells .air-datepicker-cell.-selected-:nth-child(7n+1),
.air-datepicker-body--cells .air-datepicker-cell.-focus-:nth-child(7n+1),
.air-datepicker-body--cells .air-datepicker-cell.-selected-:nth-child(7n),
.air-datepicker-body--cells .air-datepicker-cell.-focus-:nth-child(7n) {
    color: white !important;
}

/* Timetable Events */
.timetable-section {
    margin-top: 30px;
}

.selected-date-display {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    text-align: center;
    scroll-margin-top: 100px;
    /* Account for fixed header height (90px) + buffer */
}

.timetable-list {
    width: 100%;
    border-collapse: collapse;
}

.timetable-list th {
    background-color: #f0f0f0;
    padding: 12px;
    text-align: center;
    font-weight: 600;
    color: #555;
}

.timetable-list td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.timetable-list tr:last-child td {
    border-bottom: none;
}

.reserve-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    background-color: var(--primary-color);
    color: white !important;
    border: none;
}

.reserve-btn:hover {
    background-color: #ff5252;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(236, 113, 113, 0.4);
}

.reserve-btn.disabled {
    background-color: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Loading Spinner override/adjustment if needed */
.sk-chase {
    margin: 40px auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .booking-detail-container {
        padding: 20px 10px;
    }

    .detail-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .scroll-to-calendar-btn {
        width: 100%;
        text-align: center;
    }

    .glide__slide img {
        height: 250px;
    }

    .info-table th,
    .info-table td {
        display: block;
        width: 100%;
    }

    .info-table th {
        border-radius: 8px 8px 0 0;
        border-bottom: none;
    }

    .info-table td {
        border-radius: 0 0 8px 8px;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 15px;
        /* Separation between rows */
    }

    .calendar-controls {
        flex-direction: row;
        /* Allow wrapping */
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
    }

    /* Calendar takes full width first */
    #picker {
        order: 1;
        margin-bottom: 10px;
        max-width: 100% !important;
        /* Force full width on mobile */
        width: 100% !important;
    }

    /* Buttons go below, side by side */
    .calendar-nav-btn {
        order: 2;
        width: calc(50% - 10px);
        /* Half width minus gap */
        height: 50px;
        /* Larger touch target */
        border-radius: 8px;
        /* Rounded rect instead of circle */
        font-size: 1.2rem;
        margin: 0;
        background-color: white;
        /* Explicit background */
    }

    .air-datepicker,
    .air-datepicker.-inline- {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 0.9rem;
    }

    .air-datepicker-cell {
        min-height: 50px;
        /* Adjust height for mobile */
    }

    .price-section {
        text-align: left;
    }

    .price-item {
        margin-left: 0;
        margin-right: 20px;
        display: block;
        margin-bottom: 10px;
    }
}