/* TV Remote Controller Styles */

/* Focus indicators for TV navigation */
.focusable {
    transition: all 0.3s ease;
    outline: none;
}

.focusable:focus,
.focusable.focused {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--accent-color);
    border-color: var(--accent-color);
    z-index: 10;
    position: relative;
}

/* Button focus states */
button.focusable:focus,
button.focusable.focused {
    background: var(--accent-color);
    color: white;
    transform: scale(1.1);
}

/* Microphone button focus */
.microphone-button.focusable:focus,
.microphone-button.focusable.focused {
    transform: scale(1.1);
    box-shadow: 0 0 30px var(--accent-color);
}

/* Remote control visual feedback */
.remote-feedback {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--accent-color);
    border-radius: 10px;
    padding: var(--spacing-3) var(--spacing-4);
    font-size: var(--font-size-sm);
    z-index: 100;
    animation: fadeInOut 2s ease;
}

.remote-feedback.red-button {
    border-color: var(--error-color);
    color: var(--error-color);
}

.remote-feedback.green-button {
    border-color: var(--success-color);
    color: var(--success-color);
}

.remote-feedback.yellow-button {
    border-color: var(--warning-color);
    color: var(--warning-color);
}

.remote-feedback.blue-button {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Navigation grid for TV focus management */
.nav-grid {
    display: grid;
    gap: var(--spacing-2);
}

.nav-row {
    display: flex;
    gap: var(--spacing-2);
}

.nav-item {
    min-width: 120px;
    padding: var(--spacing-2) var(--spacing-4);
    text-align: center;
}

/* Volume and channel indicators */
.volume-indicator,
.channel-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-secondary);
    border: 2px solid var(--accent-color);
    border-radius: 15px;
    padding: var(--spacing-6) var(--spacing-8);
    text-align: center;
    z-index: 200;
    animation: fadeInOut 1.5s ease;
}

.volume-indicator h3,
.channel-indicator h3 {
    color: var(--accent-color);
    margin-bottom: var(--spacing-2);
}

.volume-bar {
    width: 200px;
    height: 20px;
    background: var(--bg-primary);
    border-radius: 10px;
    overflow: hidden;
    margin: var(--spacing-2) 0;
}

.volume-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), var(--warning-color), var(--error-color));
    width: 50%;
    transition: width 0.3s ease;
}

/* Remote button mappings visual guide */
.remote-guide {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: var(--spacing-4);
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    z-index: 50;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.remote-guide:hover {
    opacity: 1;
}

.remote-guide h4 {
    color: var(--accent-color);
    margin-bottom: var(--spacing-2);
}

.remote-guide ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.remote-guide li {
    margin-bottom: var(--spacing-1);
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
}

.remote-guide .key {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-size: 10px;
}

.remote-guide .key.red { background: var(--error-color); }
.remote-guide .key.green { background: var(--success-color); }
.remote-guide .key.yellow { background: var(--warning-color); }
.remote-guide .key.blue { background: var(--primary-color); }
.remote-guide .key.ok { background: var(--accent-color); }

/* Accessibility enhancements */
.screen-reader-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #ffffff;
        --text-primary: #ffffff;
        --text-secondary: #ffffff;
        --bg-primary: #000000;
        --bg-secondary: #1a1a1a;
    }
    
    .focusable:focus,
    .focusable.focused {
        border: 3px solid #ffffff;
        box-shadow: 0 0 15px #ffffff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .loading-spinner {
        animation: none;
        border-top-color: var(--accent-color);
    }
}

/* TV-specific focus animations */
@keyframes focusGlow {
    0%, 100% {
        box-shadow: 0 0 20px var(--accent-color);
    }
    50% {
        box-shadow: 0 0 30px var(--accent-color), 0 0 40px var(--accent-color);
    }
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-20px); }
    20%, 80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); }
}

/* Button press animation */
.button-press {
    animation: buttonPress 0.2s ease;
}

@keyframes buttonPress {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}
