/* ========================================
   KEYBOARD SHORTCUTS STYLES
   Item 73/78: Visual feedback and help modal
   ======================================== */

/* ======================================== */
/* SHORTCUT INDICATOR (Toast) */
/* ======================================== */

.shortcut-indicator {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(79, 172, 254, 0.4);
    z-index: 999999;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
    white-space: nowrap;
}

.shortcut-indicator.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ======================================== */
/* SHORTCUTS HELP MODAL */
/* ======================================== */

.keyboard-shortcuts-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.keyboard-shortcuts-modal.show {
    opacity: 1;
    visibility: visible;
}

/* Overlay */
.shortcuts-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

/* Content */
.shortcuts-content {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header */
.shortcuts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.shortcuts-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
}

.shortcuts-close {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shortcuts-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Body */
.shortcuts-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
}

/* Category */
.shortcuts-category {
    margin-bottom: 32px;
}

.shortcuts-category:last-child {
    margin-bottom: 0;
}

.category-title {
    font-size: 16px;
    font-weight: 700;
    color: #4facfe;
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Shortcuts List */
.shortcuts-list {
    display: grid;
    gap: 12px;
}

.shortcut-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.shortcut-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

/* Shortcut Key */
.shortcut-key {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: 700;
    color: white;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

/* Shortcut Description */
.shortcut-description {
    flex: 1;
    margin-left: 16px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

/* Footer */
.shortcuts-footer {
    padding: 20px 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0 0 20px 20px;
}

.shortcuts-footer p {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.shortcuts-footer kbd {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 700;
    color: white;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ======================================== */
/* MOBILE RESPONSIVE */
/* ======================================== */

@media (max-width: 768px) {
    .shortcuts-content {
        width: 95%;
        max-height: 90vh;
    }

    .shortcuts-header {
        padding: 20px 24px;
    }

    .shortcuts-header h2 {
        font-size: 20px;
    }

    .shortcuts-body {
        padding: 20px 24px;
    }

    .shortcuts-category {
        margin-bottom: 24px;
    }

    .category-title {
        font-size: 14px;
    }

    .shortcut-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px;
    }

    .shortcut-description {
        margin-left: 0;
        font-size: 13px;
    }

    .shortcuts-footer {
        padding: 16px 24px;
    }

    .shortcut-indicator {
        font-size: 13px;
        padding: 10px 20px;
    }
}

/* ======================================== */
/* DARK THEME SUPPORT */
/* ======================================== */

[data-theme="dark"] .shortcuts-content {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .shortcut-item {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .shortcut-item:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* ======================================== */
/* LIGHT THEME SUPPORT */
/* ======================================== */

[data-theme="light"] .shortcuts-content {
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .shortcuts-header h2 {
    color: #1a1a1a;
}

[data-theme="light"] .shortcuts-header {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .shortcuts-close {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a1a;
}

[data-theme="light"] .shortcuts-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .category-title {
    color: #0D47A1;
}

[data-theme="light"] .shortcut-item {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .shortcut-item:hover {
    background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .shortcut-key {
    color: #1a1a1a;
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .shortcut-description {
    color: rgba(0, 0, 0, 0.8);
}

[data-theme="light"] .shortcuts-footer {
    background: rgba(0, 0, 0, 0.05);
    border-top-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .shortcuts-footer p {
    color: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .shortcuts-footer kbd {
    color: #1a1a1a;
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

/* ======================================== */
/* SCROLLBAR STYLING */
/* ======================================== */

.shortcuts-body::-webkit-scrollbar {
    width: 8px;
}

.shortcuts-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.shortcuts-body::-webkit-scrollbar-thumb {
    background: rgba(79, 172, 254, 0.5);
    border-radius: 10px;
}

.shortcuts-body::-webkit-scrollbar-thumb:hover {
    background: rgba(79, 172, 254, 0.7);
}

/* ======================================== */
/* REDUCED MOTION */
/* ======================================== */

@media (prefers-reduced-motion: reduce) {
    .shortcut-indicator,
    .shortcuts-content {
        animation: none;
        transition: opacity 0.3s ease;
    }

    .shortcut-item:hover {
        transform: none;
    }

    .shortcuts-close:hover {
        transform: none;
    }
}

/* ======================================== */
/* PRINT */
/* ======================================== */

@media print {
    .shortcut-indicator,
    .keyboard-shortcuts-modal {
        display: none !important;
    }
}

/* ======================================== */
/* ACCESSIBILITY */
/* ======================================== */

/* Focus styles */
.shortcuts-close:focus {
    outline: 2px solid #4facfe;
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .shortcut-key {
        border-width: 2px;
    }
    
    .shortcuts-content {
        border-width: 2px;
    }
}
