/* Hotkey Help Modal Styles */

.hotkey-help-content {
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
}

.hotkey-categories {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.hotkey-category {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.hotkey-category:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.hotkey-category h3 {
    color: var(--accent-primary);
    font-size: 1.2rem;
    margin: 0 0 1rem 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hotkey-category h3::before {
    content: '▸';
    color: var(--accent-secondary);
}

.hotkey-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hotkey-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.hotkey-item:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(4px);
}

.hotkey-keys {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    min-width: 140px;
}

.hotkey-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    flex: 1;
    text-align: right;
}

/* Keyboard Key Styling */
kbd {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
    color: var(--text-primary);
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 
        0 2px 0 var(--border-color),
        0 3px 6px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    white-space: nowrap;
    transition: all 0.2s ease;
}

kbd:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 3px 0 var(--accent-primary),
        0 4px 8px rgba(102, 126, 234, 0.3);
    border-color: var(--accent-primary);
}

/* Modal Footer */
.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    background: var(--bg-tertiary);
    border-radius: 0 0 16px 16px;
}

.hotkey-hint {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Hotkey Badge for Tooltips */
.hotkey-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid var(--accent-primary);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-left: 0.5rem;
}

.hotkey-badge kbd {
    padding: 0.1rem 0.3rem;
    font-size: 0.7rem;
    box-shadow: none;
    border: 1px solid currentColor;
}

/* Tooltip with Hotkey */
.tooltip-with-hotkey {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.tooltip-with-hotkey .hotkey-badge {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hotkey-help-content {
        max-width: 95vw;
    }
    
    .hotkey-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .hotkey-keys {
        min-width: auto;
    }
    
    .hotkey-description {
        text-align: left;
    }
    
    kbd {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
}

/* Dark mode specific adjustments */
@media (prefers-color-scheme: dark) {
    kbd {
        background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
        border-color: #444;
        box-shadow: 
            0 2px 0 #444,
            0 3px 6px rgba(0, 0, 0, 0.5);
    }
    
    kbd:hover {
        box-shadow: 
            0 3px 0 var(--accent-primary),
            0 4px 8px rgba(102, 126, 234, 0.4);
    }
}

/* Animation for help modal */
#hotkey-help-modal .modal-content {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Disabled state */
.hotkeys-disabled .hotkey-badge {
    opacity: 0.5;
    text-decoration: line-through;
}

/* Visual indicator for active hotkey */
.hotkey-active {
    animation: hotkey-pulse 0.3s ease;
}

@keyframes hotkey-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(102, 126, 234, 0);
    }
}
