/**
 * Keyboard Shortcuts Component Styles
 *
 * Visual feedback for keyboard navigation and shortcuts help modal.
 * Version: 1.0
 */

/* Keyboard-selected item highlight */
.keyboard-selected {
    background-color: #e3f2fd !important;
    border-left: 3px solid #2196f3 !important;
    transition: all 0.2s ease;
}

.keyboard-selected:hover {
    background-color: #bbdefb !important;
}

/* Keyboard key display */
kbd {
    display: inline-block;
    padding: 0.2rem 0.4rem;
    font-size: 0.875em;
    font-weight: 700;
    line-height: 1;
    color: #444;
    background-color: #f7f7f7;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 2px #fff inset;
    white-space: nowrap;
    font-family: 'Courier New', Courier, monospace;
}

kbd + kbd {
    margin-left: 0.25rem;
}

/* Shortcuts modal styling */
#keyboard-shortcuts-modal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

#keyboard-shortcuts-modal .list-group-item {
    padding: 0.75rem 1rem;
    border-left: none;
    border-right: none;
}

#keyboard-shortcuts-modal .list-group-item:first-child {
    border-top: none;
}

#keyboard-shortcuts-modal .list-group-item:last-child {
    border-bottom: none;
}

/* Help link in footer */
.keyboard-shortcuts-help {
    cursor: pointer;
    transition: color 0.2s ease;
}

.keyboard-shortcuts-help:hover {
    color: #007bff !important;
}

/* Visual indicator for shortcuts available */
.shortcut-available::after {
    content: ' ';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #28a745;
    border-radius: 50%;
    margin-left: 0.5rem;
    animation: pulse-shortcut 2s infinite;
}

@keyframes pulse-shortcut {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Tooltip for shortcut hints */
.shortcut-hint {
    position: relative;
}

.shortcut-hint:hover::after {
    content: attr(data-shortcut);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 0.5rem;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 0.75rem;
    border-radius: 3px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

/* Mobile: hide keyboard shortcuts */
@media (max-width: 768px) {
    .keyboard-shortcuts-help {
        display: none;
    }
}
