﻿/* Novela.Web/wwwroot/css/settings-sections.css
   ───────────────────────────────────────────────
   The Settings panel's layout:
     • Quick controls at the top (Brightness, Text size), always open
     • folding sections with clear headings and a short summary on the right (settings-sections.js)
     • Button style's contents
   And the faint sun in the left margin that hints at the brightness drag.
   ─────────────────────────────────────────────── */

/* ── Quick controls ── */
.settings-body .settings-quick {
    padding: .5rem 0 .7rem;
    margin-bottom: .35rem;
}

    /* Brightness and Text size: the name on its own line above, so the slider below gets the whole
       width of the panel ( −  ━━━━━━━━━━  +  100% ). "flex-wrap" lets the row break into two lines,
       and the name taking 100% of the width pushes the rest onto the second. */
    .settings-quick .setting-row {
        flex-wrap: wrap;
        row-gap: .1rem;
        margin: .45rem 0;
    }

    .settings-quick .setting-label {
        flex: 1 0 100%;
        font-size: .85rem;
        color: var(--reader-muted);
    }

/* ── Folding sections ── */
.settings-section {
    margin: .35rem 0;
}

    /* The heading: a band with a stripe of the button color, the title, and the summary on the right */
    .settings-section > summary {
        display: flex;
        align-items: center;
        gap: .5rem;
        padding: .6rem .6rem .6rem .5rem;
        border-radius: 8px;
        border-left: 3px solid var(--raised-top);
        background: color-mix(in srgb, var(--reader-fg) 6%, transparent);
        cursor: pointer;
        list-style: none;               /* our own arrow below, not the browser's triangle */
        transition: background .15s ease;
    }

        .settings-section > summary::-webkit-details-marker { display: none; }

        .settings-section > summary:hover {
            background: color-mix(in srgb, var(--reader-fg) 10%, transparent);
        }

        /* The arrow: points right when folded, down when open */
        .settings-section > summary::before {
            content: "\F285";               /* Bootstrap Icons chevron-right */
            font-family: "bootstrap-icons";
            font-size: .7rem;
            color: var(--reader-muted);
            transition: transform .15s ease;
        }

    .settings-section[open] > summary::before { transform: rotate(90deg); }

    .section-title {
        font-size: .8rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .07em;
        color: var(--reader-fg);
        white-space: nowrap;
    }

    /* "Pages · Two columns · Slide" — cut short with … when it doesn't fit */
    .section-summary {
        margin-left: auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: .8rem;
        color: var(--reader-muted);
    }

    /* A checkbox in the heading (Read aloud's "Listen"): always shown, open or folded */
    .summary-check {
        display: inline-flex;
        align-items: center;
        gap: .3rem;
        margin-left: .4rem;
        flex: none;
        font-size: .78rem;
        color: var(--reader-fg);
        cursor: pointer;
    }

        .summary-check input { margin: 0; cursor: pointer; }

    /* Open: the settings themselves show what's chosen, so the summary steps aside */
    .settings-section[open] > summary .section-summary { visibility: hidden; }

    /* The settings inside an open section */
    .settings-section[open] {
        padding-bottom: .6rem;
        border-bottom: 1px solid var(--chrome-border);
    }

    .settings-section > summary + * { margin-top: .6rem; }

/* ── Button style's contents ── */
.setting-more-heading {
    margin: .7rem 0 .1rem;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--reader-muted);
}

.button-style .setting-check { margin: .35rem 0 0; }

    .button-style .setting-check small { color: var(--reader-muted); }

/* The color picker, small and in line with the checkbox above */
.button-style .button-color-row input[type=color] {
    width: 13px;
    height: 13px;
    padding: 0;
    border: 1px solid var(--chrome-border);
    border-radius: 3px;
    cursor: pointer;
}

/* While following the themes, "My color" is faded (it still works: picking a color switches over) */
.button-style:has([data-setting="buttonsFollowTheme"]:checked) .button-color-row { opacity: .5; }

/* ── The left margin: a faint sun under the mouse, hinting "drag up or down for brightness" ── */
.left-zone::after {
    content: "☀";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.1rem;
    color: var(--reader-muted);
    opacity: 0;
    transition: opacity .25s ease;
    pointer-events: none;
}

    .left-zone:hover::after { opacity: .5; }
