/* Scale Degrees Explorer Styles */

/* Function colors */
.text-tonic { color: #2e7d32; }
.text-subdominant { color: #1565c0; }
.text-dominant { color: #c62828; }

.bg-tonic { background-color: #2e7d32 !important; }
.bg-subdominant { background-color: #1565c0 !important; }
.bg-dominant { background-color: #c62828 !important; }

/* Degrees table */
.degrees-table th,
.degrees-table td {
    vertical-align: middle;
    padding: 0.75rem;
}

.degrees-table .degree-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f5f5f5;
    font-weight: 600;
}

.degrees-table .roman {
    font-weight: 700;
    font-size: 1.1rem;
}

.degree-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

.degree-row:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.degree-row.table-active {
    background-color: rgba(25, 118, 210, 0.12) !important;
}

/* Circle visualization */
.degree-circle-container {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.degrees-circle {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
}

.degree-node {
    cursor: pointer;
}

.degree-circle {
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 2;
    transition: all 0.2s ease;
}

.degree-node:hover .degree-circle {
    stroke: #fff;
    stroke-width: 3;
    filter: brightness(1.1);
}

.degree-circle.selected {
    stroke: #fff;
    stroke-width: 4;
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.3));
}

.degree-roman {
    font-size: 14px;
    font-weight: 700;
    fill: #fff;
    pointer-events: none;
}

.degree-note {
    font-size: 11px;
    font-weight: 500;
    fill: rgba(255, 255, 255, 0.9);
    pointer-events: none;
}

.key-label {
    font-size: 14px;
    font-weight: 600;
    fill: #333;
}

/* Scale score */
.scale-score {
    min-height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.scale-score svg {
    max-width: 100%;
}

/* Progression buttons */
.progression-btn {
    font-family: monospace;
    font-weight: 500;
}

.progression-btn:hover {
    background-color: #e3f2fd;
    border-color: #1976d2;
    color: #1976d2;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .degrees-table .degree-number {
        background: #3d3d3d;
        color: #e0e0e0;
    }

    :root:not([data-theme="light"]) .degree-row:hover {
        background-color: rgba(255, 255, 255, 0.08);
    }

    :root:not([data-theme="light"]) .degree-row.table-active {
        background-color: rgba(100, 181, 246, 0.2) !important;
    }

    :root:not([data-theme="light"]) .key-label {
        fill: #e0e0e0;
    }

    :root:not([data-theme="light"]) .progression-btn:hover {
        background-color: #1a3a5c;
        border-color: #64b5f6;
        color: #64b5f6;
    }
}

:root[data-theme="dark"] .degrees-table .degree-number {
    background: #3d3d3d;
    color: #e0e0e0;
}

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

:root[data-theme="dark"] .degree-row.table-active {
    background-color: rgba(100, 181, 246, 0.2) !important;
}

:root[data-theme="dark"] .key-label {
    fill: #e0e0e0;
}

:root[data-theme="dark"] .progression-btn:hover {
    background-color: #1a3a5c;
    border-color: #64b5f6;
    color: #64b5f6;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .degree-circle-container {
        max-width: 260px;
    }

    .degrees-table th,
    .degrees-table td {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
}
