/* Spec 436: the group draw room - the join and invite blocks, the people, the host's filters, the strip and the pool
   tiles with whose shelf each game is on. Every colour is a tabletop token, so both themes follow html[data-theme];
   covers show whole (spec 392). */

.gd-page {
    display: grid;
    gap: 0.9rem;
}

.gd-page > .home-game-draw-card {
    width: 100%;
    margin: 0;
}

.gd-block {
    display: grid;
    gap: 0.6rem;
    min-width: 0;
}

/* Each part stands on its own field with the rule, as the club and friends pages (docs/UI_GUIDELINES.md). */
html.tabletop:not(#tabletop) .page:is(.theme-dark, .theme-light) .gd-page :is(.planner-card, .home-game-draw-card) {
    background: var(--tt-area);
    border: 0;
    border-top: 3px solid var(--tt-rule);
    padding: 14px 18px 18px;
}

.gd-leave-row .game-card-btn,
.gd-actions .game-card-btn {
    width: auto;
}

.gd-filters .home-tonight-stepper {
    justify-self: start;
}

.gd-block h3 {
    margin: 0;
    font-size: 1.1rem;
}

.gd-block p {
    margin: 0;
}

.gd-join-form {
    display: grid;
    gap: 0.4rem;
    max-width: 32rem;
}

.gd-join-form .upload-input {
    width: 100%;
    min-width: 0;
}

.gd-hint {
    color: var(--tt-muted);
}

.gd-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    font-weight: 600;
}

.gd-check input {
    width: 1.15rem;
    height: 1.15rem;
}

.gd-actions,
.gd-link-actions,
.gd-leave-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.gd-actions {
    margin-top: 0.4rem;
}

.gd-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.gd-link-row input {
    flex: 1 1 16rem;
    min-width: 0;
}

.gd-people-list {
    display: grid;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gd-person {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
    min-height: 2.75rem;
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--tt-line);
    background: var(--tt-field);
}

.gd-person.is-viewer {
    border-color: var(--tt-accent);
}

.gd-person-name {
    font-weight: 700;
    overflow-wrap: anywhere;
}

.gd-person-host,
.gd-person-shelf {
    color: var(--tt-muted);
    font-size: 0.9rem;
}

.gd-person .gd-remove {
    margin-left: auto;
}

.gd-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.75rem 1.25rem;
}

.gd-filters .home-tonight-label {
    color: var(--tt-muted);
}

.gd-filters .home-tonight-chip.active {
    border-color: var(--tt-accent);
}

.gd-filters .gd-hint {
    max-width: 22rem;
    font-size: 0.85rem;
}

.gd-filter-values {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin: 0;
}

.gd-filter-values div {
    display: grid;
    gap: 0.15rem;
}

.gd-filter-values dt {
    color: var(--tt-muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.gd-filter-values dd {
    margin: 0;
    font-weight: 700;
}

.gd-host-draws {
    margin: 0;
    color: var(--tt-muted);
}

.gd-result {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
}

.gd-result-owners {
    flex-basis: 100%;
    color: var(--tt-muted);
    font-size: 0.9rem;
}

.gd-tiles {
    display: grid;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 768px) {
    .gd-tiles {
        grid-template-columns: 1fr 1fr;
    }
}

.gd-tile {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    padding: 0.6rem;
    border: 1px solid var(--tt-line);
    background: var(--tt-field);
}

.gd-tile-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--tt-surface);
}

.gd-tile-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gd-tile-initials {
    color: var(--tt-muted);
    font-family: var(--tt-font-display);
    font-size: 1.5rem;
    font-weight: 700;
}

.gd-tile-text {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.gd-tile-title {
    overflow-wrap: anywhere;
}

.gd-tile-facts,
.gd-tile-owners {
    color: var(--tt-muted);
    font-size: 0.9rem;
}

.gd-more-games {
    justify-self: start;
}

/* Rule 25: the BGG credit stands under the pool, not in the floating corner. */
.gd-pool .bgg-attribution.gd-bgg {
    position: static;
    justify-self: start;
    min-height: 2.75rem;
}
