/*
 * One gig: what it is, what is played in it, in what order, in what key, and
 * who else can read it.
 */

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--surface-2);
    border-bottom: 1px solid var(--border);
}

.topbar-inner {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding-block: var(--space-2);
}

/* Whether the set is saved, sitting between the way back and the way to save
   it, which is the order those three things are thought about in. */
#set-state {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#title-input {
    font-size: var(--text-lg);
    font-weight: 600;
}

.notice {
    padding: var(--space-3);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-2);
    background-color: var(--surface-2);
    color: var(--text-2);
    font-size: var(--text-sm);
}

/* THE SCORES THAT ARE PLAYED */

#entries-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin: 0;
    padding-left: var(--space-5);
}

#entries-list > li::marker {
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
}

.entry {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-2) var(--space-3);
    padding: var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-2);
    background-color: var(--surface-2);
    box-shadow: var(--shadow-1);
}

.entry-title {
    align-self: center;
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* A song that is played from paper. It has no score here and never had one,
   which is a fact about the gig rather than something to put right, so it is
   shown as an ordinary song and not as a warning. */
.entry-on-paper {
    font-weight: 600;
}

.entry-on-paper::after {
    content: ' · on paper';
    font-weight: 400;
    font-style: italic;
    color: var(--text-2);
}

/* A song the set names but this device has not got. It is still part of the
   gig, which is why it is shown at all rather than left out. */
.entry-missing {
    font-weight: 400;
    color: var(--danger);
    font-style: italic;
}

.entry-buttons {
    display: flex;
    gap: var(--space-1);
    align-items: start;
}

.entry-buttons > button,
.entry-buttons > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    min-height: 2rem;
    padding: 0 var(--space-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-1);
    background: transparent;
    color: inherit;
    font-size: var(--text-sm);
    text-decoration: none;
    cursor: pointer;
}

.entry-buttons > button:hover:not(:disabled),
.entry-buttons > a:hover {
    background-color: var(--surface-3);
    border-color: var(--brand-quiet);
}

.entry-buttons > button:disabled,
.entry-buttons > a[aria-disabled="true"] {
    opacity: 0.4;
    cursor: default;
}

.entry-controls {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
}

.entry-description {
    flex: 1 1 12rem;
    min-width: 8rem;
    min-height: 2.25rem;
    padding: var(--space-1) var(--space-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-1);
    background-color: var(--surface-1);
    color: inherit;
    font-size: var(--text-sm);
}

.entry-transposition {
    width: 3.5rem;
    min-height: 2.25rem;
    padding: var(--space-1) var(--space-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-1);
    background-color: var(--surface-1);
    color: inherit;
    font-size: var(--text-sm);
    font-variant-numeric: tabular-nums;
}

.entry-transpose,
.entry-parts {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-sm);
    color: var(--text-2);
}

/* What the band does and what one player reads on top of it are two halves of
   one number, so they are boxed as one thing: the two of them in the order they
   add, and what they come to after. Wrapping rather than one long line, since
   the whole of it is wider than a phone. */
.entry-transpose {
    flex-wrap: wrap;
    gap: var(--space-1) var(--space-2);
    padding: var(--space-1) var(--space-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-1);
}

.entry-transpose-field {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    white-space: nowrap;
}

.entry-transpose-total,
.entry-parts {
    font-style: italic;
    white-space: nowrap;
}

.entry-transpose-clamped {
    color: var(--danger);
    font-style: normal;
}

.entry-parts > button {
    min-height: 2rem;
    padding: 0 var(--space-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-1);
    background: transparent;
    color: inherit;
    font-size: var(--text-xs);
    cursor: pointer;
}

/* ADDING A SCORE */

#score-picker {
    display: grid;
    gap: var(--space-2);
    max-height: 22rem;
    overflow-y: auto;
}

/* The song and the button that adds it, side by side, with the box taking
   whatever room is left. */
#paper-entry-row {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

#paper-entry-row > .input {
    flex: 1 1 auto;
    min-width: 0;
}

.score-option {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-2);
    background-color: var(--surface-2);
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color var(--ease), background-color var(--ease);
}

.score-option:hover {
    border-color: var(--brand-quiet);
    background-color: var(--surface-3);
}

.score-option > .score-option-creators {
    color: var(--text-2);
    font-size: var(--text-sm);
}

/* DELETING */

#forbidden-notice {
    padding-block: var(--space-6);
}
