/* ============================================================================
   Mobile Chapters List — separate view per story
   Replaces the in-context "Chapters" tab in MobilePlayerController.
   ============================================================================ */

.mobile-chapters-list {
    width: 100%;
    padding-bottom: 96px; /* clears tab bar + FAB */
    box-sizing: border-box;
}

/* ---------- Story header (full-bleed colored block) ---------- */
.mcl-header {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 14px 18px 14px;
    color: #fff;
    overflow: hidden;
}

.mcl-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.22) 100%);
    pointer-events: none;
}

.mcl-back {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    border: none;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    z-index: 1;
    backdrop-filter: blur(6px);
}

.mcl-back:active {
    background: rgba(0, 0, 0, 0.4);
}

.mcl-header-body {
    flex: 1;
    min-width: 0;
    z-index: 1;
}

.mcl-header-title {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.25;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.mcl-header-subtitle {
    margin-top: 4px;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.mcl-header-meta {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mcl-header-persons {
    margin-top: 6px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.78);
    font-style: italic;
}

/* ---------- Play full story button ---------- */
.mcl-play-full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    width: 100%;
    padding: 14px 18px;
    background: var(--color-accent-primary, #6ea8ff);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 4px 12px rgba(110, 168, 255, 0.3);
    font-family: inherit;
}

.mcl-play-full:active {
    transform: scale(0.98);
}

/* ---------- Chapter bands ---------- */
.mcl-chapters {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
}

.mcl-chapter {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 80px;
    padding: 12px 14px;
    color: #fff;
    border: none;
    border-radius: 0;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
    font-family: inherit;
    transition: transform 0.15s ease;
    box-shadow: none;
}

.mcl-chapter:active {
    transform: scale(0.98);
}

.mcl-chapter::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.18) 100%);
    pointer-events: none;
    border-radius: inherit;
}

.mcl-chapter-num {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    z-index: 1;
}

/* Chapter thumbnail (deliberate-flooding-meridian I7/D7g) — render when
   chapter has cover_media_id. Number badge overlays bottom-right corner. */
.mcl-chapter-thumb {
    position: relative;
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.18);
    z-index: 1;
}
.mcl-chapter-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.mcl-chapter-thumb-num {
    position: absolute;
    bottom: 2px;
    right: 2px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.mcl-chapter-play {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    color: #1a1d28;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.mcl-chapter-play:active {
    transform: scale(0.92);
}

.mcl-chapter-body {
    flex: 1;
    min-width: 0;
    z-index: 1;
}

.mcl-chapter-title {
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.mcl-chapter-preview {
    margin-top: 4px;
    font-size: 0.8rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.82);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.mcl-chapter-dur {
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    z-index: 1;
}

/* ---------- States ---------- */
.mcl-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 16px;
}

.mcl-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(110, 168, 255, 0.2);
    border-top-color: #6ea8ff;
    border-radius: 50%;
    animation: mcl-spin 0.85s linear infinite;
}

@keyframes mcl-spin {
    to { transform: rotate(360deg); }
}

.mcl-empty {
    text-align: center;
    padding: 60px 24px;
    color: var(--color-text-secondary, rgba(255, 255, 255, 0.6));
    font-size: 0.95rem;
}

.mcl-error {
    margin: 24px 12px;
    padding: 16px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    color: #fca5a5;
    text-align: center;
    font-size: 0.9rem;
}
