/**
 * CFRO Component — Shows Directory (Figma v3)
 * @package CFRO
 * @since   4.2.0
 */

/* ── Page layout ── */
.cfro-shows-page {
    padding: 3rem 0 4rem;
    background: var(--cfro-cream);
    min-height: 60vh;
}
.cfro-shows-page .cfro-container {
    max-width: 80rem;      /* 1280px — "max-w-7xl" */
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Page header ── */
.cfro-shows-header {
    text-align: center;
    margin-bottom: 2rem;
}
.cfro-shows-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--cfro-charcoal);
    margin: 0 0 0.25rem;
    line-height: 1.2;
}
.cfro-shows-subtitle {
    color: var(--cfro-charcoal-light);
    font-size: 1rem;
    margin: 0;
}

/* ── Search ── */
.cfro-shows-controls {
    margin-bottom: 2rem;
}
.cfro-shows-search {
    position: relative;
    max-width: 28rem;       /* max-w-md */
    margin: 0 auto 1.5rem;
}
.cfro-shows-search__icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--cfro-charcoal-light);
    pointer-events: none;
}
.cfro-shows-search__input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;  /* pl-10 */
    border: 1px solid rgba(30,30,30,0.15);
    border-radius: 0.5rem;
    background: var(--cfro-white, #fff);
    font-size: 0.875rem;
    font-family: var(--cfro-font-sans, Inter, sans-serif);
    color: var(--cfro-charcoal);
    transition: border-color 0.2s;
    outline: none;
}
.cfro-shows-search__input::placeholder { color: var(--cfro-charcoal-light); opacity: 0.7; }
.cfro-shows-search__input:focus { border-color: var(--cfro-forest); box-shadow: 0 0 0 3px rgba(27,122,90,0.15); }

/* ── Genre filter pills ── */
.cfro-genre-filters {
    text-align: center;
    margin-bottom: 0.5rem;
}
.cfro-genre-filters__label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--cfro-charcoal-light);
    margin-bottom: 0.5rem;
}
.cfro-genre-filters__list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}
.cfro-genre-filter {
    padding: 0.375rem 0.875rem;
    background: transparent;
    border: 1px solid rgba(27,122,90,0.15);
    border-radius: 0.5rem;          /* rounded-md = 8px */
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
    color: var(--cfro-charcoal);
    font-family: var(--cfro-font-sans, Inter, sans-serif);
    line-height: 1.4;
}
.cfro-genre-filter:hover {
    border-color: var(--cfro-forest);
    color: var(--cfro-forest);
    background: rgba(27,122,90,0.05);
}
.cfro-genre-filter.is-active {
    background: var(--cfro-forest);
    color: #fff;
    border-color: var(--cfro-forest);
}

/* ── Show card grid ── */
.cfro-shows-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 640px)  { .cfro-shows-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cfro-shows-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .cfro-shows-grid { grid-template-columns: repeat(4, 1fr); } }

/* ── Show card ── */
.cfro-show-card {
    background: var(--cfro-white, #fff);
    border: 1px solid rgba(27,122,90,0.10);
    border-radius: 0.375rem;     /* rounded-md */
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}
.cfro-show-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: rgba(27,122,90,0.25);
    text-decoration: none;
    color: inherit;
}

/* Card image */
.cfro-show-card__img {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--cfro-sage-pale);
}
.cfro-show-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.cfro-show-card:hover .cfro-show-card__img img {
    transform: scale(1.05);
}
.cfro-show-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cfro-sage);
    opacity: 0.6;
}

/* Card body */
.cfro-show-card__body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.cfro-show-card__title {
    font-size: 1.125rem;           /* text-lg */
    color: var(--cfro-charcoal);
    margin: 0 0 0.25rem;           /* mb-1 */
    line-height: 1.3;
    transition: color 0.2s;
}
.cfro-show-card:hover .cfro-show-card__title {
    color: var(--cfro-forest);
}
.cfro-show-card__host {
    font-size: 0.875rem;            /* text-sm */
    color: var(--cfro-charcoal-light);
    margin: 0 0 0.5rem;             /* mb-2 */
}

/* Genre tags inside card */
.cfro-show-card__genres {
    display: flex;
    gap: 0.25rem;                   /* gap-1 */
    flex-wrap: wrap;
    margin-bottom: 0.75rem;          /* mb-3 */
}
.cfro-genre-tag {
    display: inline-block;
    padding: 0.125rem 0.5rem;       /* py-0.5 px-2 */
    border-radius: 0.375rem;         /* rounded-md */
    font-size: 0.75rem;              /* text-xs */
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
}

/* Schedule info — icon aligns to top when multiple lines */
.cfro-show-card__schedule {
    display: flex;
    align-items: flex-start;
    gap: 0.25rem;                    /* gap-1 */
    font-size: 0.75rem;              /* text-xs */
    color: var(--cfro-charcoal-light);
    margin-top: auto;
}
.cfro-show-card__schedule > svg {
    flex-shrink: 0;
    margin-top: 0.125rem;            /* visually align with first line */
}
.cfro-show-card__schedule-lines {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

/* ── Empty state ── */
.cfro-shows-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--cfro-charcoal-light);
    padding: 3rem 1rem;
    font-size: 0.95rem;
}

/* ── Card hide/show for filtering ── */
.cfro-show-card[hidden] {
    display: none;
}
