/* Perception stream recorder widget — toggle with F10.
   Modern HUD aesthetic (translucent dark panel, flat border, gold accent). */

#pstream-recorder-widget {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9997;
    width: 260px;
    background: rgba(20, 24, 40, 0.92);
    border: 1px solid #3b2841;
    border-radius: 6px;
    color: #f0ecf6;
    font-family: 'Outfit', 'Segoe UI', system-ui, sans-serif;
    font-size: 12px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    user-select: none;
    display: none;
}
#pstream-recorder-widget.visible { display: block; }

.pstream-rw-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 8px;
    border-bottom: 1px solid #2a2440;
}
.pstream-rw-header-title {
    flex: 1;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    font-size: 11px;
    color: #b5aacb;
}
.pstream-rw-rec-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #2a2440;
    box-shadow: 0 0 0 0 rgba(0,0,0,0);
    transition: background 180ms, box-shadow 180ms;
}
#pstream-recorder-widget.state-recording .pstream-rw-rec-dot {
    background: #e23e3e;
    box-shadow: 0 0 10px rgba(226, 62, 62, 0.75);
    animation: pstream-rw-pulse 1.4s ease-in-out infinite;
}
#pstream-recorder-widget.state-paused .pstream-rw-rec-dot {
    background: #e6c170;
    box-shadow: 0 0 8px rgba(230, 193, 112, 0.5);
}
@keyframes pstream-rw-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.15); opacity: 0.75; }
}

.pstream-rw-hint {
    font-size: 10px;
    color: #8578a0;
    letter-spacing: 0.5px;
}

.pstream-rw-body { padding: 10px 12px 12px; }

.pstream-rw-name {
    width: 100%;
    padding: 7px 9px;
    margin: 2px 0 10px;
    background: #0d0a15;
    border: 1px solid #2a2440;
    border-radius: 4px;
    color: #f0ecf6;
    font-family: inherit;
    font-size: 12px;
    box-sizing: border-box;
    outline: none;
}
.pstream-rw-name:focus { border-color: #e6c170; }
.pstream-rw-name:disabled { opacity: 0.5; }

.pstream-rw-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
    font-size: 11px;
    margin-bottom: 10px;
    color: #b5aacb;
}
.pstream-rw-stat-label {
    color: #8578a0;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-size: 9px;
}
.pstream-rw-stat-value {
    font-variant-numeric: tabular-nums;
    color: #f0ecf6;
}

.pstream-rw-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.pstream-rw-btn {
    padding: 8px 10px;
    background: #13101d;
    border: 1px solid #2a2440;
    border-radius: 4px;
    color: #f0ecf6;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 140ms, border-color 140ms, color 140ms;
}
.pstream-rw-btn:hover {
    background: #1e192c;
    border-color: #e6c170;
    color: #e6c170;
}
.pstream-rw-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: #13101d;
    border-color: #2a2440;
    color: #b5aacb;
}
.pstream-rw-btn.primary {
    background: linear-gradient(180deg, #1e192c 0%, #13101d 100%);
    border-color: #b89545;
    color: #e6c170;
}
.pstream-rw-btn.primary:hover {
    background: linear-gradient(180deg, #251f33 0%, #17141f 100%);
    box-shadow: 0 0 14px rgba(230, 193, 112, 0.25);
}
.pstream-rw-btn.danger { color: #d88; }
.pstream-rw-btn.danger:hover { color: #e23e3e; border-color: #e23e3e; }
.pstream-rw-btn.span-2 { grid-column: span 2; }

.pstream-rw-footer {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #2a2440;
    color: #8578a0;
    font-size: 10px;
    text-align: center;
    letter-spacing: 0.4px;
}
.pstream-rw-footer kbd {
    background: #0d0a15;
    border: 1px solid #2a2440;
    border-radius: 3px;
    padding: 1px 5px;
    font-family: ui-monospace, 'Cascadia Mono', monospace;
    font-size: 9px;
    color: #e6c170;
}
