/* ==============================================
   RETURN Africa — Packages Widget
   ============================================== */

/* ---- Package grid ---- */
.ra-nbw-packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}
/* When columns= shortcode param is set, inline style overrides the above */
.ra-nbw-packages-grid[style] {
    grid-template-columns: var(--pkg-cols, repeat(auto-fill, minmax(300px, 1fr)));
}

/* ---- Package card ---- */
.ra-nbw-pkg-card {
    background: #faf7f4;
    border: 1px solid #e8ded5;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ---- Package images ---- */
.ra-nbw-pkg-card-image {
    margin: -20px -20px 16px;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}
.ra-nbw-pkg-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ra-nbw-pkg-single-image {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16 / 6;
}
.ra-nbw-pkg-single-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ra-nbw-pkg-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}
.ra-nbw-pkg-tag {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: #e8ded5;
    color: #302A26;
    border-radius: 20px;
    padding: 2px 10px;
}

.ra-nbw-pkg-card-title,
.ra-nbw-pkg-single-title {
    font-size: 1rem;
    font-weight: 700;
    color: #302A26;
    margin: 0;
    line-height: 1.3;
}
.ra-nbw-pkg-single-title { font-size: 1.4rem; margin-bottom: 4px; }

.ra-nbw-pkg-card-duration,
.ra-nbw-pkg-single-duration {
    font-size: 0.78rem;
    font-weight: 600;
    color: #C7B3A4;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ra-nbw-pkg-card-tagline,
.ra-nbw-pkg-single-tagline {
    font-size: 0.88rem;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

.ra-nbw-pkg-card-legs {
    margin: 4px 0 0;
    padding-left: 18px;
    font-size: 0.82rem;
    color: #302A26;
    line-height: 1.6;
}
.ra-nbw-pkg-card-legs li { margin-bottom: 2px; }
.ra-nbw-pkg-card-legs em { color: #888; font-style: normal; }

.ra-nbw-pkg-card .bw-btn { margin-top: auto; }

/* ---- Single package ---- */
.ra-nbw-pkg-single { max-width: 720px; }
.ra-nbw-pkg-single-desc { font-size: 0.92rem; color: #444; line-height: 1.65; margin: 12px 0; }

.ra-nbw-pkg-section-heading {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #302A26;
    margin: 20px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e8ded5;
}

/* ---- Itinerary list ---- */
.ra-nbw-pkg-itinerary {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ra-nbw-pkg-leg-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    padding: 10px 14px;
    background: #faf7f4;
    border-radius: 4px;
    border-left: 3px solid #e8ded5;
}
.ra-nbw-pkg-leg-type--vehicle  { border-left-color: #C7B3A4; }
.ra-nbw-pkg-leg-type--transfer { border-left-color: #e8b86d; }
.ra-nbw-pkg-leg-type--activity { border-left-color: #dff0d8; }

.ra-nbw-pkg-leg-type-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    background: #e8ded5;
    padding: 2px 8px;
    border-radius: 20px;
    flex-shrink: 0;
}
.ra-nbw-pkg-leg-name { font-weight: 700; color: #302A26; font-size: 0.88rem; }
.ra-nbw-pkg-leg-duration { font-size: 0.78rem; color: #888; }
.ra-nbw-pkg-leg-notes {
    width: 100%;
    margin: 4px 0 0;
    font-size: 0.78rem;
    color: #555;
    font-style: italic;
    line-height: 1.4;
}

/* ---- Terms ---- */
.ra-nbw-pkg-terms {
    font-size: 0.80rem;
    color: #555;
    line-height: 1.6;
    background: #faf7f4;
    border: 1px solid #e8ded5;
    border-radius: 4px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

/* ---- Enquiry modal ---- */
.ra-nbw-pkg-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999998;
}
.ra-nbw-pkg-modal-inner {
    background: #fff;
    border-radius: 8px;
    width: 95vw;
    max-width: 1100px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 12px 50px rgba(0,0,0,0.3);
    position: relative;
    padding: 28px 28px 24px;
}
.ra-nbw-pkg-modal-close {
    position: absolute;
    top: 16px; right: 20px;
    background: transparent;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: #302A26;
    line-height: 1;
}
.ra-nbw-pkg-modal-title {
    font-size: 1rem;
    font-weight: 700;
    color: #302A26;
    margin: 0 0 14px;
    padding-right: 24px;
}

/* Two-column modal layout: description left, form + terms right, with a
   vertical rule between — wider modal to give both columns real room. */
.ra-nbw-pkg-modal-cols {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 28px;
    align-items: start;
}
.ra-nbw-pkg-modal-col-divider {
    background: #e8ded5;
    align-self: stretch;
    width: 1px;
}
.ra-nbw-pkg-modal-col-left,
.ra-nbw-pkg-modal-col-right {
    min-width: 0;
}
.ra-nbw-pkg-modal-col-right .ra-nbw-pkg-modal-divider { margin-top: 0; }
@media (max-width: 720px) {
    .ra-nbw-pkg-modal-cols {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .ra-nbw-pkg-modal-col-divider {
        width: auto;
        height: 1px;
        margin: 20px 0;
    }
}

/* ---- Form ---- */
.ra-nbw-pkg-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}
.ra-nbw-pkg-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #302A26;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.ra-nbw-pkg-form input,
.ra-nbw-pkg-form textarea {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.88rem;
    border: 1px solid #e8ded5;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: inherit;
    color: #302A26;
    background: #faf7f4;
}
.ra-nbw-pkg-form textarea { resize: vertical; min-height: 70px; }

/* ---- Disclaimer ---- */
.ra-nbw-pkg-disclaimer {
    font-size: 0.75rem;
    color: #888;
    font-style: italic;
    margin: 12px 0 16px;
    line-height: 1.5;
}

/* ---- Send button ---- */
.ra-nbw-pkg-send-btn { width: 100%; }

@media (max-width: 900px) {
    /* Override the inline --pkg-cols var too, so a fixed multi-column grid
       still collapses on tablets. [style] raises specificity to match. */
    .ra-nbw-packages-grid,
    .ra-nbw-packages-grid[style] { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .ra-nbw-packages-grid,
    .ra-nbw-packages-grid[style] { grid-template-columns: 1fr; }
}

/* Legs with no admin-entered duration — graceful fallback (Phase 1 fix) */
.ra-nbw-pkg-leg-tbd { color: #b0a89f; font-style: italic; }

/* ============================================================
   Phase 3f — package cards + enquiry modal
   ============================================================ */
.ra-nbw-icon { display: inline-block; vertical-align: -0.16em; flex-shrink: 0; }

/* Region-tinted tags (visual parse aid) */
.ra-nbw-pkg-tag--cape   { background: #e6ecec; color: #304D4F; }
.ra-nbw-pkg-tag--pafuri { background: #eaece0; color: #55602a; }

/* Check-icon inclusions on the card */
.ra-nbw-pkg-card-value-adds { list-style: none; padding-left: 0; margin: 0; }
.ra-nbw-pkg-card-value-adds li {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 0.82rem;
    color: var(--ra-ink, #302A25);
    margin-bottom: 4px;
}
.ra-nbw-pkg-card-value-adds li .ra-nbw-icon { color: var(--ra-accent-2, #6E722E); margin-top: 2px; }

/* Enquiry modal section headings */
.ra-nbw-pkg-section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ra-ink, #302A25);
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--ra-line, #e8ded5);
}
.ra-nbw-pkg-section-head .ra-nbw-icon { color: var(--ra-accent, #6E380F); }

/* Package "from" price (Phase 5a) */
.ra-nbw-pkg-card-from {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ra-ink, #302A25);
    margin: 2px 0 8px;
}
.ra-nbw-pkg-from-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ra-muted, #8a7d70);
}

/* ============================================================
   Tightened package card (labeled Itinerary / Included) +
   clearly-sectioned enquiry modal.
   ============================================================ */
.ra-nbw-pkg-card-body { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ra-nbw-pkg-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.ra-nbw-pkg-meta-item { display: inline-flex; align-items: center; gap: 5px; font-size: 0.78rem; font-weight: 600; color: var(--ra-ink-soft, #5b5148); }
.ra-nbw-pkg-meta-item .ra-nbw-icon { color: var(--ra-accent, #6E380F); }
.ra-nbw-pkg-meta-price { font-weight: 700; color: var(--ra-ink, #302A25); }
.ra-nbw-pkg-card-block { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--ra-line, #e8ded5); }
.ra-nbw-pkg-card-label { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ra-muted, #9a8778); }
.ra-nbw-pkg-card-route { font-size: 0.85rem; color: var(--ra-ink, #302A25); line-height: 1.5; }
.ra-nbw-pkg-route-arrow { color: var(--ra-accent, #6E380F); font-weight: 700; margin: 0 1px; }
.ra-nbw-pkg-card-more { font-size: 0.76rem; font-style: italic; color: var(--ra-muted, #9a8778); margin-top: 2px; }
.ra-nbw-pkg-card-value-adds { list-style: none; padding: 0; margin: 2px 0 0; }
.ra-nbw-pkg-card-value-adds li { display: flex; align-items: flex-start; gap: 7px; font-size: 0.82rem; color: var(--ra-ink, #302A25); margin-bottom: 3px; }
.ra-nbw-pkg-card-value-adds li .ra-nbw-icon { color: var(--ra-accent-2, #6E722E); margin-top: 2px; flex-shrink: 0; }
.ra-nbw-pkg-card-body .bw-btn { margin-top: auto; }

/* Modal sections */
.ra-nbw-pkg-modal-from { font-size: 1rem; font-weight: 700; color: var(--ra-ink, #302A25); margin-bottom: 14px; }
.ra-nbw-pkg-modal-from .ra-nbw-pkg-from-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ra-muted, #8a7d70); }
.ra-nbw-pkg-modal-shead { font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ra-ink, #302A25); margin: 0 0 8px; padding-bottom: 5px; border-bottom: 1px solid var(--ra-line, #e8ded5); }
.ra-nbw-pkg-modal-legs { padding-left: 18px; margin: 0 0 14px; font-size: 0.85rem; color: var(--ra-ink, #302A25); line-height: 1.6; }
.ra-nbw-pkg-modal-legdur { color: var(--ra-muted, #8a7d70); }
.ra-nbw-pkg-modal-legnote { font-size: 0.8rem; color: var(--ra-muted, #8a7d70); font-style: italic; margin-top: 1px; }
.ra-nbw-pkg-modal-incl { padding-left: 18px; margin: 0; font-size: 0.85rem; color: var(--ra-ink, #302A25); line-height: 1.6; }
.ra-nbw-pkg-modal-divider { display: flex; align-items: center; text-align: center; gap: 10px; margin: 20px 0 14px; color: var(--ra-muted, #9a8778); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.ra-nbw-pkg-modal-divider::before, .ra-nbw-pkg-modal-divider::after { content: ""; flex: 1; height: 1px; background: var(--ra-line, #e8ded5); }
