/* ==========================================================================
   Booking & Conditions Page Styles
   ========================================================================== */

.booking-conditions-section {
    padding: 48px 0 80px;
    background-color: #ffffff;
    font-family: inherit;
}

.booking-conditions-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Sidebar Navigation (Matching Planning Page Layout) */
.booking-conditions-section .essentials-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.booking-conditions-section .essentials-sidebar {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 90px;
    align-self: flex-start;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    padding-right: 6px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.booking-conditions-section .essentials-sidebar::-webkit-scrollbar {
    width: 4px;
}

.booking-conditions-section .essentials-sidebar::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 4px;
}

.booking-conditions-section .essentials-tabs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.booking-conditions-section .tab-item {
    margin: 0;
}

.booking-conditions-section .tab-item a {
    display: flex;
    align-items: center;
    padding: 7px 12px;
    text-decoration: none;
    border-radius: 6px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    color: #247341 !important;
}

.booking-conditions-section .tab-item .tab-name {
    font-size: 13.5px;
    font-weight: 500;
    color: #247341 !important;
    line-height: 1.35;
    white-space: normal;
}

/* Hover State */
.booking-conditions-section .tab-item:hover a {
    background-color: rgba(36, 115, 65, 0.08) !important;
    color: #247341 !important;
}

/* Active State (Matching Planning page) */
.booking-conditions-section .tab-item.active a {
    background-color: #EBF4EE !important;
    border-left-color: #247341 !important;
    color: #247341 !important;
}

.booking-conditions-section .tab-item.active .tab-name {
    font-weight: 700 !important;
    color: #247341 !important;
}

/* Main Content Column */
.booking-conditions-section .essentials-main {
    flex: 1;
    min-width: 0;
    margin-top: 0;
    padding-top: 0;
}

/* Scroll margin for clauses and glance box */
.bc-clause-section,
.bc-glance-box {
    scroll-margin-top: 110px;
}

/* Header Banner (Two-tone green & chartreuse) */
.bc-banner-header {
    margin-bottom: 28px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.bc-banner-top {
    background-color: #247341;
    padding: 18px 26px;
}

.bc-banner-title {
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 34px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.01em;
}

.bc-banner-bottom {
    background-color: #ECE932;
    padding: 10px 26px;
}

.bc-banner-subtitle {
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 16px;
    font-weight: 700;
    color: #247341 !important;
    margin: 0;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

/* Highlights Grid */
.bc-highlights-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.bc-highlight-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-top: 3px solid #247341;
    border-radius: 8px;
    padding: 16px 12px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bc-highlight-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.bc-highlight-val {
    display: block;
    font-size: 19px;
    font-weight: 700;
    color: #247341;
    margin-bottom: 4px;
    line-height: 1.2;
}

.bc-highlight-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    line-height: 1.35;
}

/* Lead text */
.bc-lead {
    font-size: 16px;
    line-height: 1.7;
    color: #334155;
    margin-bottom: 28px;
    background: #fafbfc;
    padding: 18px 22px;
    border-radius: 8px;
    border: 1px solid #eef2f6;
}

/* Key Terms At A Glance */
.bc-glance-box {
    background: #f4f8f5;
    border: 1px solid #d1e5d7;
    border-left: 5px solid #247341;
    border-radius: 8px;
    padding: 22px 24px;
    margin-bottom: 36px;
}

.bc-glance-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #247341 !important;
    margin: 0 0 14px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bc-glance-list {
    list-style: disc;
    margin: 0 0 0 20px;
    padding: 0;
    color: #334155;
    font-size: 14.5px;
    line-height: 1.65;
}

.bc-glance-list li {
    margin-bottom: 8px;
}

.bc-glance-list li:last-child {
    margin-bottom: 0;
}

.bc-glance-list strong {
    color: #247341;
}

/* Sections & Clauses */
.bc-clause-section,
.booking-conditions-section .bc-clause-section,
.essentials-main .bc-clause-section,
.essentials-main .chapter-block.bc-clause-section,
.bc-clause-section.chapter-block {
    border-top: 2px solid #ECE932 !important;
    margin-top: 32px !important;
    padding-top: 24px !important;
}

.bc-section-title,
.essentials-main h2:not(.bc-glance-title) {
    font-size: 20px;
    font-weight: 700;
    color: #247341 !important;
    margin: 0 0 14px 0;
    line-height: 1.35;
}

.bc-clause-p,
.essentials-main > p,
.bc-clause-section p {
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
    margin: 0 0 14px 0;
    text-align: justify;
    text-justify: inter-word;
}

.bc-clause-p:last-child,
.bc-clause-section p:last-child {
    margin-bottom: 0;
}

.bc-clause-num {
    font-weight: 700;
    color: #247341 !important;
    margin-right: 3px;
}

.bc-clause-p strong,
.bc-clause-section p strong {
    color: #247341;
}

/* TinyMCE editor body padding when previewing .essentials-main */
body.essentials-main.mce-content-body {
    max-width: 960px;
    margin: 20px auto;
    padding: 0 20px;
    background: #ffffff;
}

.bc-text-red {
    color: #EE0000 !important;
}

/* Responsive Table (Clause 6) */
.bc-table-wrap {
    overflow-x: auto;
    margin: 18px 0 20px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.bc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
    min-width: 580px;
}

.bc-table th {
    background: #247341 !important;
    color: #ffffff;
    padding: 12px 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
    border: none;
}

.bc-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
    vertical-align: top;
    line-height: 1.5;
}

.bc-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.bc-table tbody tr:last-child td {
    border-bottom: none;
}

.bc-table tbody tr:hover {
    background: #f1f5f9;
}

/* Clause 20 Contact Details (Matching Reference Design) */
#clause-20 .bc-section-title {
    border-bottom: 2px solid #ECE932;
    padding-bottom: 8px;
    margin-bottom: 16px;
}

.bc-contact-plain {
    margin: 14px 0 28px 0;
    color: #B91C1C;
    font-size: 14.5px;
    line-height: 1.65;
}

.bc-contact-plain p {
    margin: 0 0 6px 0;
    color: #B91C1C;
}

.bc-contact-plain p:last-child {
    margin-bottom: 0;
}

.bc-contact-plain .bc-company-name {
    font-weight: 700;
    font-size: 15.5px;
    color: #B91C1C;
}

.bc-contact-plain a {
    color: #B91C1C;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.bc-contact-plain a:hover {
    color: #7F1D1D;
}

/* Bottom CTA Banner (Two-tone green & chartreuse) */
.bc-bottom-banner {
    margin-top: 36px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.bc-bottom-banner-top {
    background-color: #247341;
    padding: 20px 24px 16px;
    text-align: center;
}

.booking-conditions-section .bc-bottom-banner-title,
.essentials-main .bc-bottom-banner-title,
.bc-bottom-banner-top h3,
.bc-bottom-banner-title {
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin: 0 0 6px 0 !important;
    line-height: 1.25 !important;
}

.booking-conditions-section .bc-bottom-banner-desc,
.essentials-main .bc-bottom-banner-desc,
.bc-bottom-banner-top p,
.bc-bottom-banner-desc {
    font-size: 14.5px !important;
    color: #ffffff !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    opacity: 0.95 !important;
}

.bc-bottom-banner-bottom {
    background-color: #ECE932;
    padding: 10px 20px;
    text-align: center;
}

.bc-bottom-banner-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 14.5px;
    font-weight: 700;
    color: #247341;
}

.bc-bottom-banner-links a {
    color: #247341 !important;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.bc-bottom-banner-links a:hover {
    text-decoration: underline;
    opacity: 0.85;
}

.bc-banner-bullet {
    color: #247341;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .booking-conditions-section .essentials-layout {
        flex-direction: column;
        gap: 20px;
    }

    .booking-conditions-section .essentials-sidebar {
        width: 100%;
        position: sticky;
        top: 60px;
        z-index: 100;
        background: #ffffff;
        max-height: none;
        overflow-y: visible;
        padding: 6px 0 10px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
        margin-bottom: 10px;
    }

    .booking-conditions-section .essentials-tabs {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
        padding: 2px 4px 6px;
        scrollbar-width: none;
    }

    .booking-conditions-section .essentials-tabs::-webkit-scrollbar {
        display: none;
    }

    .booking-conditions-section .tab-item {
        flex: 0 0 auto;
    }

    .booking-conditions-section .tab-item a {
        border: 1px solid #d1e5d7;
        border-radius: 20px;
        border-left: 1px solid #d1e5d7;
        padding: 6px 14px;
        white-space: nowrap;
    }

    .booking-conditions-section .tab-item .tab-name {
        white-space: nowrap;
        font-size: 13px;
    }

    .booking-conditions-section .tab-item.active a {
        background-color: #247341 !important;
        border-color: #247341 !important;
    }

    .booking-conditions-section .tab-item.active .tab-name {
        color: #ffffff !important;
    }

    .bc-highlights-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .bc-banner-top {
        padding: 14px 18px;
    }

    .bc-banner-title {
        font-size: 24px !important;
    }

    .bc-banner-bottom {
        padding: 8px 18px;
    }

    .bc-banner-subtitle {
        font-size: 13.5px !important;
    }

    .bc-bottom-banner-title {
        font-size: 20px !important;
    }

    .bc-bottom-banner-desc {
        font-size: 13.5px;
    }

    .bc-bottom-banner-links {
        font-size: 13px;
        gap: 6px 10px;
    }

    .bc-highlights-grid {
        grid-template-columns: 1fr;
    }
    
    .bc-clause-p {
        text-align: left;
    }
}

