body {
    font-family: sans-serif;
    /* Bulma handles most of the styling, but we can enforce black and white */
    background-color: #f5f5f5; /* Light gray background */
    color: #363636; /* Dark gray text */
}

/* Ensure preformatted text (lyrics/chords) is readable */
pre {
    background-color: #f9f9f9;
    padding: 1rem;
    border-radius: 4px;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #363636;
    border: 1px solid #dbdbdb;
    font-family: monospace;
}

textarea {
    font-family: monospace;
}

/* Custom overrides for black and white theme */
.navbar.is-black {
    background-color: #0a0a0a;
    color: #fff;
}

.navbar-item .input.is-black {
    background-color: #fff;
    color: #0a0a0a;
    border-color: #dbdbdb;
}

.navbar-item .button.is-black {
    background-color: #0a0a0a;
    color: #fff;
    border-color: #0a0a0a;
}

.navbar-item .button.is-black:hover {
    background-color: #363636;
    border-color: #363636;
}

.navbar-item .button.is-gray {
    background-color: #6b7280;
    color: #ffffff;
    border-color: #6b7280;
}

.navbar-item .button.is-gray:hover {
    background-color: #4b5563;
    border-color: #4b5563;
    color: #ffffff;
}

.card {
    border: 1px solid #dbdbdb;
    box-shadow: none;
    height: 100%;
}

.card-content .title.is-4 a.has-text-black {
    color: #0a0a0a !important;
}

.card-content .subtitle.is-6 {
    color: #363636 !important;
}

.button.is-light {
    background-color: #f5f5f5;
    color: #363636;
    border-color: #dbdbdb;
}

.button.is-light:hover {
    background-color: #dbdbdb;
    color: #0a0a0a;
}

/* Chord popover styles */
#chord-popover {
    position: fixed;
    background-color: #fff;
    border: 2px solid #363636;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    pointer-events: none; /* Allow mouse events to pass through */
    max-width: 180px;
    min-width: 160px;
}

.chord-popup-content {
    text-align: center;
}

.chord-popup-name {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: #363636;
    border-bottom: 1px solid #dbdbdb;
    padding-bottom: 4px;
}

.chord-popup-diagram {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 120px;
    width: 100%;
}

.popup-chord-diagram {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 120px;
}

.popup-chord-diagram svg {
    max-width: 100%;
    height: auto;
}

.chord {
    cursor: help;
    position: relative;
    font-weight: bold;
    color: #0066cc;
    transition: all 0.2s ease;
    padding: 1px 2px;
    border-radius: 3px;
}

.chord:hover {
    text-decoration: underline;
    background-color: rgba(0, 102, 204, 0.1);
    transform: scale(1.05);
}

/* Chord diagrams styling */
.chord-diagrams-container {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
}

.chord-item {
    flex: 0 0 calc(50% - 5px);
    margin-bottom: 15px;
    text-align: center;
    border: 1px solid #dbdbdb;
    border-radius: 6px;
    padding: 8px;
    background-color: #fafafa;
    box-sizing: border-box;
}

.chord-name {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: #363636;
}

.chord-diagram {
    display: flex;
    justify-content: center;
    align-items: center;
}

.unknown-chord {
    padding: 15px;
    color: #666;
    font-style: italic;
    font-size: 0.8rem;
}

/* ChordPro format styling */
.chordpro-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #0a0a0a;
    margin-bottom: 0.5rem;
    text-align: center;
}

.chordpro-artist {
    font-size: 1.2rem;
    color: #363636;
    margin-bottom: 1.5rem;
    text-align: center;
    font-style: italic;
}

.chordpro-content {
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid #dbdbdb;
}

.chordpro-line {
    margin-bottom: 0.8rem;
    position: relative;
}

.chordpro-chords {
    font-weight: bold;
    color: #0066cc;
    font-size: 0.9rem;
    line-height: 1.2;
    min-height: 1.2rem;
    white-space: pre;
}

.chordpro-lyrics {
    color: #363636;
    font-size: 1rem;
    line-height: 1.2;
    white-space: pre;
}

.chordpro-lyric-line {
    color: #363636;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0.4rem;
}

.chordpro-chorus {
    background-color: #f0f8ff;
    border-left: 4px solid #0066cc;
    padding: 0.5rem 1rem;
    margin: 1rem 0;
    border-radius: 0 4px 4px 0;
}

.chordpro-comment {
    color: #666;
    font-style: italic;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.chordpro-empty-line {
    height: 1rem;
}

.chord-spacer {
    visibility: hidden;
}

.lyric-spacer {
    width: 1px;
    display: inline-block;
}

.lyric-text {
    white-space: pre;
}

/* GDPR Cookie Banner */
.gdpr-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 1.5rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gdpr-content {
    max-width: 1200px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.gdpr-content p {
    margin: 0;
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.4;
}

.gdpr-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.gdpr-buttons .button {
    white-space: nowrap;
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
}

#gdpr-accept {
    background-color: #27ae60;
    color: white;
    border: none;
}

#gdpr-accept:hover {
    background-color: #229954;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gdpr-content {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .gdpr-content p {
        font-size: 0.85rem;
    }

    .gdpr-buttons {
        width: 100%;
        gap: 0.5rem;
    }

    .gdpr-buttons .button {
        flex: 1;
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .columns {
        display: block !important;
    }

    .column.is-two-thirds,
    .column.is-one-third {
        width: 100% !important;
        margin-bottom: 1rem;
    }

    .chord-diagrams-container {
        max-height: none;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: space-between;
    }

    .chord-item {
        flex: 0 0 calc(50% - 4px);
        margin-bottom: 8px;
        min-width: 0;
    }

    .chordpro-content {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .chordpro-chords {
        font-size: 0.8rem;
        white-space: pre-wrap;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .chordpro-lyrics {
        font-size: 0.9rem;
        white-space: pre-wrap;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}
