/* The /play/ page ("Hva kan jeg spille?"). Loaded only there, see
   templates/next/play/index.php. */

.play {
    --play-accent: #2987B2;
    --play-accent-soft: #e6f2f8;
    --play-border: #d9dde3;
    --play-text: #222;
    --play-muted: #6b7280;
    --play-surface: #fff;

    max-width: 52em;
    color: var(--play-text);
}

/* The site's container has no side padding; keep the page off the
   screen edges once the container fills the screen. */
@media (max-width: 1060px) {
    .play {
        padding: 0 1em;
    }
}

.play-intro {
    color: var(--play-muted);
    margin: 0 0 1em;
}

.play-picker {
    background: var(--play-surface);
    border: 1px solid var(--play-border);
    border-radius: 6px;
    padding: 0.75em 0.9em;
    margin-bottom: 1.25em;
}

.play-row {
    display: flex;
    align-items: baseline;
    gap: 0.5em;
    margin: 0.25em 0;
}

.play-row-label {
    flex: 0 0 3.5em;
    font-size: 0.85em;
    color: var(--play-muted);
}

.play-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3em;
}

.play-chip {
    position: relative;
    margin: 0;
    cursor: pointer;
}

/* The checkbox stays focusable and clickable under the chip. */
.play-chip input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.play-chip span {
    display: inline-block;
    min-width: 2.6em;
    padding: 0.3em 0.45em;
    border: 1px solid var(--play-border);
    border-radius: 4px;
    text-align: center;
    font-family: monospace;
    font-size: 1.05em;
    background: var(--play-surface);
    user-select: none;
}

.play-chip:hover span {
    border-color: var(--play-accent);
}

.play-chip input:checked + span {
    background: var(--play-accent);
    border-color: var(--play-accent);
    color: #fff;
}

.play-chip input:focus-visible + span {
    outline: 2px solid var(--play-accent);
    outline-offset: 2px;
}

.play-more {
    margin-top: 0.5em;
}

.play-more summary {
    cursor: pointer;
    color: var(--play-accent);
    font-size: 0.9em;
    margin-bottom: 0.25em;
}

.play-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5em 1.25em;
    margin-top: 0.75em;
    padding-top: 0.6em;
    border-top: 1px solid var(--play-border);
    font-size: 0.9em;
}

.play-options label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

.play-options input {
    margin: 0 0.25em 0 0;
    vertical-align: -1px;
}

.play-clear {
    margin-left: auto;
}

/* play.js updates the page as chords are picked. */
.play-js .play-submit {
    display: none;
}

.play-results.loading {
    opacity: 0.5;
    transition: opacity 0.2s 0.15s;
}

.play-headline {
    font-size: 1.15em;
    margin: 0 0 0.75em;
}

.play-headline strong {
    color: var(--play-accent);
}

.play-next {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4em;
    margin-bottom: 1em;
}

.play-next-label {
    color: var(--play-muted);
    font-size: 0.9em;
}

.play-next-chord {
    padding: 0.2em 0.6em;
    border-radius: 999px;
    background: var(--play-accent-soft);
    font-size: 0.9em;
    text-decoration: none;
    white-space: nowrap;
}

.play-next-chord strong {
    font-family: monospace;
    font-size: 1.1em;
}

.play-songs {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: play;
}

.play-songs li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.15em 0.75em;
    padding: 0.4em 0;
    border-bottom: 1px solid #eef0f3;
    counter-increment: play;
}

.play-songs li::before {
    content: counter(play);
    flex: 0 0 2em;
    color: var(--play-muted);
    font-size: 0.8em;
    text-align: right;
}

.play-song {
    flex: 1 1 14em;
}

.play-artist {
    color: var(--play-muted);
}

.play-song-chords {
    font-family: monospace;
    color: var(--play-accent);
    font-size: 0.95em;
}

/* A chord counted as a simpler one the player picked: A7 as A. */
.play-simplified {
    text-decoration: underline dotted;
    text-underline-offset: 3px;
    cursor: help;
}

.play-simplified-note {
    margin: -0.4em 0 0.9em;
    color: var(--play-muted);
    font-size: 0.85em;
}

.play-capo {
    display: inline-block;
    margin-right: 0.4em;
    padding: 0 0.4em;
    border-radius: 3px;
    background: #fff3d6;
    color: #7a5200;
    font-family: inherit;
    font-size: 0.85em;
}

.play-more-songs,
.play-empty {
    margin-top: 1em;
}

.play-path h4 {
    margin: 0 0 0.25em;
}

.play-path p {
    color: var(--play-muted);
    margin: 0 0 0.75em;
}

.play-path-steps {
    margin: 0;
    padding: 0;
    list-style: none;
}

.play-path-steps li {
    position: relative;
    margin-bottom: 4px;
}

.play-path-steps a {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 1em;
    padding: 0.35em 0.6em;
    text-decoration: none;
}

.play-path-chords {
    font-family: monospace;
    font-weight: bold;
    font-size: 1.05em;
}

.play-path-count {
    color: var(--play-text);
}

.play-path-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-radius: 0 4px 4px 0;
    background: var(--play-accent-soft);
}

.play-path-steps a:hover + .play-path-bar {
    background: #cfe6f1;
}

@media (max-width: 600px) {
    .play-row {
        display: block;
    }

    .play-row-label {
        display: block;
        margin-bottom: 0.15em;
    }

    .play-clear {
        margin-left: 0;
    }
}

@media (max-width: 600px) {
    /* Under the song name, lined up with it rather than with the number. */
    .play-song-chords {
        margin-left: 2.75em;
    }
}
