/* CSS Público Bootstrap - Sistema de Cifras */

/* Variáveis CSS para tema Cifras.com.br */
:root {
    --primary-color: #21a8e0;
    --primary-hover: #014cb1;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    
    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F5F5;
    --bg-card: #FFFFFF;
    --bg-hover: #E8F4FD;
    
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #A9A9A9;
    --text-light: #CCCCCC;
    
    --border-color: #E0E0E0;
    --border-light: #F0F0F0;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    
    --shadow-sm: 0 0.125rem 0.25rem rgba(33, 168, 224, 0.075);
    --shadow: 0 0.5rem 1rem rgba(33, 168, 224, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(33, 168, 224, 0.175);
    --shadow-xl: 0 2rem 4rem rgba(33, 168, 224, 0.2);
}

/* Dark Theme */
[data-bs-theme="dark"] {
    --primary-color: #21a8e0;
    --primary-hover: #014cb1;
    --secondary-color: #adb5bd;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-card: #333333;
    --bg-hover: #404040;
    
    --text-primary: #ffffff;
    --text-secondary: #adb5bd;
    --text-muted: #6c757d;
    --text-light: #495057;
    
    --border-color: #495057;
    --border-light: #343a40;
    
    --shadow-sm: 0 0.125rem 0.25rem rgba(33, 168, 224, 0.3);
    --shadow: 0 0.5rem 1rem rgba(33, 168, 224, 0.4);
    --shadow-lg: 0 1rem 3rem rgba(33, 168, 224, 0.5);
    --shadow-xl: 0 2rem 4rem rgba(33, 168, 224, 0.6);
}

/* Reset e Base */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header Customizado */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-brand i {
    color: #ffc107;
}

/* Header com fundo degradê */
.bg-primary {
    background: linear-gradient(135deg, #21a8e0 0%, #014cb1 100%) !important;
}

/* Busca no Header */
.navbar .input-group {
    max-width: 400px;
}

.navbar .form-control {
    border-radius: 0.375rem 0 0 0.375rem;
}

.navbar .btn-outline-light {
    border-radius: 0 0.375rem 0.375rem 0;
}

/* Cards de Estilos Musicais */
.style-box {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    height: 100%;
}

.style-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.style-box-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.style-box-content p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.style-box .count {
    font-size: 2rem;
    font-weight: 700;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Sistema de Alfabeto */
.alphabet-letter {
    min-width: 45px;
    transition: all 0.3s ease;
}

.alphabet-letter:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.alphabet-letter.active {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.alphabet-letter.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Cards de Cifras */
.cifra-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    height: 100%;
}

.cifra-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.cifra-card-header {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.cifra-card-body {
    padding: 1.5rem;
}

.cifra-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.cifra-meta .badge {
    font-size: 0.75rem;
}

.cifra-preview {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
}

/* Highlight de Acordes */
.chord-highlight {
    background: none;
    color: #dc3545;
    padding: 0;
    border-radius: 0;
    font-weight: 700;
    font-size: 0.7em;
    text-shadow: none;
    box-shadow: none;
    display: inline-block;
    margin: 0 1px;
}

/* Highlight de Acordes - Tema Dark */
[data-bs-theme="dark"] .chord-highlight {
    color: #ff8c42;
}

/* Texto em negrito - Tema Dark */
[data-bs-theme="dark"] strong {
    color: #87ceeb;
}

/* Botões Customizados */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Transposição */
.transposition-controls {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.transposition-controls label {
    font-weight: 600;
    color: var(--text-primary);
}

/* Transposição Compacta */
.transposition-controls-compact {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.transposition-controls-compact:hover {
    opacity: 1;
}

.transposition-group-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.transposition-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-right: 0.25rem;
}

.transposition-arrow {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.transposition-group-compact .form-select-sm {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    min-width: 80px;
}

.transposition-group-compact .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Cifra Text */
.cifra-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.8;
    white-space: pre-wrap;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1.5rem;
}

/* Scrollbar Customizada */
.cifra-preview::-webkit-scrollbar,
.cifra-text::-webkit-scrollbar {
    width: 8px;
}

.cifra-preview::-webkit-scrollbar-track,
.cifra-text::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

.cifra-preview::-webkit-scrollbar-thumb,
.cifra-text::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.cifra-preview::-webkit-scrollbar-thumb:hover,
.cifra-text::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* Responsividade */
@media (max-width: 768px) {
    .style-box {
        padding: 1.5rem;
    }
    
    .style-box .count {
        font-size: 1.5rem;
    }
    
    .cifra-card-header,
    .cifra-card-body {
        padding: 1rem;
    }
    
    .navbar .input-group {
        max-width: 100%;
        margin: 0.5rem 0;
    }
}

@media (max-width: 576px) {
    .style-box {
        padding: 1rem;
    }
    
    .style-box-content h3 {
        font-size: 1.1rem;
    }
    
    .style-box .count {
        font-size: 1.25rem;
    }
    
    .alphabet-letter {
        min-width: 35px;
        font-size: 0.8rem;
    }
    
    .transposition-group-compact {
        justify-content: center;
        gap: 0.25rem;
    }
    
    .transposition-group-compact .form-select-sm {
        min-width: 70px;
        font-size: 0.75rem;
    }
    
    .transposition-label {
        font-size: 0.8rem;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}