/* Keyboard Shortcuts Modal */
.shortcuts-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.shortcuts-modal {
    max-width: 800px;
    width: 100%;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.shortcuts-header {
    background: var(--gray-900);
    color: white;
    padding: 28px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shortcuts-title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.shortcuts-icon {
    font-size: 32px;
}

.shortcuts-title {
    font-size: 24px;
    font-weight: 700;
}

.shortcuts-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-top: 4px;
}

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

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

.shortcuts-body {
    padding: 32px;
    max-height: 60vh;
    overflow-y: auto;
}

.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.shortcuts-section {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 20px;
}

.shortcuts-section-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-600);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.shortcuts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}

.shortcut-action {
    font-size: 14px;
    color: var(--gray-900);
    font-weight: 500;
}

.shortcut-keys {
    display: flex;
    gap: 4px;
    align-items: center;
}

.key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: var(--gray-900);
    color: white;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.key-plus {
    color: var(--gray-500);
    font-size: 14px;
    padding: 0 4px;
}

.shortcuts-footer {
    padding: 20px 32px;
    background: var(--primary-50);
    border-top: 1px solid var(--primary-100);
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary-700);
    font-size: 13px;
}

.shortcuts-footer strong {
    font-weight: 700;
}

/* Keyboard-selected state for list navigation */
.keyboard-selected {
    outline: 2px solid var(--primary-500, #1E78E0) !important;
    outline-offset: -2px;
    background: var(--primary-50, #eff6ff) !important;
    position: relative;
}

.keyboard-selected::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-600, #0066cc);
}

/* Ensure table rows work properly */
tr.keyboard-selected {
    outline-offset: 0;
}

tr.keyboard-selected td {
    background: var(--primary-50, #eff6ff);
}

/* Card-style items */
.requirement-card.keyboard-selected,
.analysis-item.keyboard-selected {
    box-shadow: 0 0 0 2px var(--primary-500, #1E78E0), 0 4px 12px rgba(0,0,0,0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .shortcuts-grid {
        grid-template-columns: 1fr;
    }

    .shortcuts-modal-overlay {
        padding: 20px;
    }

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