/* The hero picker: the table's list of choices (chooser.js) laid out as cards, one for each hero of the campaign (the portrait, the name, the class and
 * level, a line about them); a hero that cannot be played is dimmed and says why. */

.tt-chooser-heroes {
    --tt-dialog-width: 760px;
}

/* over the begin screen and the defeat screen too: the hero is chosen there, and so are the rules */
.tt-chooser-heroes-backdrop,
.tt-chooser-rules-backdrop {
    z-index: 90;
}

.tt-chooser-intro {
    margin: -4px 0 12px;
    color: var(--tt-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.tt-chooser-heroes .tt-choices {
    display: grid;
    /* a card is 280px at least, or the whole width of a dialog narrower than that (a 320px phone): it never overflows sideways */
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 10px;
}

.tt-choice.has-face {
    display: grid;
    grid-template-columns: 64px 1fr;
    align-items: start;
    column-gap: 12px;
    padding: 10px 12px;
    min-height: 88px;
}

.tt-choice-face {
    display: flex;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--tt-line);
}

.tt-choice-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tt-choice-face .tt-face-glyph {
    width: 100%;
    height: 100%;
}

.tt-choice-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.tt-choice-text strong {
    font-family: var(--tt-serif);
    color: var(--tt-gold-hi);
    font-size: 1.02rem;
}

.tt-choice-meta {
    color: var(--tt-text);
    font-size: 0.8rem;
}

.tt-choice-hint {
    color: var(--tt-muted);
    font-size: 0.8rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.tt-choice.is-disabled {
    opacity: 1;
    border-style: dashed;
    cursor: not-allowed;
}

.tt-choice.is-disabled .tt-choice-face {
    filter: grayscale(1);
    opacity: 0.5;
}

.tt-choice.is-disabled strong,
.tt-choice.is-disabled .tt-choice-meta {
    opacity: 0.55;
}

.tt-choice.is-disabled .tt-choice-hint {
    color: var(--tt-orange);
}

/* The "+" of the list (hero_picker.js): the card the character generator section shows for a new character, a big plus over its title in the
 * generator's gold, here with the same size as a hero's card. */
.tt-choice.tt-choice-create {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    min-height: 88px;
    border-style: dashed;
    border-color: var(--tt-gold-hi);
    color: var(--tt-gold-hi);
    text-align: center;
}

.tt-choice-create .tt-choice-plus {
    font-size: 1.8rem;
    line-height: 1;
}

.tt-choice-create .tt-choice-text {
    align-items: center;
    overflow-wrap: anywhere;
}

.tt-choice-create .tt-choice-text strong {
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

@media (max-width: 700px) {
    .tt-chooser-heroes .tt-choices {
        grid-template-columns: 1fr;
    }
}

/* A hero of the party that the table plays: a small mark on its portrait in the party column. */
.tt-member-companion {
    position: absolute;
    top: -3px;
    right: -3px;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid var(--tt-line);
    background: #12141b;
    color: var(--tt-gold-hi);
    font-size: 0.6rem;
    pointer-events: none;
}
