
/* Everything drawn inside a hex is a share of the tile, never a pixel count:
   a tile is ~200px wide on a desktop and ~96px on a landscape iPhone SE, and
   fixed sizes tuned for the big case spill out of the small one. */

/* A cell's contents arrive in a lazy turbo-frame, which is an inline element
   with no box of its own — anything absolute inside it would otherwise be
   placed against a 0x0 box instead of the tile. Every wrapper between the
   tile and its contents fills the tile, so the contents can be placed as a
   share of it. */
.hexContent turbo-frame,
.hexContent .blank-move-link,
.hexContent .move-to-grass-link,
.hexContent .grass-container {
    position: absolute;
    inset: 0;
    display: block;
}

/* Centred on the tile and drawn over whatever is standing in it. It never
   takes the tap: the move link underneath it has to stay clickable. */
.tall-grass {
    position: absolute;
    bottom: 30%;
    left: 50%;
    width: 84%;
    transform: translateX(-50%);
    z-index: 2;
    pointer-events: none;
}

/* Down the right-hand edge rather than above the team: they are glanceable
   arrows towards bosses and campfires, and the vertical space they used to
   take at the top is the space the team's buttons need. */
.direction-indicators {
    position: absolute;
    top: 50%;
    right: 4%;
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    transform: translateY(-50%);
    pointer-events: none;
}

.boss-dir-highlight {
    color: red;
    font-weight: bold;
}

.campfire-dir-highlight {
    color: green;
    font-weight: bold;
}


.wild-team {
    height: 85%;
}

.wild-team img {
    width: 40%;
}
.boss-team img {
    width: 70%;
}

.battle-link {
    cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAIRlWElmTU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABIAAAAAQAAAEgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAABigAwAEAAAAAQAAABgAAAAAEQ8YrgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1s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tWclQbhcHExucAF0L5S3Tdj9XZFk7EiwB94bF3gNlPTPpaxMYUc7In7K5UsZfcdK5cRpLnT/z6mlE3WXVxtWvy/JIJhKy/kRuSA28OwR3zdwZZHItCsv+m9UeiQF63t24k93JHSCnT7o7JgYOgieqgQ/sEWQ/GOKIocXCj0Auq1aYiw+RLcrW/Sz/q+d+MvyFIxEUXO/yctbWrP2A9FW2mHqLSLT170vtJ58pg7crLK+RYqsuOz87cmXFsyf/a0NTAT4DdpK6yWDueRsjx/YiPxarPWe2PzpbWMV1PZ/ktuw/1cgC8XASbj/AVSYbTOtQ3aiAAAAAElFTkSuQmCC)
    7 0,
    pointer;
}

::view-transition-group(team-on-tile) {
    z-index: 100;
}

/* The team sits in the middle of its tile with its buttons (Ascend, Rest)
   directly underneath, the pair centred together so neither leaves the hex. */
/* Scoped under .hexContent so it outranks the generic turbo-frame rule
   above, which would otherwise turn this frame back into a block and drop
   the centring. */
.hexContent .team-container-on-tile {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2%;
    padding: 0;
}

/* Square, because the art is: a tile is taller than it is wide, so sizing
   both axes off it stretched every team into a lamppost. */
.team-on-tile {
    width: 52%;
    height: auto;
    aspect-ratio: 1;
    margin: 0;
}

.debug-team-on-tile {
    width: 100%;
    height: 100%;
}

/* prevent it from being overlapped by grass */
/* Narrower than the tile is wide: a hexagon pinches in towards its bottom
   vertex, and a full-width button crosses the slanted edges. */
.in-world-actions {
    z-index: 3;
    width: 72%;
    display: flex;
    flex-direction: row;
    gap: 2%;
}

.in-world-link {
    flex: 1;
    padding: 0 2px;
    font-size: 0.7em;
    white-space: nowrap;
}

.boss-tile-badge {
    color: #e76e55;
}

.wild-player-badge {
    color: #ff9100;
}

.extra-team-count {
    display: inline-block;
    color: black;
    padding-top: 20px;
    height: 64px;
}

.hex-cell-obscured {
  backdrop-filter: blur(5px);
}

.hex-cell-target {
    backdrop-filter: saturate(150%);
}

/* The move is in flight: a second tap on the same tile would run it twice on
   the server while the browser only renders the last response. The Stimulus
   guard swallows those clicks, but taking the links out of reach means an
   impatient double tap never starts one. */
.hex-cell-target a {
    pointer-events: none;
}

.hex-cell-loading {
    backdrop-filter: grayscale(1);
}
