/* /maps and /maps/{id}. The board colours come from the .game-shell palette
   block at the top of game.css, which .atlas shares; the plate and frame are
   the lobby's. Imported after game.css so these win over the lobby's sizing. */

.atlas-grid {
    display: grid;
    gap: var(--size-5);
}

.atlas-card {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
}

@media (hover: hover) {
    .atlas-card:hover {
        background-image: var(--hover-veil);
    }
}

/* One shape for every card, so a tall map and a wide one sit level; the
   board keeps its own shape inside it. */
.atlas-card-art {
    aspect-ratio: 4 / 3;
    /* Without this the board's own height overrides the ratio. */
    overflow: hidden;
    padding: var(--size-3);
    background: var(--surface-1);
    border-bottom: var(--rule-1);
}

.atlas-card-body {
    display: flex;
    flex-direction: column;
    gap: var(--size-1);
    padding: var(--size-4) var(--size-5);
}

.atlas-card-meta {
    margin: 0;
    font-style: italic;
    color: var(--text-3);
}

.atlas-card-blurb {
    margin: 0;
    color: var(--text-2);
}

.atlas-detail {
    display: flex;
    flex-direction: column;
    gap: var(--size-5);
}

.atlas-facts {
    display: flex;
    flex-direction: column;
    gap: var(--size-5);
}

.atlas-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--size-3) var(--size-5);
    margin: 0;
}

.atlas-stats dt {
    font-style: italic;
    color: var(--text-3);
}

.atlas-stats dd {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--fs-2);
    color: var(--text-1);
}

.atlas-fig {
    overflow: visible;
    display: inline;
    width: 0.6em;
    height: 0.8em;
    vertical-align: 0.05em;
}

.atlas-region {
    display: flex;
    align-items: center;
    gap: var(--size-2);
}

.atlas-swatch {
    width: 0.9rem;
    height: 0.9rem;
    flex-shrink: 0;
}

.atlas-swatch .board-terr {
    stroke-width: 1.5;
}

@media (min-width: 900px) {
    .atlas-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .atlas-detail {
        display: grid;
        grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
        align-items: start;
    }

    /* The map leads its column rather than the lobby's fixed height. */
    .atlas-detail .map-plate {
        align-self: start;
        width: 100%;
    }

    .atlas-detail .map-frame {
        width: 100%;
        height: auto;
    }
}

/* Authoring overlays on a draft board (mapkit render, /maps/draft/{id}). Sizes
   are board units, like .preview-board .region-stamp. */
.draft-grid-line {
    stroke: var(--text-3);
    stroke-width: 0.6;
    stroke-dasharray: 3 3;
}

.draft-grid-label {
    fill: var(--text-2);
    font-family: var(--font-body);
    font-size: 11px;
    text-anchor: middle;
    dominant-baseline: middle;
}

.draft-adj {
    stroke: var(--color-accent);
    stroke-width: 1.5;
    opacity: 0.8;
}

.draft-id,
.draft-name {
    fill: var(--text-1);
    font-family: var(--font-body);
    text-anchor: middle;
    dominant-baseline: middle;
    paint-order: stroke;
    stroke: var(--surface-1);
    stroke-width: 3;
}

.draft-id {
    font-size: 13px;
    font-weight: var(--font-weight-5);
}

.draft-name {
    font-size: 10px;
    font-style: italic;
}
