/* A game card on the arcade home (core/homeCards.js): the grid's cards and the lead card share it. Tokens are
   home.css's. */

/* ---- A card: the game itself (a still frame that plays on hover or focus), what it is, and your record ---- */
.tile {
    --a: var(--accent);
    display: flex;
    flex-direction: column;
    min-width: 0;
    text-align: left;
    padding: 6px;
    border: 0;
    border-radius: 12px;
    background: var(--card);
    color: var(--text);
    font: inherit;
    cursor: pointer;
    transition:
        background-color 0.15s,
        transform 0.15s;
}
.tile[hidden] {
    display: none;
}
.tile:hover {
    background: var(--card-hover);
}
.tile:active {
    transform: scale(0.995);
}
.tile-art {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    border-radius: 8px;
    overflow: hidden;
    background: var(--screen);
}
.tile-art canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}
.tile-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 10px 6px 4px;
}
.tile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.tile-kind {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* the game's own colour, as a dot: an accent as text was too faint to read on the light page */
.tile-kind::before {
    content: '';
    flex: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--a);
}
.tile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.chip {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--card-2);
    color: var(--text);
}
.chip--dark {
    background: var(--pill-on);
    color: var(--pill-on-ink);
}
.tile-name {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--heading);
}
.tile-blurb {
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.5;
    color: var(--dim);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}
.tile-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 6px;
}
.tile-meta {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--dim);
}
.tile-meta:empty {
    display: none;
}
.tile-meta strong {
    color: var(--text);
    font-weight: 500;
}
.tile-go {
    flex: none;
    display: none;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--pill-on);
    color: var(--pill-on-ink);
}
.tile-go svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}
/* A phone shows what a game is and your record; the line about it and its tags wait for more room */
.grid .tile-blurb,
.grid .tile-tags {
    display: none;
}
@media (min-width: 760px) {
    .tile {
        padding: 8px;
    }
    .tile-body {
        gap: 6px;
        padding: 12px 8px 6px;
    }
    .tile-name {
        font-size: 17px;
    }
    .grid .tile-blurb {
        display: -webkit-box;
    }
    .grid .tile-tags {
        display: flex;
    }
    .tile-go {
        display: grid;
    }
}

/* A top-ten place on the game's board (board.place): a cup and the place, on the picture */
.tile-place {
    position: absolute;
    top: 8px;
    left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px 3px 6px;
    border-radius: 999px;
    background: #fff;
    color: #1b273a;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}
.tile-place svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: #0a6b5e;
    stroke-width: 1.8;
    stroke-linejoin: round;
}

/* Offline without its pictures: marked and inert until one connected visit */
.tile--uninstalled {
    cursor: not-allowed;
}
.tile--uninstalled .tile-art {
    opacity: 0.45;
}
.tile-warn {
    color: #f5bdb0;
    font-weight: 700;
}
.games--light .tile-warn {
    color: #b3261e;
}
