/* CAFC Oral Argument Player — scotusgate.com */

.oa-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    min-height: 70vh;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    margin-top: 1.5rem;
}

/* Sidebar */
.oa-sidebar {
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    padding: 1.25rem;
    overflow-y: auto;
    max-height: 85vh;
    position: sticky;
    top: 0;
}
.oa-sidebar h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}
.oa-meta { margin-bottom: 1.25rem; }
.oa-meta-label { font-size: 0.75rem; text-transform: uppercase; color: #64748b; letter-spacing: 0.05em; margin-top: 0.75rem; }
.oa-meta-value { font-size: 0.9rem; color: #334155; margin-top: 0.15rem; }

.oa-speaker-list { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.oa-speaker-item { padding: 0.4rem 0; border-bottom: 1px solid #e2e8f0; font-size: 0.85rem; }
.oa-speaker-item:last-child { border-bottom: none; }

/* Role badges */
.role-badge {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-right: 0.3rem;
    vertical-align: middle;
}
.role-judge { background: #dbeafe; color: #1d4ed8; }
.role-appellant { background: #dcfce7; color: #15803d; }
.role-appellee { background: #ffedd5; color: #c2410c; }
.role-clerk { background: #f1f5f9; color: #475569; }
.role-unknown { background: #fef2f2; color: #991b1b; }

/* Confidence badges */
.conf-badge {
    display: inline-block;
    padding: 0.05rem 0.35rem;
    border-radius: 3px;
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-left: 0.3rem;
    vertical-align: middle;
}
.conf-high { background: #dcfce7; color: #15803d; }
.conf-med { background: #fef9c3; color: #854d0e; }
.conf-low { background: #fef2f2; color: #991b1b; }

/* Main area */
.oa-main {
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

/* Audio bar */
.oa-audio-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #1e293b;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}
.oa-audio-bar audio {
    flex: 1;
    height: 36px;
}
.oa-speed-select {
    background: #334155;
    color: #e2e8f0;
    border: 1px solid #475569;
    border-radius: 4px;
    padding: 0.25rem 0.4rem;
    font-size: 0.8rem;
    cursor: pointer;
}
.oa-speed-select:hover { border-color: #94a3b8; }

/* Transcript area */
.oa-transcript {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}

/* Individual segment */
.oa-segment {
    display: flex;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
    border-left: 3px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
}
.oa-segment:hover { background: #f8fafc; }
.oa-segment.active {
    background: #eff6ff;
    border-left-color: #2563eb;
}
.oa-segment.active.role-appellant-seg { border-left-color: #16a34a; }
.oa-segment.active.role-appellee-seg { border-left-color: #ea580c; }

.oa-seg-time {
    font-family: 'Consolas', 'SF Mono', monospace;
    font-size: 0.75rem;
    color: #94a3b8;
    white-space: nowrap;
    min-width: 3.5rem;
    padding-top: 0.15rem;
    flex-shrink: 0;
}
.oa-seg-speaker {
    font-weight: 600;
    font-size: 0.82rem;
    white-space: nowrap;
    min-width: 10rem;
    flex-shrink: 0;
    padding-top: 0.15rem;
}
.oa-seg-speaker.judge { color: #2563eb; }
.oa-seg-speaker.appellant { color: #16a34a; }
.oa-seg-speaker.appellee { color: #ea580c; }
.oa-seg-speaker.clerk { color: #64748b; }

.oa-seg-text {
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.5;
    flex: 1;
}

/* Keyboard shortcuts hint */
.oa-shortcuts {
    font-size: 0.72rem;
    color: #94a3b8;
    text-align: center;
    padding: 0.5rem;
    border-top: 1px solid #e2e8f0;
}
.oa-shortcuts kbd {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    padding: 0 0.3rem;
    font-size: 0.7rem;
}

/* Responsive */
@media (max-width: 768px) {
    .oa-layout {
        grid-template-columns: 1fr;
        max-height: none;
    }
    .oa-sidebar {
        position: static;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
    .oa-main { max-height: none; }
    .oa-seg-speaker { min-width: 6rem; }
}

/* Listing page */
.oa-list-search {
    margin-bottom: 1rem;
}
.oa-list-search input {
    width: 100%;
    max-width: 400px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
}
