/* ====================================
   Tab 4: Cast & Creatives CSS
   Updated: November 18, 2025
   Version: 1.0
   ==================================== */

/* ====================================
   Tab Content Wrapper
   ==================================== */
.tab-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.tab-section {
    margin-bottom: 2rem;
}

.tab-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
}

.section-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1.5rem;
}

/* ====================================
   Cast Grid Layout
   #263 item 24: 4-across desktop, 2-across phone (square headshots only —
   principals without a headshot never enter this grid, see .cast-text-list)
   ==================================== */
.cast-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 767px) {
    .cast-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

/* ====================================
   Cast Card
   ==================================== */
.cast-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cast-card:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.cast-image-wrapper {
    width: 100%;
    margin-bottom: 1rem;
}

/* Square headshot — no placeholder avatar exists for the no-photo case;
   see .cast-text-list below instead (#263 item 24). */
.cast-headshot {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: var(--htt-radius);
    object-fit: cover;
    border: 4px solid var(--htt-accent-soft);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.cast-info {
    width: 100%;
}

.cast-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
}

/* Small-caps eyebrow above the name, matching .htt-eyebrow's visual
   weight (see public/css/htt-tokens.css) without pulling in that class. */
.cast-role {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--htt-accent);
    margin-bottom: 0.25rem;
}

.cast-bio {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

/* ====================================
   Plain two-column text list (#263 item 24)
   Used for: principals with no headshot_image, Ensemble, Understudies —
   everyone who isn't a photo card gets name + role here, no avatar.
   ==================================== */
.cast-text-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 2rem;
}

.cast-text-item {
    display: flex;
    flex-direction: column;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.cast-text-name {
    font-weight: 600;
    color: #111827;
    font-size: 0.95rem;
}

.cast-text-role {
    font-size: 0.85rem;
    color: #6b7280;
}

@media (max-width: 767px) {
    .cast-text-list {
        gap: 0 1rem;
    }
}

/* ====================================
   Ensemble List
   ==================================== */
.ensemble-section {
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 0.5rem;
}

.ensemble-section .cast-text-item {
    border-bottom-color: rgba(55, 65, 81, 0.12);
}

/* ====================================
   Understudies List
   ==================================== */
.understudies-section {
    padding: 1.5rem;
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 0.5rem;
}

.understudies-section .cast-text-name {
    color: #78350f;
}

.understudies-section .cast-text-role {
    color: #92400e;
    font-style: italic;
}

.understudies-section .cast-text-item {
    border-bottom-color: rgba(146, 64, 14, 0.15);
}

/* ====================================
   Creative Team Grid
   ==================================== */
.creatives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 767px) {
    .creatives-grid {
        grid-template-columns: 1fr;
    }
}

.creative-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.creative-card:hover {
    border-color: var(--htt-accent);
    box-shadow: 0 4px 6px -1px rgba(124, 58, 237, 0.1);
}

.creative-role-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--htt-accent) 0%, var(--htt-accent) 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
}

.creative-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.creative-bio {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.6;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

/* ====================================
   Empty State
   ==================================== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    margin-top: 2rem;
}

.empty-state svg {
    width: 4rem;
    height: 4rem;
    color: #9ca3af;
    margin: 0 auto 1rem;
}

.empty-state p {
    margin-bottom: 0.5rem;
}

/* ====================================
   Mobile Responsive Design
   ==================================== */
@media (max-width: 767px) {
    .tab-content-wrapper {
        padding: 1rem;
    }
    
    .tab-section-title {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 1.25rem;
    }

    .cast-name {
        font-size: 1.125rem;
    }

    .ensemble-section,
    .understudies-section {
        padding: 1rem;
    }
    
    .creative-card {
        padding: 1rem;
    }
}

/* ====================================
   Print Styles
   ==================================== */
@media print {
    .cast-card,
    .creative-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
    
    .cast-card:hover,
    .creative-card:hover {
        transform: none;
        box-shadow: none;
    }
}

