/* Spec 435: the public shelf - the filter "What can we play?", the fitting games with their facts and expansions, the
   other expansions - in the public tool frame, inside the app and in the demo; and the library's link dialog. Every
   colour is a tabletop token, so the light and the dark theme both follow html[data-theme]. */

.ps-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 0.75rem;
    align-items: end;
}

.ps-field {
    display: grid;
    gap: 0.3rem;
    min-width: 0;
}

.ps-field label {
    font-weight: 600;
}

.ps-field select {
    width: 100%;
    min-width: 0;
    min-height: 2.75rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--tt-line);
    background: var(--tt-surface);
    color: var(--tt-ink);
    font: inherit;
}

.ps-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    grid-column: 1 / -1;
}

.rules-page .ps-count {
    margin: 0 0 0.85rem;
    font-weight: 700;
}

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

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

.ps-game {
    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);
}

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

.ps-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

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

.rules-page .ps-title {
    margin: 0 0 0.3rem;
    font-size: 1.05rem;
    line-height: 1.3;
}

.ps-year {
    color: var(--tt-muted);
    font-weight: 400;
}

.ps-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.9rem;
    margin: 0;
    padding: 0;
    color: var(--tt-muted);
    font-size: 0.92rem;
    list-style: none;
}

.rules-page .ps-expansions-label {
    margin: 0.45rem 0 0.15rem;
    font-size: 0.85rem;
    font-weight: 700;
}

.ps-expansions,
.ps-other-list {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.92rem;
}

.ps-bgg-credit {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
}

.ps-bgg-logo {
    height: 26px;
    width: auto;
}

.ps-bgg-logo--dark,
html[data-theme="dark"] .ps-bgg-logo--light {
    display: none;
}

html[data-theme="dark"] .ps-bgg-logo--dark {
    display: block;
}

/* Rules 1-8: the library's link dialog; its three buttons wrap on a phone. */
.public-shelf-modal .planner-modal-actions {
    flex-wrap: wrap;
}

.public-shelf-lists {
    display: grid;
    gap: 0.6rem;
    margin: 0 0 1rem;
}

.public-shelf-lists p {
    margin: 0;
}

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

.public-shelf-link input {
    flex: 1 1 16rem;
    min-width: 0;
}

.public-shelf-note {
    margin: 0.75rem 0 0;
}
