/* ------------------------------------------------------------------
   Public Festival List (/festivals/) — Stage 7.1.
   Reuses tokens/components from base.css + components.css, and the real
   .festival-card / .season-pill components from home.css (loaded
   alongside this file) — no parallel design system.
------------------------------------------------------------------ */

.festivals-page {
    padding: 32px 0 64px;
}

/* ===== Compact page hero (not the big homepage hero) ===== */
.festivals-hero {
    max-width: 560px;
    margin: 0 auto 28px;
    text-align: center;
}

.festivals-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--pink-600);
    font-weight: 700;
    font-size: 0.82rem;
    margin: 0 0 6px;
}

.festivals-hero__eyebrow .icon {
    width: 14px;
    height: 14px;
    color: var(--yellow-500);
}

.festivals-hero__title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #173B6C;
}

.festivals-hero__subtitle {
    margin-top: 6px;
    color: var(--gray-600);
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .festivals-hero__title { font-size: 2rem; }
}

/* ===== Search ===== */
.festivals-search {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 520px;
    margin: 0 auto 20px;
    padding: 10px 16px;
    border-radius: var(--radius-pill);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.festivals-search .icon {
    width: 18px;
    height: 18px;
    color: var(--gray-400);
    flex-shrink: 0;
}

.festivals-search input[type="search"] {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--gray-900);
}

.festivals-search input[type="search"]::placeholder {
    color: var(--gray-400);
}

/* ===== Category filter chips (horizontal-scroll-safe on mobile) ===== */
.festivals-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 2px 2px 10px;
    margin-bottom: 6px;
}

.category-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 9px 18px;
    border-radius: var(--radius-pill);
    background: var(--white);
    color: var(--gray-600);
    font-weight: 700;
    font-size: 0.82rem;
    box-shadow: var(--shadow-card);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.category-pill:hover {
    transform: translateY(-2px);
}

.category-pill.is-active {
    background: var(--pink-600);
    color: var(--white);
    box-shadow: 0 10px 22px rgba(240, 80, 140, 0.32);
}

/* ===== Season pills row (reuses .season-pill from home.css) ===== */
.festivals-season-pills {
    justify-content: flex-start;
    margin-top: 0;
    margin-bottom: 28px;
}

.season-pill.is-active {
    background: var(--blue-700);
    color: var(--white);
    box-shadow: 0 10px 20px rgba(30, 99, 168, 0.3);
}

.festivals-clear-btn {
    align-self: center;
}

/* ===== Results grid (wraps, unlike Home's horizontal scroller) ===== */
.festivals-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
}

/* A calmer, browsing-focused grid — the gentle float animation stays a
   Home-only showcase touch, not repeated across a dozen grid cards. */
.festivals-grid .festival-card {
    animation: none;
}

.festivals-grid .festival-card__inner {
    height: 100%;
}

@media (min-width: 640px) {
    .festivals-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .festivals-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 26px;
    }
}

@media (min-width: 1440px) {
    .festivals-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ===== Pagination ===== */
.festivals-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 36px;
}

.festivals-pagination__label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gray-600);
}

@media (max-width: 480px) {
    .festivals-search {
        margin-inline: 4px;
    }
    .festivals-search .btn {
        padding: 9px 14px;
    }
}

/* ------------------------------------------------------------------
   Public Festival Detail (/festivals/<slug>/) — Stage 7.2.
------------------------------------------------------------------ */

.festival-detail {
    padding: 20px 0 56px;
}

/* Stage 7.28 — staff preview banner. Only rendered when preview_mode is
   set (the staff-only preview view); never present on the real public
   Festival detail page. */
.preview-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff6e0;
    border: 1px solid #f2d98b;
    border-radius: var(--radius-lg, 16px);
    padding: 14px 18px;
    margin-bottom: 16px;
}

.preview-banner__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #6b5420;
    font-size: 0.85rem;
}

.preview-banner__text strong {
    font-size: 0.95rem;
}

.preview-banner__back {
    flex-shrink: 0;
    white-space: nowrap;
}

.festival-detail__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-600);
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.festival-detail__back .icon {
    width: 16px;
    height: 16px;
}

.festival-detail__back:hover {
    color: var(--pink-600);
}

/* ===== Hero ===== */
.festival-hero {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-card);
    margin-bottom: 24px;
}

.festival-hero__media {
    position: relative;
    height: 220px;
    background: var(--gray-100);
}

.festival-hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.festival-hero__fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(20, 30, 50, 0.55), rgba(20, 30, 50, 0) 60%);
}

.festival-hero__body {
    padding: 18px 20px 22px;
}

.festival-hero__title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #173B6C;
    line-height: 1.4;
}

.festival-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.festival-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    background: var(--blue-100);
    color: var(--blue-700);
    font-size: 0.78rem;
    font-weight: 700;
}

.festival-chip .icon {
    width: 14px;
    height: 14px;
}

@media (min-width: 640px) {
    .festival-hero__media { height: 320px; }
    .festival-hero__title { font-size: 1.8rem; }
}

@media (min-width: 1024px) {
    .festival-hero__media { height: 380px; }
}

/* ===== Layout: main + aside ===== */
.festival-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
}

@media (min-width: 1024px) {
    .festival-layout {
        grid-template-columns: 1fr 340px;
        gap: 32px;
    }
    .festival-aside {
        position: sticky;
        top: calc(var(--header-height, 76px) + 16px);
    }
}

.festival-section {
    margin-bottom: 28px;
}

.festival-section__title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #173B6C;
    margin-bottom: 12px;
}

.festival-lead {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 10px;
}

.festival-body-text {
    font-size: 0.9rem;
    line-height: 1.9;
    color: var(--gray-600);
}

/* ===== Gallery (reuses .gallery-collage/#galleryLightbox from home.css —
   just a simple wrapping grid here instead of Home's fixed 4-tile mosaic,
   since a festival can have any number of photos). ===== */
.festival-gallery .gallery-collage {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.festival-gallery .gallery-collage__item {
    grid-column: auto;
    grid-row: auto;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
}

@media (min-width: 640px) {
    .festival-gallery .gallery-collage {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 14px;
    }
}

/* ===== Reviews ===== */
.festival-reviews {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.festival-review {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 14px 16px;
}

.festival-review__stars {
    direction: ltr;
    display: inline-flex;
    gap: 2px;
    color: rgba(31, 41, 51, 0.2);
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.festival-review__stars .is-filled {
    color: var(--yellow-500);
}

.festival-review__name {
    display: block;
    font-size: 0.85rem;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.festival-review__comment {
    font-size: 0.86rem;
    line-height: 1.8;
    color: var(--gray-600);
}

/* ===== Terms accordion (native <details>, no custom JS/ARIA needed) ===== */
.festival-accordion {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 14px 18px;
}

.festival-accordion summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    color: #173B6C;
    list-style: none;
}

.festival-accordion summary::-webkit-details-marker {
    display: none;
}

.festival-accordion summary::after {
    content: "+";
    float: left;
    font-size: 1.2rem;
    color: var(--pink-600);
}

.festival-accordion[open] summary::after {
    content: "–";
}

.festival-accordion__body {
    margin-top: 12px;
    font-size: 0.86rem;
    line-height: 1.9;
    color: var(--gray-600);
}

/* ===== Availability / venue card ===== */
.festival-availability-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 18px;
}

.festival-availability-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.festival-availability-line .icon {
    width: 16px;
    height: 16px;
    color: var(--pink-600);
    flex-shrink: 0;
}

.festival-availability-price {
    font-size: 0.92rem;
    color: var(--gray-900);
    margin: 10px 0 16px;
}

.festival-venue-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.festival-venue-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--gray-100);
    font-size: 0.8rem;
    color: var(--gray-600);
}

.festival-venue-item strong {
    color: var(--gray-900);
    font-size: 0.86rem;
}

.festival-badge--muted {
    background: var(--gray-100);
    color: var(--gray-600);
}

.festival-availability-note {
    margin-top: 10px;
    font-size: 0.74rem;
    text-align: center;
    color: var(--gray-400);
}

.festival-availability-empty {
    font-size: 0.86rem;
    line-height: 1.8;
    color: var(--gray-600);
    text-align: center;
    padding: 12px 0;
}

/* Stage 7.36: Coming Soon state on the availability card. */
.festival-availability-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.festival-coming-soon-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 4px 0 14px;
}

.festival-coming-soon-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: var(--gray-100);
    font-size: 0.82rem;
}

.festival-coming-soon-list li span {
    color: var(--gray-600);
}

.festival-coming-soon-list li strong {
    color: var(--gray-900);
    font-weight: 700;
}

.festival-related {
    margin-top: 8px;
}

/* ------------------------------------------------------------------
   Venue / Date / TimeSlot Selection (/festivals/<slug>/select/) — Stage 7.3.
------------------------------------------------------------------ */

.festival-select {
    padding: 20px 0 64px;
}

.festival-select__title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #173B6C;
    margin-top: 8px;
}

.festival-select__subtitle {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* ===== Progress indicator (light, not a heavy wizard) ===== */
.select-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0 0 26px;
}

.select-progress__step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--gray-400);
}

.select-progress__dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--gray-400);
    font-size: 0.78rem;
    flex-shrink: 0;
}

.select-progress__step.is-active {
    color: var(--pink-600);
}

.select-progress__step.is-active .select-progress__dot {
    background: var(--pink-600);
    color: var(--white);
}

.select-progress__step.is-done {
    color: var(--blue-700);
}

.select-progress__step.is-done .select-progress__dot {
    background: var(--blue-100);
    color: var(--blue-700);
}

.select-progress__step.is-disabled {
    opacity: 0.5;
}

.select-progress__step:not(:last-child)::after {
    content: "";
    width: 20px;
    height: 2px;
    background: var(--gray-100);
    margin-inline-start: 4px;
}

/* ===== Step sections ===== */
.select-step {
    margin-bottom: 30px;
}

/* ===== Selectable cards (real <a> links — keyboard/focus accessible by
   default, no custom JS needed for interaction) ===== */
.select-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 640px) {
    .select-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .select-cards { grid-template-columns: repeat(3, 1fr); }
}

.select-cards--dates {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
}

.select-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-card);
    border: 2px solid transparent;
    color: var(--gray-900);
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.select-card:hover {
    transform: translateY(-2px);
}

.select-card:focus-visible {
    outline: 3px solid var(--blue-700);
    outline-offset: 2px;
}

.select-card.is-selected {
    border-color: var(--pink-600);
    box-shadow: 0 10px 22px rgba(240, 80, 140, 0.22);
}

.select-card__title {
    font-size: 0.92rem;
    color: var(--gray-900);
}

.select-card__meta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: var(--gray-600);
}

.select-card__meta .icon {
    width: 13px;
    height: 13px;
    color: var(--pink-600);
    flex-shrink: 0;
}

.select-card__check {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 18px;
    height: 18px;
    color: var(--pink-600);
}

.select-card--slot.is-disabled {
    background: var(--gray-100);
    border: 2px dashed var(--gray-300, #cbd5e1);
    box-shadow: none;
    cursor: not-allowed;
    pointer-events: none;
}

.select-card--slot.is-disabled .select-card__title,
.select-card--slot.is-disabled .select-card__meta {
    color: var(--gray-500);
}

.select-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    align-self: flex-start;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--gray-400, #94a3b8);
    background: var(--white);
    color: var(--gray-600);
    font-size: 0.74rem;
    font-weight: 700;
}

.select-card__badge::before {
    content: "⛔";
    font-size: 0.72rem;
    line-height: 1;
}

.select-card--date {
    align-items: center;
    text-align: center;
    padding: 12px 8px;
}

.select-card__weekday {
    font-size: 0.75rem;
    color: var(--gray-600);
}

.select-card__day {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--gray-900);
}

/* ===== Selection Summary ===== */
.select-summary__card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 18px;
    max-width: 480px;
}

.select-summary__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.86rem;
    color: var(--gray-600);
}

.select-summary__row:last-of-type {
    border-bottom: none;
}

.select-summary__row strong {
    color: var(--gray-900);
}

.select-summary__card .btn {
    margin-top: 16px;
}

/* Stage 7.23: visible keyboard focus for the festival search. */
.festivals-search:focus-within {
    box-shadow: 0 0 0 3px rgba(31, 95, 191, 0.55);
}
