/* ── Demo Recorder Panel ─────────────────────────────────────────────── */

#demo-recorder-panel {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 300px;
    z-index: calc(var(--z-topbar) - 15000); /* Below topbar */
    display: none;
    flex-direction: column;
    background: rgba(15, 15, 25, 0.95);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    font-family: 'Inter', system-ui, sans-serif;
    color: #e0e0e0;
    overflow: hidden;
    user-select: none;
}

/* ── Header ─────────────────────────────────────────────────────────── */

.recorder-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(99, 102, 241, 0.15);
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    cursor: grab;
}

.recorder-header:active {
    cursor: grabbing;
}

.recorder-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.recorder-icon {
    font-size: 16px;
}

.recorder-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.recorder-close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 16px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.recorder-close-btn:hover {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

/* ── Recording Indicator ────────────────────────────────────────────── */

.recorder-indicator {
    font-size: 11px;
    font-weight: 700;
    color: transparent;
    transition: color 0.3s;
}

.recorder-indicator.recording {
    color: #ff4444;
    animation: recorder-pulse 1s ease-in-out infinite;
}

@keyframes recorder-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ── Body ───────────────────────────────────────────────────────────── */

.recorder-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recorder-status {
    font-size: 12px;
    color: #8b8fa3;
    text-align: center;
    min-height: 18px;
    transition: color 0.3s;
}

/* ── Sections ───────────────────────────────────────────────────────── */

.recorder-section-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #666;
    margin-bottom: 6px;
}

.recorder-segments {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.recorder-segment-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #d0d0d0;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.recorder-segment-btn:hover:not(:disabled) {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
    color: #fff;
}

.recorder-segment-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.seg-icon {
    font-size: 14px;
    width: 20px;
    text-align: center;
}

.seg-label {
    flex: 1;
    text-align: left;
}

.seg-time {
    font-size: 10px;
    color: #666;
    font-variant-numeric: tabular-nums;
}

/* ── Divider ────────────────────────────────────────────────────────── */

.recorder-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 2px 0;
}

/* ── Action Buttons ─────────────────────────────────────────────────── */

.recorder-free-controls {
    display: flex;
    gap: 6px;
}

.recorder-action-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.recorder-start-btn {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.recorder-start-btn:hover:not(:disabled) {
    background: rgba(34, 197, 94, 0.3);
}

.recorder-stop-btn {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.recorder-stop-btn:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.3);
}

.recorder-action-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ── Hint ───────────────────────────────────────────────────────────── */

.recorder-hint {
    font-size: 10px;
    color: #555;
    line-height: 1.4;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}
