/*
 * Töne-/Akkord-Panel zum ausgewählten Ton (createScalePanel aus
 * js/quintenzirkel-notes.js). Wird vom Quintenzirkel auf mehreren Seiten
 * genutzt. Farben kommen aus CSS-Variablen; die Defaults bilden das helle
 * Theme (CAGED-/Intervall-Design). Eine dunkle Seite überschreibt die
 * Variablen einfach (siehe quintenzirkel.css).
 */

/* ─── Layout: Zirkel + Töne-Panel nebeneinander ─────────────────────── */
.zirkel-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 1040px;
    margin-top: 10px;
}

.zirkel-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Darf auf schmalen Viewports (Smartphone) unter die Canvas-Eigenbreite
       (560px) schrumpfen, damit der Zirkel nicht horizontal überläuft. */
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
}

/* Wrapper um das Zirkel-Canvas, damit der Hilfe-Button relativ zum Rahmen
   (oben rechts) positioniert werden kann. `fit-content` hält den Wrapper
   exakt so breit wie die (evtl. herunterskalierte) Canvas, sodass der
   „?"-Button an der Ecke klebt; `max-width` erlaubt das Schrumpfen. */
.zirkel-canvas {
    position: relative;
    display: block;
    width: fit-content;
    max-width: 100%;
    line-height: 0;
}

/* Runder „?"-Button oben rechts im Quintenzirkel-Rahmen. Verlinkt auf die
   eigene Quintenzirkel-Seite (Theory/CircleOfFifths.html). */
.zirkel-help {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f0f0f0;
    border: 1px solid #d5d5d5;
    color: #666;
    font: bold 18px/1 Arial, sans-serif;
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}

.zirkel-help:hover {
    background: var(--color-root, #e53935);
    border-color: var(--color-root, #e53935);
    color: #fff;
    transform: scale(1.08);
}

.scale-panel {
    /* Helle Defaults – können pro Seite überschrieben werden. */
    --sp-bg: #ffffff;
    --sp-shadow: 0 4px 12px rgba(0, 0, 0, .12);
    --sp-border: transparent;
    --sp-divider: #eee;
    --sp-title: #2d2a32;
    --sp-sub: #8a8390;
    --sp-rel: #9a93a0;
    --sp-label: #b1a8b4;
    --sp-hint: #888;
    --sp-chip-bg: #f3ece1;
    --sp-chip-bg-hover: #e9dfcd;
    --sp-chip-text: #2d2a32;
    --sp-roman: #b1a8b4;
    --sp-play-bg: var(--color-root, #e53935);
    --sp-play-bg-hover: #f4524e;
    --sp-play-text: #ffffff;

    flex: none;
    width: 340px;
    box-sizing: border-box;
    padding: 22px 24px;
    background: var(--sp-bg);
    border: 1px solid var(--sp-border);
    border-radius: 16px;
    box-shadow: var(--sp-shadow);
    text-align: left;
}

.scale-panel__hint {
    margin: 0;
    color: var(--sp-hint);
    font-size: 15px;
    line-height: 1.5;
}

.scale-panel__head {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--sp-divider);
}

.scale-panel__title {
    font-size: 26px;
    font-weight: bold;
    color: var(--sp-title);
}

.scale-panel__sub {
    margin-top: 4px;
    font-size: 13px;
    font-weight: bold;
    color: var(--sp-sub);
}

.scale-panel__rel {
    margin-top: 6px;
    font-size: 13px;
    color: var(--sp-rel);
}

.scale-panel__section {
    margin-top: 20px;
}

.scale-panel__label {
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--sp-label);
}

.scale-panel__notes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.scale-note {
    margin: 0;
    padding: 9px 14px;
    border: none;
    border-radius: 10px;
    background: var(--sp-chip-bg);
    color: var(--sp-chip-text);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.scale-note:hover {
    background: var(--sp-chip-bg-hover);
    transform: translateY(-2px);
}

.scale-panel__chords {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.scale-chord {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    margin: 0;
    padding: 10px 2px;
    border: none;
    border-radius: 10px;
    background: var(--sp-chip-bg);
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.scale-chord:hover {
    background: var(--sp-chip-bg-hover);
    transform: translateY(-2px);
}

.scale-chord__roman {
    font-size: 11px;
    font-weight: bold;
    color: var(--sp-roman);
}

.scale-chord__name {
    font-size: 15px;
    font-weight: bold;
    color: var(--sp-chip-text);
}

.scale-panel__play {
    width: 100%;
    margin-top: 22px;
    padding: 13px;
    border: none;
    border-radius: 12px;
    background: var(--sp-play-bg);
    color: var(--sp-play-text);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.15s;
}

.scale-panel__play:hover {
    background: var(--sp-play-bg-hover);
}
