/**
 * Controls Styles - Toggle switches, sliders
 */

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 36px;
    height: 18px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #444;
    border-radius: 18px;
    transition: 0.3s;
}

.toggle-switch .slider::before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked+.slider {
    background: var(--color-primary);
}

.toggle-switch input:checked+.slider::before {
    transform: translateX(18px);
}

/* Recording Section */
.recording-section {
    display: flex;
    align-items: center;
    gap: 6px;
}

.record-btn {
    background: #444;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    color: white;
    font-size: 12px;
    transition: all 0.2s;
}

.record-btn:hover {
    background: #555;
}

.record-btn.recording {
    background: #d32f2f;
    animation: pulse 1s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.recording-status {
    font-size: 11px;
    color: #ff6b6b;
    min-width: 80px;
}

.export-btn {
    background: #3d5afe;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    color: white;
    font-size: 12px;
    transition: all 0.2s;
}

.export-btn:hover:not(:disabled) {
    background: #536dfe;
}

.export-btn:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Replay Panel */
.replay-panel {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 30, 50, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(100, 100, 255, 0.3);
    border-radius: 10px;
    padding: 10px 16px;
    z-index: var(--z-toggle);
    min-width: 380px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.replay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.replay-header h4 {
    margin: 0;
    color: #eee;
    font-size: 13px;
}

.replay-close {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 6px;
}

.replay-close:hover {
    color: #fff;
}

.replay-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.replay-controls button {
    background: #3d5afe;
    border: none;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.replay-controls button:hover {
    background: #536dfe;
}

.replay-slider {
    flex: 1;
    height: 4px;
    accent-color: #3d5afe;
}

.replay-frame {
    font-size: 11px;
    color: #aaa;
    min-width: 70px;
    text-align: right;
}

.replay-speed {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #888;
}

.speed-btn {
    background: #333;
    border: 1px solid #555;
    color: #ccc;
    padding: 2px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
}

.speed-btn:hover {
    background: #444;
}

.speed-btn.active {
    background: #3d5afe;
    border-color: #3d5afe;
    color: white;
}