/* Threat cards left on board spaces (web/js/board.js setSpaceCards) and the
   big card shown while hovering one (both board views). */

/* Inside the transformed board canvas: sizes are board pixels. */
.board-cards {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4; /* over the tile lines and highlights, under the tokens (5) */
}

/* Two classes: outranks style.css's ".board-canvas img" (no pointer events). */
.board-cards .space-card {
    position: absolute;
    display: block;
    object-fit: cover;
    border-radius: 9px;
    border: 3px solid #0b0806;
    background: #1a1612;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6);
    transform-origin: 50% 50%;
    pointer-events: auto;
    cursor: zoom-in;
    user-select: none;
    -webkit-user-drag: none;
}

.board-cards .space-card:hover {
    border-color: var(--accent, #d4a843);
}

/* The hovered card, big, beside the pointer. */
.card-peek {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 48; /* over the board's overlays, under the card reveal and battles (50) */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65);
    border: 1px solid var(--border-light, #3a3a48);
    background: var(--bg, #111);
    pointer-events: none;
    animation: card-peek-in 0.12s ease-out;
}

.card-peek[hidden] { display: none; }

.card-peek img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* A sideways card's scan (upright, the card's top on its right), turned back a quarter. */
.card-peek img.is-sideways {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(-90deg);
}

@keyframes card-peek-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .card-peek { animation: none; }
}
