/* 
 * PraiseChords Design System
 * Custom styles using CSS Custom Properties
 * Configuration based on design-system.json
 */

html {
    height: 100%;
}

body {
    min-height: 100%;
}

:root {
    /* === MAHOGANY/CLAY BRAND COLORS === */
    /* Primary Color Palette - Rich Mahogany Brown */
    --color-primary: #52382f;
    --color-primary-light: #7a5649;
    --color-primary-dark: #3a251e;
    --color-primary-contrast: #ffffff;

    /* Secondary Color Palette - Warm Taupe */
    --color-secondary: #8b7355;
    --color-secondary-light: #a89179;
    --color-secondary-dark: #6b5640;
    --color-secondary-contrast: #ffffff;

    /* Status Colors - Natural Earthy Tones */
    --color-success: #3d5a3c;
    --color-success-light: #5d8a5b;
    --color-success-dark: #2a3f29;

    --color-danger: #a84332;
    --color-danger-light: #c96354;
    --color-danger-dark: #7d2f22;

    --color-warning: #d4a574;
    --color-warning-light: #e3c29a;
    --color-warning-dark: #b38550;

    --color-info: #5c7d8a;
    --color-info-light: #7d9caa;
    --color-info-dark: #435d68;

    /* Neutral Colors - Warm Creamy Tones */
    --color-light: #f7f3ef;
    --color-light-light: #ffffff;
    --color-light-dark: #ebe5dd;

    --color-dark: #2a1f1a;
    --color-dark-light: #3f342c;
    --color-dark-dark: #1a120e;

    /* Custom Application Colors - Mahogany/Clay Theme */
    --color-chord: #52382f;
    --color-chord-bg: #f9f1ed;
    --color-lyrics: #2a1f1a;
    --color-section-bg: #f7f3ef;
    --color-accent: #9c6f52;
    --color-accent-light: #c49675;
    --color-accent-dark: #73523a;

    /* Additional Color Variations */
    --color-mahogany: #52382f;
    --color-mahogany-light: #7a5649;
    --color-mahogany-dark: #3a251e;
    --color-clay: #9c6f52;
    --color-clay-light: #c49675;
    --color-clay-dark: #73523a;
    --color-sand: #d4a574;
    --color-sand-light: #e3c29a;
    --color-sand-dark: #b38550;
    --color-sage: #8b9a7e;
    --color-sage-light: #a8b89b;
    --color-sage-dark: #6b7a5f;

    /* Legacy bronze aliases for backwards compatibility */
    --color-bronze: #52382f;
    --color-bronze-light: #7a5649;
    --color-bronze-dark: #3a251e;
    --color-copper: #9c6f52;
    --color-copper-light: #c49675;
    --color-copper-dark: #73523a;
    --color-warm-gray: #8b7355;
    --color-warm-gray-light: #a89179;
    --color-warm-gray-dark: #6b5640;

    /* === TYPOGRAPHY === */
    --font-family-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family-secondary: Georgia, 'Times New Roman', serif;
    --font-family-monospace: 'Courier New', Courier, monospace;
    --font-family-display: 'Inter', -apple-system, sans-serif;

    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;

    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    --line-height-loose: 2;
    --line-height-song: 1.8;

    --letter-spacing-tight: -0.025em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.025em;
    --letter-spacing-wider: 0.05em;
    --letter-spacing-widest: 0.1em;

    /* === SPACING === */
    --spacing-0: 0;
    --spacing-1: 0.25rem;
    --spacing-2: 0.5rem;
    --spacing-3: 0.75rem;
    --spacing-4: 1rem;
    --spacing-5: 1.25rem;
    --spacing-6: 1.5rem;
    --spacing-8: 2rem;
    --spacing-10: 2.5rem;
    --spacing-12: 3rem;
    --spacing-16: 4rem;
    --spacing-20: 5rem;
    --spacing-24: 6rem;

    /* === BORDER RADIUS === */
    --radius-none: 0;
    --radius-sm: 0.25rem;
    --radius-base: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* === SHADOWS === */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);

    /* === TRANSITIONS === */
    --transition-fast: 150ms;
    --transition-base: 200ms;
    --transition-slow: 300ms;
    --transition-slower: 500ms;

    /* === Z-INDEX === */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-offcanvas: 1050;
    --z-modal: 1060;
    --z-popover: 1070;
    --z-tooltip: 1080;

    /* Bootstrap compatibility */
    --bs-primary: var(--color-primary);
    --bs-secondary: var(--color-secondary);
    --bs-success: var(--color-success);
    --bs-info: var(--color-info);
    --bs-warning: var(--color-warning);
    --bs-danger: var(--color-danger);
    --bs-light: var(--color-light);
    --bs-dark: var(--color-dark);
}

/* === DARK THEME - MAHOGANY === */
[data-theme="dark"] {
    /* Background Colors - Deep Rich Browns */
    --color-bg-primary: #1a120e;
    --color-bg-secondary: #2a1f1a;
    --color-bg-tertiary: #221813;

    /* Text Colors - Warm Creams */
    --color-text-primary: #f7f3ef;
    --color-text-secondary: #d4cdc4;
    --color-text-disabled: #8b7d72;

    /* Application Colors - Clay/Sand Dark Theme */
    --color-chord: #c49675;
    --color-chord-bg: rgba(196, 150, 117, 0.12);
    --color-lyrics: #f7f3ef;
    --color-section-bg: #221813;
    --color-accent: #9c6f52;
    --color-accent-light: #c49675;
    --color-accent-dark: #73523a;

    /* Neutral Colors Override */
    --color-light: #221813;
    --color-light-dark: #1a120e;
    --color-dark: #f7f3ef;

    /* Border - Warm Brown */
    --color-border: #3f342c;

    /* Enhanced Primary Colors for Dark Mode */
    --color-primary: #9c6f52;
    --color-primary-light: #c49675;
    --color-primary-dark: #7a5649;

    /* Bootstrap compatibility */
    --bs-body-bg: var(--color-bg-primary);
    --bs-body-color: var(--color-text-primary);
    --bs-card-bg: var(--color-bg-secondary);
    --bs-border-color: var(--color-border);
    --bs-primary: var(--color-primary);
}

[data-theme="dark"] .bg-light {
    background-color: var(--bg-section) !important;
}

[data-theme="dark"] .card {
    background-color: var(--bs-card-bg);
    border-color: var(--bs-border-color);
}

[data-theme="dark"] .navbar-dark {
    background-color: #1a1a1a !important;
}

/* Font Size Classes */
.font-size-small {
    font-size: 0.875rem;
}

.font-size-medium {
    font-size: 1rem;
}

.font-size-large {
    font-size: 1.125rem;
}

.font-size-extra-large {
    font-size: 1.25rem;
}

/* Song Display Styles - See chords.css for chord-specific styling */
.lyrics-line {
    color: var(--lyrics-color);
    margin: 0.5rem 0;
}

/* Playlist Cards */
.playlist-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.playlist-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Song Cards */
.song-card {
    transition: transform 0.2s ease;
}

.song-card:hover {
    transform: translateY(-2px);
}

.song-meta {
    font-size: 0.875rem;
    color: #6c757d;
}

.song-meta .badge {
    font-size: 0.75rem;
}

/* Favorite Button */
.favorite-btn {
    transition: all 0.2s ease;
}

.favorite-btn:not(.favorited):hover {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
}

.favorite-btn.favorited {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.favorite-btn.favorited:hover {
    background-color: #bb2d3b;
    border-color: #b02a37;
}

/* Search and Filter Styles */
.filter-section {
    background: var(--bs-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--bs-dark);
    margin-bottom: 0.5rem;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .song-content {
        font-size: 0.875rem;
        line-height: 1.6;
    }

    .key-selector {
        justify-content: center;
    }

    .transpose-controls {
        text-align: center;
    }

    .hero-section {
        padding: 3rem 0;
    }

    .display-4 {
        font-size: 2rem;
    }
}

/* Print Styles */
@media print {

    .navbar,
    .footer,
    .transpose-controls,
    .btn,
    .card-footer {
        display: none !important;
    }

    .song-content {
        font-size: 12pt;
        line-height: 1.5;
    }

    .chord {
        background: none !important;
        color: black !important;
        font-weight: bold;
    }

    .card {
        border: none !important;
        box-shadow: none !important;
    }
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
    border-color: var(--bs-primary);
}

/* Animation for smooth transitions */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility Classes */
.text-primary-light {
    color: rgba(44, 90, 160, 0.7) !important;
}

.bg-primary-light {
    background-color: rgba(44, 90, 160, 0.1) !important;
}

.border-primary-light {
    border-color: rgba(44, 90, 160, 0.3) !important;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* === WEBSITE SETTINGS STYLES === */

/* Theme Transitions */
* {
    transition: background-color var(--transition-base) ease,
        color var(--transition-base) ease,
        border-color var(--transition-base) ease;
}

/* Settings Button in Navbar */
.navbar .nav-link.btn-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 0.425rem 0.5rem;
    border: none;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.25;
}

.navbar .nav-link.btn-link:hover {
    color: rgba(255, 255, 255, 1);
}

.navbar .nav-link.btn-link i {
    font-size: 1rem;
}

/* Dark Theme Body Styles */
[data-theme="dark"] body {
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
}

[data-theme="dark"] .navbar-dark {
    background-color: #1a1a1a !important;
}

[data-theme="dark"] .bg-light {
    background-color: var(--color-bg-secondary) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .text-muted {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .card {
    background-color: var(--color-bg-secondary);
    border-color: var(--color-border);
    color: var(--color-text-primary);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: var(--color-bg-tertiary);
    color: var(--color-text-primary);
    border-color: var(--color-border);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background-color: var(--color-bg-tertiary);
    color: var(--color-text-primary);
    border-color: var(--bs-primary);
}

[data-theme="dark"] .modal-content {
    background-color: var(--color-bg-secondary);
    color: var(--color-text-primary);
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    border-color: var(--color-border);
}

[data-theme="dark"] footer {
    background-color: #0d0d0d !important;
}

[data-theme="dark"] .alert-info {
    background-color: rgba(13, 202, 240, 0.15);
    border-color: rgba(13, 202, 240, 0.3);
    color: var(--color-text-primary);
}

/* Note: Chord display styles moved to chords.css */

/* High Contrast Mode */
[data-high-contrast="true"] {
    --color-primary: #0000FF;
    --color-text-primary: #000000;
    --color-bg-primary: #FFFFFF;
}

[data-high-contrast="true"] * {
    border-width: 2px !important;
}

[data-high-contrast="true"] .btn {
    font-weight: 700;
}

[data-high-contrast="true"] a {
    text-decoration: underline;
    font-weight: 600;
}

/* Reduced Motion */
[data-reduce-motion="true"] * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}

/* Enhanced Focus Indicators */
[data-enhanced-focus="true"] *:focus {
    outline: 3px solid var(--bs-primary) !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 4px rgba(44, 90, 160, 0.25) !important;
}

[data-enhanced-focus="true"] .btn:focus {
    outline: 3px solid var(--bs-primary) !important;
    outline-offset: 3px !important;
}

/* Font Size Scaling */
.font-size-small {
    font-size: 0.875rem !important;
}

.font-size-small .h1,
.font-size-small h1 {
    font-size: 1.75rem !important;
}

.font-size-small .h2,
.font-size-small h2 {
    font-size: 1.5rem !important;
}

.font-size-small .h3,
.font-size-small h3 {
    font-size: 1.25rem !important;
}

.font-size-small .h4,
.font-size-small h4 {
    font-size: 1rem !important;
}

.font-size-small .h5,
.font-size-small h5 {
    font-size: 0.875rem !important;
}

.font-size-small .h6,
.font-size-small h6 {
    font-size: 0.75rem !important;
}

.font-size-medium {
    font-size: 1rem !important;
}

.font-size-large {
    font-size: 1.125rem !important;
}

.font-size-large .h1,
.font-size-large h1 {
    font-size: 2.75rem !important;
}

.font-size-large .h2,
.font-size-large h2 {
    font-size: 2.25rem !important;
}

.font-size-large .h3,
.font-size-large h3 {
    font-size: 1.875rem !important;
}

.font-size-large .h4,
.font-size-large h4 {
    font-size: 1.5rem !important;
}

.font-size-large .h5,
.font-size-large h5 {
    font-size: 1.25rem !important;
}

.font-size-large .h6,
.font-size-large h6 {
    font-size: 1.125rem !important;
}

.font-size-extra-large {
    font-size: 1.25rem !important;
}

.font-size-extra-large .h1,
.font-size-extra-large h1 {
    font-size: 3rem !important;
}

.font-size-extra-large .h2,
.font-size-extra-large h2 {
    font-size: 2.5rem !important;
}

.font-size-extra-large .h3,
.font-size-extra-large h3 {
    font-size: 2rem !important;
}

.font-size-extra-large .h4,
.font-size-extra-large h4 {
    font-size: 1.75rem !important;
}

.font-size-extra-large .h5,
.font-size-extra-large h5 {
    font-size: 1.5rem !important;
}

.font-size-extra-large .h6,
.font-size-extra-large h6 {
    font-size: 1.25rem !important;
}

/* Settings Modal Specific Styles */
.settings-section {
    padding: 0.5rem 0;
}

.settings-section h6 {
    letter-spacing: 0.5px;
}

#settingsModal .btn-group .btn-outline-primary {
    flex: 1;
    min-height: 80px;
}

#settingsModal .btn-check:checked+.btn-outline-primary {
    background-color: var(--bs-primary);
    color: white;
}

#settingsModal .form-range::-webkit-slider-thumb {
    background: var(--bs-primary);
}

#settingsModal .form-range::-moz-range-thumb {
    background: var(--bs-primary);
}

#settingsModal .form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

/* Dark Mode Scrollbar */
[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #555;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* Smooth Theme Transition Exception for Specific Elements */
.btn,
.badge,
.alert {
    transition: background-color var(--transition-fast) ease,
        color var(--transition-fast) ease,
        border-color var(--transition-fast) ease,
        transform var(--transition-fast) ease;
}

/* Songs List Table Styles */
.song-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.song-row:hover {
    background-color: var(--color-light);
}

[data-theme="dark"] .song-row:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    border-bottom: 2px solid var(--color-border);
}

.table tbody td {
    vertical-align: middle;
    padding: 1rem 0.75rem;
}

/* Song Search Component - Full Width */
.song-search-component {
    width: 100% !important;
}

.song-search-component .search-form,
.song-search-component .search-bar-wrapper,
.song-search-component .input-group {
    width: 100% !important;
    max-width: 100% !important;
}

.song-search-component .form-control {
    flex: 1 1 auto !important;
}

/* === MAHOGANY THEME ENHANCEMENTS === */

/* Modern Mahogany Gradient Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--color-mahogany) 0%, var(--color-clay) 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(82, 56, 47, 0.3);
    transition: all var(--transition-base) ease;
    color: #ffffff !important;
    font-weight: 600;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-mahogany-light) 0%, var(--color-clay-light) 100%);
    box-shadow: 0 4px 12px rgba(82, 56, 47, 0.4);
    transform: translateY(-1px);
    color: #ffffff !important;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(82, 56, 47, 0.35);
    color: #ffffff !important;
}

/* Override for small buttons in cards - use sand color for contrast */
.card .btn-sm.btn-primary,
.card-footer .btn-sm.btn-primary {
    background: var(--color-sand);
    border-color: var(--color-sand);
    color: var(--color-mahogany-dark);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(82, 56, 47, 0.2);
}

.card .btn-sm.btn-primary:hover,
.card-footer .btn-sm.btn-primary:hover {
    background: var(--color-sand-light);
    border-color: var(--color-sand-light);
    color: var(--color-mahogany-dark);
    box-shadow: 0 2px 6px rgba(82, 56, 47, 0.3);
}

.card .btn-sm.btn-primary:active,
.card-footer .btn-sm.btn-primary:active {
    background: var(--color-sand-dark);
    border-color: var(--color-sand-dark);
}

/* Secondary Button with Warm Gray */
.btn-secondary {
    background-color: var(--color-warm-gray) !important;
    border-color: var(--color-warm-gray) !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(139, 115, 85, 0.3);
    transition: all var(--transition-base) ease;
}

.btn-secondary:hover {
    background-color: var(--color-warm-gray-dark) !important;
    border-color: var(--color-warm-gray-dark) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(139, 115, 85, 0.4);
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(139, 115, 85, 0.35);
    color: #ffffff !important;
}

/* Ensure icons in buttons inherit the button text color */
.btn i,
.btn .bi {
    color: inherit !important;
}

/* Success Button with Green */
.btn-success {
    background-color: var(--color-sage);
    border-color: var(--color-sage);
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(61, 90, 60, 0.3);
    transition: all var(--transition-base) ease;
}

.btn-success:hover {
    background-color: var(--color-sage-dark);
    border-color: var(--color-sage-dark);
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(61, 90, 60, 0.4);
    transform: translateY(-1px);
}

.btn-success:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(61, 90, 60, 0.35);
    color: #ffffff !important;
}

/* Card Enhancements with Mahogany Accents */
.card {
    border: 1px solid rgba(82, 56, 47, 0.18);
    box-shadow: 0 2px 8px rgba(82, 56, 47, 0.1);
    transition: all var(--transition-base) ease;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(82, 56, 47, 0.18);
    border-color: rgba(82, 56, 47, 0.28);
}

.card-header {
    background: linear-gradient(135deg, rgba(82, 56, 47, 0.06) 0%, rgba(156, 111, 82, 0.06) 100%);
    border-bottom: 2px solid rgba(82, 56, 47, 0.18);
}

/* Mahogany Accent for Links */
a {
    color: var(--color-clay);
    transition: color var(--transition-fast) ease;
}

a:hover {
    color: var(--color-clay-dark);
}

/* Darker links in specific contexts */
.card a,
.list-group-item a {
    color: var(--color-mahogany-dark);
}

.card a:hover,
.list-group-item a:hover {
    color: var(--color-mahogany);
}

/* Navigation Bar Mahogany Theme */
.navbar {
    background: linear-gradient(135deg, var(--color-mahogany) 0%, var(--color-mahogany-dark) 100%);
    box-shadow: 0 2px 12px rgba(82, 56, 47, 0.3);
}

[data-theme="dark"] .navbar {
    background: linear-gradient(135deg, #2a1f1a 0%, #1a120e 100%);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.navbar-brand {
    font-weight: 700;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.navbar-brand:hover {
    color: var(--color-sand-light) !important;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    transition: all var(--transition-fast) ease;
    display: inline-flex;
    align-items: center;
    line-height: 1.5;
}

.nav-link:hover {
    color: #ffffff !important;
    transform: translateY(-1px);
}

.nav-link.active {
    color: #ffffff !important;
    font-weight: 600;
    border-bottom: 2px solid var(--color-sand);
}

/* Navbar icons - white */
.navbar .bi,
.navbar-brand .bi {
    color: #ffffff !important;
}

/* Navbar buttons */
.navbar .btn-outline-light {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
}

.navbar .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #ffffff;
    color: #ffffff;
}

.navbar .btn-primary {
    background: var(--color-sand);
    border: none;
    color: var(--color-mahogany-dark);
    font-weight: 600;
}

.navbar .btn-primary:hover {
    background: var(--color-sand-light);
    color: var(--color-mahogany-dark);
}

/* Navbar dropdown menus */
.navbar .dropdown-menu {
    background: var(--color-mahogany);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar .dropdown-item {
    color: rgba(255, 255, 255, 0.9);
}

.navbar .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.navbar .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Mobile navbar toggler */
.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
}

.navbar-toggler-icon {
    filter: brightness(0) invert(1);
}

/* Navbar text elements */
.navbar-text {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Additional navbar form controls */
.navbar .form-control {
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.navbar .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.navbar .form-control:focus {
    background-color: rgba(255, 255, 255, 0.25);
    border-color: var(--color-sand);
    color: #ffffff;
    box-shadow: 0 0 0 0.25rem rgba(212, 165, 116, 0.25);
}

/* Navbar links in all states */
.navbar a:not(.btn) {
    color: rgba(255, 255, 255, 0.9);
}

.navbar a:not(.btn):hover {
    color: #ffffff;
}

/* User dropdown in navbar */
.navbar .dropdown-toggle {
    color: rgba(255, 255, 255, 0.9) !important;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar .dropdown-toggle:hover {
    color: #ffffff !important;
}

/* Settings icon in navbar */
.navbar [data-bs-toggle="modal"] {
    color: rgba(255, 255, 255, 0.9) !important;
}

.navbar [data-bs-toggle="modal"]:hover {
    color: #ffffff !important;
}

/* Mobile dropdown menu fixes */
@media (max-width: 991.98px) {

    /* Make dropdown menu appear above content */
    .navbar-nav .dropdown-menu {
        position: absolute !important;
        top: 100%;
        right: 0;
        left: auto;
        margin-top: 0.125rem;
        min-width: 200px;
        z-index: var(--z-dropdown, 1050);
    }

    /* Fix dropdown positioning within navbar collapse */
    .navbar-collapse .navbar-nav .dropdown {
        position: relative;
    }

    /* Prevent button from jumping when dropdown opens */
    .navbar-nav .dropdown-toggle {
        width: auto;
        text-align: left;
        justify-content: flex-start;
    }

    /* Ensure user dropdown stays in place */
    .navbar-nav .nav-item.dropdown {
        position: relative;
    }
}

/* === NAVIGATION TABS STYLES === */

/* Tab navigation - ensure proper contrast */
.nav-tabs .nav-link {
    color: var(--color-dark) !important;
    background-color: transparent !important;
    border: 1px solid transparent !important;
    border-bottom-color: var(--color-light-dark) !important;
}

.nav-tabs .nav-link:hover {
    color: var(--color-primary) !important;
    background-color: var(--color-light) !important;
    border-color: var(--color-light-dark) var(--color-light-dark) #fff !important;
}

.nav-tabs .nav-link.active {
    color: var(--color-primary) !important;
    background-color: #fff !important;
    border-color: var(--color-light-dark) var(--color-light-dark) #fff !important;
    border-bottom-color: #fff !important;
}

/* Dark theme tabs */
[data-theme="dark"] .nav-tabs .nav-link {
    color: rgba(255, 255, 255, 0.7) !important;
    background-color: transparent !important;
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .nav-tabs .nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.1) rgba(255, 255, 255, 0.1) rgba(42, 31, 26, 0.8) !important;
}

[data-theme="dark"] .nav-tabs .nav-link.active {
    color: #ffffff !important;
    background-color: var(--color-dark) !important;
    border-color: rgba(255, 255, 255, 0.1) rgba(255, 255, 255, 0.1) var(--color-dark) !important;
    border-bottom-color: var(--color-dark) !important;
}

/* === HERO SECTION STYLES === */

/* Hero section with primary background */
.bg-primary {
    background: linear-gradient(135deg, var(--color-mahogany) 0%, var(--color-mahogany-dark) 100%) !important;
}

/* Hero section text - ensure it's white */
.bg-primary .display-4,
.bg-primary h1,
.bg-primary h2,
.bg-primary h3,
.bg-primary .text-white {
    color: #ffffff !important;
}

/* Hero section icons */
.bg-primary .bi,
.bg-primary i {
    color: #ffffff !important;
}

/* Hero section lead/paragraph text */
.bg-primary .lead,
.bg-primary p {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* Hero section buttons */
.bg-primary .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.6);
    color: #ffffff;
}

.bg-primary .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
    color: #ffffff;
}

.bg-primary .btn-light {
    background-color: var(--color-sand);
    border-color: var(--color-sand);
    color: var(--color-mahogany-dark);
    font-weight: 600;
}

.bg-primary .btn-light:hover {
    background-color: var(--color-sand-light);
    border-color: var(--color-sand-light);
    color: var(--color-mahogany-dark);
}

/* === CARD BUTTONS (View, etc.) === */

/* Card buttons already styled above with .card .btn-sm.btn-primary */

/* Category cards hover effect */
.category-card {
    transition: all var(--transition-base) ease;
    border: 1px solid rgba(82, 56, 47, 0.15);
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(82, 56, 47, 0.15);
    border-color: var(--color-clay);
}

/* Song cards */
.song-card {
    transition: all var(--transition-base) ease;
}

.song-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(82, 56, 47, 0.18);
}

/* Mahogany Badge Styles */
.badge {
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-primary,
.badge.bg-primary {
    background: linear-gradient(135deg, var(--color-mahogany) 0%, var(--color-clay) 100%) !important;
}

/* Form Controls with Mahogany Focus */
.form-control:focus,
.form-select:focus {
    border-color: var(--color-clay);
    box-shadow: 0 0 0 0.25rem rgba(156, 111, 82, 0.25);
}

/* Mahogany Accent Borders */
.border-primary {
    border-color: var(--color-clay) !important;
}

/* Modern Section Headers */
.section-header {
    color: var(--color-clay-dark);
    font-weight: 600;
    border-left: 4px solid var(--color-clay);
    padding-left: 1rem;
    margin-bottom: 1rem;
}

/* Mahogany Progress Bars */
.progress-bar {
    background: linear-gradient(90deg, var(--color-mahogany) 0%, var(--color-clay-light) 100%);
}

/* Alert Boxes with Mahogany Tones */
.alert-primary {
    background-color: rgba(156, 111, 82, 0.12);
    border-color: rgba(156, 111, 82, 0.35);
    color: var(--color-clay-dark);
}

.alert-primary .alert-link {
    color: var(--color-mahogany-dark);
}

/* Pagination with Mahogany */
.pagination .page-link {
    color: var(--color-clay-dark);
    border-color: rgba(82, 56, 47, 0.25);
}

.pagination .page-link:hover {
    background-color: rgba(156, 111, 82, 0.15);
    border-color: var(--color-clay);
    color: var(--color-mahogany-dark);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--color-mahogany) 0%, var(--color-clay) 100%);
    border-color: var(--color-mahogany);
    color: #ffffff !important;
    font-weight: 600;
}

/* Mahogany Scrollbar (Webkit) */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--color-light);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--color-mahogany) 0%, var(--color-clay) 100%);
    border-radius: var(--radius-md);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--color-mahogany-light) 0%, var(--color-clay-light) 100%);
}

/* Dark Mode Mahogany Scrollbar */
[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--color-clay-dark) 0%, var(--color-mahogany-dark) 100%);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--color-clay) 0%, var(--color-mahogany) 100%);
}

/* Footer Styling */
footer {
    background: linear-gradient(135deg, #f7f3ef 0%, #ebe5dd 100%);
    border-top: 2px solid rgba(82, 56, 47, 0.18);
}

[data-theme="dark"] footer {
    background: linear-gradient(135deg, #2a1f1a 0%, #221813 100%);
    border-top: 2px solid rgba(156, 111, 82, 0.25);
}

/* Song Detail Page Mahogany Accents */
.transpose-controls {
    background: linear-gradient(135deg, rgba(82, 56, 47, 0.06) 0%, rgba(156, 111, 82, 0.06) 100%);
    border: 1px solid rgba(82, 56, 47, 0.18);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(82, 56, 47, 0.1);
}

/* Chord Display with Mahogany */
.chord {
    color: var(--color-clay-dark);
    font-weight: 600;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
}

[data-theme="dark"] .chord {
    color: var(--color-chord);
    background-color: transparent;
    border-color: transparent;
}

/* Modern Table Styles */
.table thead th {
    background: linear-gradient(135deg, rgba(82, 56, 47, 0.06) 0%, rgba(156, 111, 82, 0.06) 100%);
    color: var(--color-clay-dark);
    border-bottom: 2px solid var(--color-clay);
}

/* Mahogany Hover Effects */
.song-row:hover {
    background: linear-gradient(135deg, rgba(82, 56, 47, 0.04) 0%, rgba(156, 111, 82, 0.04) 100%);
}

[data-theme="dark"] .song-row:hover {
    background: linear-gradient(135deg, rgba(156, 111, 82, 0.06) 0%, rgba(82, 56, 47, 0.06) 100%);
}

/* Icon Colors */
.bi {
    color: var(--color-clay-light);
}

.navbar .bi,
.navbar-brand .bi {
    color: #ffffff !important;
}

.nav-link .bi {
    color: currentColor;
}

.text-primary {
    color: var(--color-clay-light) !important;
}

.bg-primary {
    background: linear-gradient(135deg, var(--color-mahogany) 0%, var(--color-clay) 100%) !important;
}

/* Focus States with Mahogany Glow */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--color-clay);
    outline-offset: 2px;
}

/* Headings use lighter clay color for better visibility */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-clay-dark);
}

h1 a,
h2 a,
h3 a,
h4 a,
h5 a,
h6 a {
    color: var(--color-clay);
}

h1 a:hover,
h2 a:hover,
h3 a:hover,
h4 a:hover,
h5 a:hover,
h6 a:hover {
    color: var(--color-clay-dark);
}

/* Button text colors for better contrast */
.btn-outline-primary {
    color: var(--color-clay-dark);
    border-color: var(--color-clay);
}

.btn-outline-primary:hover {
    background-color: var(--color-clay);
    border-color: var(--color-clay);
    color: white;
}

/* Badge text using clay */
.badge.text-primary {
    color: var(--color-clay) !important;
}

/* Dropdown items */
.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--color-clay);
}

/* List group items */
.list-group-item.active {
    background-color: var(--color-clay);
    border-color: var(--color-clay);
}

/* Breadcrumb active item */
.breadcrumb-item.active {
    color: var(--color-clay-dark);
}

/* Alert primary */
.alert-primary {
    background-color: rgba(156, 111, 82, 0.12);
    border-color: rgba(156, 111, 82, 0.35);
    color: var(--color-clay-dark);
}

.alert-primary .alert-link {
    color: var(--color-mahogany-dark);
}

/* === TOAST NOTIFICATIONS === */
/* Modern Toast Notifications - Subtle and Non-Intrusive */
.toast-container {
    max-width: 350px;
    pointer-events: none;
}

.toast-container .toast {
    pointer-events: auto;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    min-width: 300px;
}

[data-theme="dark"] .toast-container .toast {
    background: rgba(33, 37, 41, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.toast-container .toast.show {
    animation: toastSlideIn 0.3s ease-out;
}

.toast-container .toast.hide {
    animation: toastSlideOut 0.3s ease-in forwards;
}

.toast-container .toast.fade {
    transition: opacity 0.3s ease-in-out;
}

.toast-container .toast-body {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
}

.toast-container .btn-close {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.toast-container .btn-close:hover {
    opacity: 1;
}

/* Toast type variants - subtle colors */
.toast-success {
    border-left: 4px solid #198754;
}

.toast-success .toast-body {
    color: #0f5132;
}

[data-theme="dark"] .toast-success .toast-body {
    color: #d1e7dd;
}

.toast-danger {
    border-left: 4px solid #dc3545;
}

.toast-danger .toast-body {
    color: #842029;
}

[data-theme="dark"] .toast-danger .toast-body {
    color: #f5c2c7;
}

.toast-warning {
    border-left: 4px solid #ffc107;
}

.toast-warning .toast-body {
    color: #664d03;
}

[data-theme="dark"] .toast-warning .toast-body {
    color: #fff3cd;
}

.toast-info {
    border-left: 4px solid #0dcaf0;
}

.toast-info .toast-body {
    color: #055160;
}

[data-theme="dark"] .toast-info .toast-body {
    color: #cff4fc;
}

/* Toast animations */
@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Stack toasts with proper spacing */
.toast-container .toast:nth-child(n+2) {
    margin-top: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .toast-container {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }

    .toast-container .toast {
        min-width: auto;
    }
}

/* Dark mode overrides for better visibility */
[data-theme="dark"] .navbar-brand {
    color: var(--color-clay-light) !important;
}

[data-theme="dark"] .navbar {
    background: linear-gradient(135deg, var(--color-mahogany-dark) 0%, #1a120e 100%);
}

[data-theme="dark"] .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
}

[data-theme="dark"] .nav-link:hover {
    color: var(--color-sand-light) !important;
}

[data-theme="dark"] .nav-link.active {
    color: var(--color-sand-light) !important;
    border-bottom-color: var(--color-sand-light);
}

[data-theme="dark"] .navbar .bi {
    color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: var(--color-text-primary);
}

[data-theme="dark"] a {
    color: var(--color-clay-light);
}

[data-theme="dark"] a:hover {
    color: var(--color-sand-light);
}

[data-theme="dark"] .text-primary {
    color: var(--color-clay-light) !important;
}

/* Animations */
@keyframes mahoganyShimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    animation: mahoganyShimmer 2s infinite;
    background: linear-gradient(90deg,
            var(--color-mahogany) 0%,
            var(--color-clay-light) 50%,
            var(--color-mahogany) 100%);
    background-size: 1000px 100%;
}
/* Music Files & Annotations Section */
.list-group-item {
    transition: all 0.2s ease;
}

.list-group-item:hover {
    background-color: rgba(82, 56, 47, 0.03);
}

/* Compact button styles for file actions */
.btn-group-sm > .btn {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.875rem !important;
    line-height: 1.3 !important;
}
