/* JamBuddy Expanded - Unified CSS (Duplicates Removed) */

/* ============================================================================= */
/* FONT FACES */
/* ============================================================================= */



@font-face {
    font-family: MetalMania;
    src: url('fonts/Metal_Mania/MetalMania-Regular.ttf');
    font-weight: normal;
}

@font-face {
    font-family: Michroma;
    src: url('fonts/Michroma/Michroma-Regular.ttf');
    font-weight: normal;
}

@font-face {
    font-family: Pacifico;
    src: url('fonts/Pacifico/Pacifico-Regular.ttf');
    font-weight: normal;
}


/* ============================================================================= */
/* COLORS Variables */
/* ============================================================================= */

:root {
    --orange-bg-color: #FC9C44;
    --surf-green: #4FB99F; 
    --candy-apple-red: #FF0800;
    --butterscotch: #F3C677;
}


/* ============================================================================= */
/* GLOBAL STYLES */
/* ============================================================================= */

body {
    box-sizing: border-box;
    font-family: Michroma, sans-serif;
    margin: 0;
    padding: 0;
    background-color: whitesmoke;
    color: black;
}

#main {
    height: calc(100vh + 50px);
    width: 100vw;
    margin: 0 auto;
    
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 5px;
}

h2 {
    text-align: center;
    color: #666;
    margin: 20px 0;
}

h3 {
    color: #888;
    margin-top: 20px;
    margin-bottom: 10px;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}


/* ============================================================================= */
/* SETTINGS - MODAL/DIALOG  */
/* ============================================================================= */
dialog {
    width: 50%;
    height: 50%;
    min-height: 300px;
    color: white;
    font-weight: bold;
    background-color: rgb(54,69,79);
    border: none;
}

.settings-wrapper {
    display: flex;
    flex-direction: column;
    justify-items: space-between;
    align-items: center;
}

.setttings-title {
   
    text-align: center;
    font-size: 2rem;
    margin-top: 0px;
}

.settings-dual-list {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.color-sheme {
    border: 1px black solid;
    padding: 5px;
    margin-left: 30px;
}

.colors-first-row, .colors-second-row {
    display: flex;
}
.colors {
    width: 40px;
    height: 40px;
    border: 1px black solid;
}

.colors:hover {
    cursor: pointer;
}

.german-notation {
    padding: 5px;
    border: 1px black solid;
    margin-left: 10px;
    margin-right: 30px;
}

.settings-wrapper button {
    margin-top: 50px;
    padding: 10px 50px;
    align-items: flex-end;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 1px;
}

#color1 {
    background-color: var(--orange-bg-color);
}

#color2 {
    background-color: var(--surf-green);
}

#color3 {
    background-color: var(--candy-apple-red);
}

#color4 {
    background-color: var(--butterscotch);
}

#color5 {
   background-image: url(./img/thumb_01_Radial_Sun_Classic_50x50.png);
}

#color6 {
    background-image: url(./img/thumb_16_Linear_Gunmetal_50x50.png);
}

#color7 {
    background-image: url(./img/08_Banner_Kalahari.png);
}

#color8 {
    background-image: url(./img/11_Banner_Arctic_White.png);
}






/* ============================================================================= */
/* NAVIGATION */
/* ============================================================================= */

nav {
    width: 100%;
    height: 75px;
    background-color: var(--orange-bg-color);
    display: flex;
    justify-content: space-between;
    color: black;
}

.nav-left ul, 
.nav-right ul {
    list-style-type: none;
    display: flex;
    flex-direction: row;
    padding: 0 10px;
}

.nav-left ul li {
    padding: 0 10px;
    font-weight: bold;
}

.nav-left ul li:hover, 
.nav-right ul li:hover {
    cursor: pointer;
    transform: scale(1.1);
}

#dark-light-icon {
    background-image: url(./img/dark_mode_24dp_000000_FILL0_wght400_GRAD0_opsz24.png);
}

.nav-right ul {
    justify-content: flex-end;
}

.nav-right ul li {
    padding: 0 10px;
    font-weight: bold;
}

.title {
    position: relative;
    top: -45px;
}



.title p {
    top: -20px;
    font-family: 'MetalMania';
    font-size: 3.1rem;
    letter-spacing: 5.5px;
}

/* ============================================================================= */
/* CATEGORY BUTTONS */
/* ============================================================================= */

.categories-toggler {
    text-align: center;
    margin: 25px 0;
}

.categories-toggler button {
    font-size: 1.2rem;
    margin: 0 10px;
    padding: 10px 20px;
    font-family: Michroma, sans-serif;
    background-color: #5A84AC;
    color: white;
    outline: none;
    border-radius: 1px;
    border: none;
}

.categories-toggler button:hover {
    cursor: pointer;
    transform: scale(1.05);
}

.categories-toggler button a {
    color: white; !important
    text-decoration: none;
}

#scales-selected {
    background-color: green;
}

/* ============================================================================= */
/* CONTROL FIELD WRAPPERS */
/* ============================================================================= */

.ctrl-field-for-all {
    width: 100%;
    height: auto;
    margin: 50px 0;
}

.all-notes-spacer-div {
    height: 28px;
}

.scales-activated,
.chords-activated,
.notes-activated,
.progression-activated {
    display: none;
    flex-direction: row;
    justify-content: center;
}

/* ============================================================================= */
/* SELECT FIELDS (Notes, Chords, Scales) */
/* ============================================================================= */

.select-field {
    margin: 0 20px;
}

.select-field label {
    font-weight: bold;
    font-size: 20px;
    color: #555;
}

.select-field select {
    padding: 0px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 20px;
    font-weight: bold;
    background-color: white;
    cursor: pointer;
    margin: 0 5px;
}

.select-field select option {
    background-color: green;
}

/* ============================================================================= */
/* CHORD TO SCALE ANALYZER STYLES */
/* ============================================================================= */

.subtitle {
    text-align: center;
    color: #888;
    font-size: 12px;
    margin-top: 0;
    margin-bottom: 15px;
}

/* Floating container that adjusts height based on content */
.progression-activated {
    display: none;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* Wrapper for chord input and results - side by side in floating box */
.progression-content-wrapper {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
    width: 100%;
    height: 300px;
    
    border-radius: 8px;
    
    padding: 20px;
    
    overflow: hidden;
}

/* Chord Input Section - Left side, fixed width */
#chord-input-section {
    background-color: #f9f9f9;
    padding: 5px;
    border-radius: 4px;
    flex: 0 0 380px;
    max-width: 380px;
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border: 1px black solid;
}

#chord-input-section h2 {
    font-size: 14px;
    margin: 0 0 10px 0;
    flex-shrink: 0;
}

#chord-inputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
    overflow-y: auto;
    flex: 1;
}

.chord-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.chord-root,
.chord-type {
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    background-color: white;
    cursor: pointer;
}

.chord-root {
    width: 100px;
}

.chord-type {
    width: 120px;
}

.chord-root:hover,
.chord-type:hover {
    border-color: #999;
}

/* Button group at bottom of chord section */
.chord-buttons {
    flex-shrink: 0;
    margin-top: auto;
}

#add-chord-btn {
    background-color: #4CAF50;
    color: white;
    margin-right: 8px;
    padding: 8px 15px;
    font-size: 12px;
}

#add-chord-btn:hover {
    background-color: #45a049;
}

#analyze-btn {
    background-color: #2196F3;
    color: white;
    margin-right: 8px;
    padding: 8px 15px;
    font-size: 12px;
}

#analyze-btn:hover {
    background-color: #0b7dda;
}

#clear-btn {
    background-color: #f44336;
    color: white;
    padding: 8px 15px;
    font-size: 12px;
}

#clear-btn:hover {
    background-color: #da190b;
}

.remove-chord {
    background-color: #ff9800;
    color: white;
    padding: 6px 12px;
    font-size: 11px;
}

.remove-chord:hover {
    background-color: #e68900;
}

/* Results Section - Right side, flexible width */
#results-section {
    background-color: #f0f7ff;
    padding: 5px;
    border-radius: 4px;
    flex: 1;
    min-width: 400px;
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border: 1px black solid;
}

#results-section h2 {
    font-size: 14px;
    margin: 0 0 10px 0;
    flex-shrink: 0;
}

#results-section h3 {
    font-size: 14px;
    margin: 10px 0 8px 0;
    flex-shrink: 0;
}

.progression-display {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
    flex-shrink: 0;
}

#progression-text {
    color: #2196F3;
}

#scale-results {
    margin-bottom: 12px;
    overflow-y: auto;
    flex: 1;
}

/* Placeholder for when no results yet */
.results-placeholder {
    color: #999;
    font-style: italic;
    font-size: 13px;
    text-align: center;
    padding: 40px 20px;
}

/* Compact scale match - horizontal layout */
.scale-match {
    background-color: white;
    padding: 8px 12px;
    margin-bottom: 6px;
    border-radius: 4px;
    border-left: 4px solid #4CAF50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.scale-match.partial {
    border-left-color: #ff9800;
}

.scale-match.no-match {
    border-left-color: #f44336;
}

/* Scale info in one row */
.scale-match-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    flex-wrap: wrap;
}

.scale-name {
    font-size: 13px;
    font-weight: bold;
    color: #333;
    white-space: nowrap;
    min-width: 120px;
}

.scale-coverage {
    font-size: 11px;
    color: #666;
    white-space: nowrap;
}

.scale-genres {
    font-size: 11px;
    color: #888;
    font-style: italic;
    flex: 1;
    min-width: 150px;
}

.scale-notes {
    font-size: 11px;
    color: #888;
    font-style: italic;
}

.match-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    white-space: nowrap;
}

.match-badge.perfect {
    background-color: #4CAF50;
    color: white;
}

.match-badge.good {
    background-color: #8BC34A;
    color: white;
}

.match-badge.partial {
    background-color: #ff9800;
    color: white;
}

/* Visualize button integrated into scale match */
.visualize-btn {
    padding: 6px 12px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.visualize-btn:hover {
    background-color: #1976D2;
}

.visualize-btn.active {
    background-color: #1565C0;
}

/* Remove the old scale selector buttons section */
#scale-selector {
    display: none;
}

/* Fretboard Configuration */
#fretboard-config {
    background-color: #fff9e6;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

#fretboard-config h2 {
    font-size: 16px;
    margin: 0 0 10px 0;
}

/* ============================================================================= */
/* DISPLAY TITLE & SVG CONTAINER */
/* ============================================================================= */

#display-title {
    margin: 10px;
    padding-top: 20px;
    text-align: center;
    color: #666;
}

#svg-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
    height: auto;
    
}

#fretboard-svg {
    text-align: center;
    max-width: 100%;
    height: auto;
   
}

/* ============================================================================= */
/* SVG STYLING */
/* ============================================================================= */

.fret-line {
    stroke: #333;
    stroke-width: 3;
}

.string-line {
    stroke: #666;
    stroke-width: 3;
}

.note-circle {
    fill: lightgrey;
    stroke: #333;
    stroke-width: 3;
}

.note-circle.root {
    fill: red;
}

.note-circle.chord-note {
    fill: #ff9800;
}

.note-circle.hidden {
    display: none;
}

.note-text {
    font-size: 14px;
    font-weight: bold;
    fill: black;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
}

.note-text.hidden {
    display: none;
}

.nut {
    stroke: #000;
    stroke-width: 6;
}

.fret-marker {
    fill: #000;
    opacity: 0.8;
}

.fret-number {
    font-size: 18px;
    font-weight: bold;
    fill: #666;
    text-anchor: middle;
}

/* ============================================================================= */
/* CONTROL PANEL (Fretboard Options) */
/* ============================================================================= */

.options-title {
    font-size: 1rem;
    text-align: center;
}

#controls {
    width: 100%;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding-bottom: 200px;
    border-radius: 4px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.control-group label {
    font-weight: bold;
    font-size: 15px;
    color: #555;
}

.control-group select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    background-color: white;
    cursor: pointer;
}

.control-group select:hover {
    border-color: #999;
}

/* ============================================================================= */
/* FOOTER */
/* ============================================================================= */

footer {
    width: 100%;
    height: 30px;
    position: fixed;
    bottom: 0;
    background-color: var(--orange-bg-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
}

footer span {
    font-size: 0.9rem;
    font-weight: bold;
    opacity: 0.5;
}

#contact-form-toggler {
    margin-left: 50px;
}

footer span:hover {
    opacity: 1;
    cursor: pointer;
}

footer .link-underline {
    text-decoration: underline;
}

footer a {
    text-decoration: none;
    color: black;
    margin-right: 20px;
    font-family: 'Pacifico';
}

/* ============================================================================= */
/* UTILITY CLASSES */
/* ============================================================================= */

.notice-text {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    color: #856404;
}

/* ============================================================================= */
/* RESPONSIVE DESIGN */
/* ============================================================================= */

@media (max-width: 1100px) {
    .categories-toggler button {
        font-size: 1rem;
        padding: 10px 10px;
        margin: 0 5px;
    }

}

@media (max-width: 900px) {
    .categories-toggler button {
        font-size: 0.8rem;
        padding: 10px 10px;
        margin: 0 5px;
    }

    .control-group label {
        font-size: 11px;
    }

    .control-group select {
        font-size: 0.7rem;
        padding: 0;
    }
}

@media (max-width: 700px) {
    .categories-toggler button {
        font-size: 0.6rem;
        padding: 10px 10px;
        margin: 0 5px;
    }

}

@media (max-width: 590px) {
    .title p {
        font-size: 2.5rem;
    }

    .nav-right ul li, 
    .nav-left ul li {
        padding: 1px;
        font-weight: normal;
        font-size: 0.8rem;
    }

    .categories-toggler button {
        margin-bottom: 5px;
    }

    #controls {
        margin-top: 55px;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .categories-toggler button {
        font-size: 0.5rem;
        padding: 10px 10px;
        margin: 0 5px;
    }

}

@media (max-width: 500px) {
    .categories-toggler button {
        font-size: 0.5rem;
        padding: 5px 5px;
        margin: 0 3px;
    }

    footer span {
        font-size: 0.7rem;
        font-weight: bold;
    
    }

    #contact-form-toggler {
        margin-left: 5px;
    }

}