/* ============================================================
   Site-wide Date Checker flow.
   Figma: "Availability Date Checker" frames (COAST file).
   The FORM state (Your Details + Your Date + action bar) reuses the
   shared .av component system in availability.css verbatim; this file
   only adds the form-state header, the Sort By dropdown variant, and
   the band result-card grid. The results strip/progress live in the
   transplanted .coast-avail panel. Mobile-first. All values reference
   tokens. Load AFTER availability.css. Requires the .av + .dc classes
   on the root.
   ============================================================ */

.dc {
    /* Result-card shadow + radius from the band-display frame. */
    --dc-shadow-card: 0 20px 40px 0 rgba(11, 10, 114, .07);
    --dc-r-card: 20px;
    --dc-reviews: #212529;
    --dc-desc: #5a5d60;
    --dc-sort-ink: #2d3036;
    --dc-fs-date: 16px;
    --dc-fs-date-lg: 18px;
}

/* Host isolation for the transplanted .coast-avail panel. The canonical
   was measured on a bare page (black inherited colour, line-height:normal,
   no Tailwind preflight). These rules undo site leakage only; they lose
   to every .coast-avail .ca-* rule (specificity 0,2,0 vs 0,1,1). */
.coast-avail {
    color: #000;
    line-height: normal;
    border-color: currentColor;
}

.coast-avail *,
.coast-avail *::before,
.coast-avail *::after {
    border-color: currentColor;
}

.coast-avail h2 {
    letter-spacing: normal;
}

/* State visibility is driven by the [hidden] attribute (global rule in
   availability.css). */

/* =========================================================
   Form-state header (white bar above the pink form section)
   ========================================================= */
.dc-formhead {
    background: #fff;
}

.dc-formhead__inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 28px var(--av-pad-page) 20px;
}

.dc-formhead__title {
    margin: 0;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 600;
    color: var(--av-ink);
}

.dc-formhead__subtitle {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--av-ink-2);
}

/* =========================================================
   Results section (white): card grid below the transplanted panel
   ========================================================= */
.dc-results-section {
    background: #fff;
    padding: 24px var(--av-pad-page) 40px;
}

.dc-results-inner {
    max-width: 1240px;
    margin: 0 auto;
}

/* =========================================================
   Card grid + band result card
   ========================================================= */
.dc-results {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
}

.dc-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--dc-r-card);
    box-shadow: var(--dc-shadow-card);
    overflow: hidden;
    padding-bottom: 24px;
    min-width: 0;
}

.dc-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 397 / 268;
    background: #ece8eb;
    /* Visible so the play button can straddle the box's bottom edge without
       being clipped. The swapped-in video fills the box exactly, so no
       clipping is needed here. */
    overflow: visible;
}

.dc-card__medialink {
    display: block;
    width: 100%;
}

.dc-card__img {
    width: 100%;
    aspect-ratio: 397 / 268;
    object-fit: cover;
    display: block;
}

.dc-card__play {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 50%);
    width: 54px;
    height: 54px;
    border-radius: var(--av-r-dropdown);
    background: var(--av-accent);
    border: 3px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    box-sizing: border-box;
    z-index: 3;
}

.dc-card__play img {
    width: 19px;
    height: 22px;
}

.dc-card__body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 51px;
    padding: 0 24px;
    min-width: 0;
}

.dc-card__head {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dc-card__name {
    margin: 0;
    font-family: "Nunito Sans", ui-sans-serif, system-ui, sans-serif;
    font-weight: 800;
    font-size: 24px;
    line-height: 1.1;
    color: var(--dc-reviews);
    text-align: center;
}

.dc-card__name a {
    color: inherit;
    text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
    .dc-card__name a:hover {
        text-decoration: underline;
    }
}

.dc-card__reviews {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dc-card__reviews img {
    flex: none;
    width: 20px;
    height: 20px;
}

.dc-card__reviews a,
.dc-card__reviews span {
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    color: var(--dc-reviews);
    text-decoration: underline;
}

.dc-card__desc {
    margin: 0;
    font-family: "Nunito Sans", ui-sans-serif, system-ui, sans-serif;
    font-size: 16px;
    line-height: 22px;
    color: var(--dc-desc);
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dc-card__price {
    background: var(--av-section-bg);
    border-radius: var(--dc-r-card);
    padding: 8px 12px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    line-height: 30px;
    color: #000;
}

.dc-card__price span {
    display: block;
}

/* Card actions: two-column split matching category listing
   (View Profile outline + Book Band gold). */
.dc-card__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    width: 100%;
    align-items: center;
}

/* Card buttons: shared amber / outline tokens, sized to the 48px
   card-frame variant (medium weight). */
.dc-card__profile,
.dc-card__book {
    height: 48px;
    min-height: 48px;
    padding: 0 12px;
    font-weight: 500;
    box-sizing: border-box;
}

.dc-card__book.av-cta--full {
    padding: 0 24px;
}

/* =========================================================
   Tablet+ / Desktop
   ========================================================= */
@media (min-width: 768px) {
    .dc-results {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .dc-formhead__inner {
        padding: 40px var(--av-pad-page) 24px;
    }

    .dc-formhead__title {
        font-size: 30px;
    }

    .dc-formhead__subtitle {
        font-size: 16px;
    }

    .dc-results-section {
        padding: 36px 100px 60px;
    }

    .dc-results {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (hover: hover) and (pointer: fine) {
    .dc-card__reviews a:hover {
        color: var(--av-accent);
    }
}
