/* User-friendly chord selector styles */

/* Main container */
.user-friendly-chord-selector {
    margin: 15px 0;
    padding: 0;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Current chord display */
.chord-display {
    padding: 12px 20px;
    background: linear-gradient(135deg, #4b6cb7, #182848);
    color: white;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
    position: relative;
}

.chord-display .current-chord {
    position: relative;
    padding: 5px 20px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.15);
    transition: all 0.3s;
}

.chord-display .current-chord:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

/* Category tabs */
.chord-category-tabs {
    display: flex;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.chord-category-tab {
    padding: 10px 15px;
    cursor: pointer;
    font-weight: 500;
    color: #6c757d;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    flex: 1;
    text-align: center;
}

.chord-category-tab:hover {
    color: #495057;
    background-color: #e9ecef;
}

.chord-category-tab.active {
    color: #007bff;
    border-bottom-color: #007bff;
    background-color: #e7f1ff;
}

/* Chord options */
.chord-options-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 15px;
    background-color: #fff;
}

.chord-option {
    padding: 8px 15px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    text-align: center;
}

.chord-option:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chord-option.selected {
    background-color: #007bff;
    color: white;
    border-color: #0062cc;
}

/* Styling for different chord types */
.chord-option:contains('Major'):not(:contains('7')):not(:contains('9')) {
    border-left: 3px solid #28a745;
}

.chord-option:contains('Minor'):not(:contains('7')):not(:contains('9')) {
    border-left: 3px solid #dc3545;
}

.chord-option:contains('Diminished') {
    border-left: 3px solid #6610f2;
}

.chord-option:contains('Augmented') {
    border-left: 3px solid #6f42c1;
}

.chord-option:contains('7') {
    border-left: 3px solid #fd7e14;
}

.chord-option:contains('9'), 
.chord-option:contains('11'),
.chord-option:contains('13') {
    border-left: 3px solid #20c997;
}

.chord-option:contains('Sus') {
    border-left: 3px solid #17a2b8;
}

/* Page transition effect */
body.page-transitioning {
    opacity: 0.7;
    transition: opacity 0.3s;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chord-category-tabs {
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .chord-category-tab {
        white-space: nowrap;
        flex: 0 0 auto;
    }
    
    .chord-options-container {
        justify-content: center;
    }
}

/* Keyboard shortcut tooltips */
.chord-option::after {
    content: attr(data-shortcut);
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #343a40;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    white-space: nowrap;
}

.chord-option:hover::after {
    opacity: 1;
}

/* Help button for keyboard shortcuts */
.shortcuts-help {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.shortcuts-help:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

/* Shortcuts modal */
.shortcuts-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.shortcuts-modal.active {
    display: flex;
}

.shortcuts-content {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    max-width: 400px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.shortcuts-title {
    margin-top: 0;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
}

.shortcut-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    align-items: center;
}

.shortcut-key {
    display: inline-block;
    padding: 3px 8px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-family: monospace;
    text-align: center;
}

.shortcuts-close {
    margin-top: 15px;
    padding: 8px 16px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.shortcuts-close:hover {
    background-color: #5a6268;
}
