/* Card-shaped formation slots (formation-slots.mjs): the owner's chosen "portrait tiles", 2026-10-22. A squad is its
   own card with the unit art filling the supplied frame (card-frames.css); an empty position is a dimmed card with
   its row and original movement arrow. The position number is only in the slot's tooltip. They replace the earlier label pads (deployment-polish.css), so these
   rules carry the doubled #wb-ui. Slot art never takes pointer events: the button is the target, and placement.mjs
   also accepts releases near its drawn box. */

/* ---- Slot ------------------------------------------------------------------------------------------------- */
#wb-ui#wb-ui #wb-field-markers.wb-card-slots button.wb-ground-point{
 --w:var(--wb-slot-w,75.6px);--h:calc(var(--w) * 1.354);
 transform:translate(-50%,-50%)!important;width:var(--w)!important;height:var(--h)!important;min-width:0!important;
 display:block!important;padding:0!important;margin:0!important;border:0!important;border-image:none!important;border-radius:0!important;
 background:none!important;box-shadow:none!important;outline:none!important;overflow:visible!important;
 color:var(--wb-card-text,#e9dfcb);font:10px Arial,sans-serif!important;line-height:1.15;text-align:center;
}
#wb-ui#wb-ui #wb-field-markers.wb-card-slots button.wb-ground-point[hidden]{display:none!important}
#wb-ui#wb-ui #wb-field-markers.wb-card-slots .wb-ground-point *{pointer-events:none!important}
#wb-ui#wb-ui #wb-field-markers.wb-card-slots .wb-slot-card{
 position:absolute;inset:0;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;
 padding:calc(var(--w) * .08) calc(var(--w) * .07) calc(var(--w) * .07);
 background:var(--wb-slot-glow,linear-gradient(#0000,#0000)) center/97% 97% no-repeat,var(--wb-card-frame-art) center/100% 100% no-repeat;
 filter:drop-shadow(0 3px 3px #000b);transition:opacity .14s,filter .14s,transform .14s;
 /* Its own layer: in the desktop client's WebKit view each highlight transition otherwise repainted the page under it,
    about 90 ms a frame, so dragging a card over positions stuttered (2026-10-31 desktop probe). */
 will-change:transform;
}
/* Tier pennant tucked into the card's top-left corner with the Deployed Army cards' inset (card-frames.css: .06 and .04 of
   the card width). Field cards are smaller, so the pennant is proportionally larger to read at about the same size. */
#wb-ui#wb-ui #wb-field-markers.wb-card-slots .wb-slot-tier{position:absolute;left:calc(var(--w) * .06);top:calc(var(--w) * .04);z-index:3;display:block;line-height:0}
#wb-ui#wb-ui #wb-field-markers.wb-card-slots .wb-slot-tier .wb-tier-banner{position:relative!important;inset:auto!important;margin:0!important;width:calc(var(--w) * .27)!important;height:calc(var(--w) * .3)!important;--wb-tier-numeral-size:calc(var(--w) * .15)}
/* The unit art fills most of the card. */
#wb-ui#wb-ui #wb-field-markers.wb-card-slots .wb-slot-art{position:relative;display:block;flex:none;width:calc(var(--w) * .8);height:calc(var(--w) * .76);margin:calc(var(--w) * .02) auto 0}
#wb-ui#wb-ui #wb-field-markers.wb-card-slots .wb-slot-art img{
 display:block;width:100%!important;height:100%!important;box-sizing:border-box;object-fit:cover;object-position:50% 30%;
 border:2px solid #7d6a4a!important;border-radius:3px!important;box-shadow:0 0 0 1px #000c,0 2px 4px #000c;
}
#wb-ui#wb-ui #wb-field-markers.wb-card-slots [data-card-frame*='gold'] .wb-slot-art img{border-color:#d6a640!important}
#wb-ui#wb-ui #wb-field-markers.wb-card-slots .wb-slot-name{
 display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden!important;flex:none;
 width:100%;margin:calc(var(--w) * .06) 0 0!important;white-space:normal!important;text-overflow:clip!important;overflow-wrap:anywhere;
 font:max(10px,calc(var(--w) * .125 * var(--wb-slot-name-scale,1)))/1.06 WarbandFriz,Georgia,serif!important;
 color:var(--wb-card-title,#f3d78a)!important;text-shadow:0 1px 1px #000,0 0 3px #000;
}
#wb-ui#wb-ui #wb-field-markers.wb-card-slots .wb-slot-name[data-name-length='medium']{--wb-slot-name-scale:.94}
#wb-ui#wb-ui #wb-field-markers.wb-card-slots .wb-slot-name[data-name-length='long']{--wb-slot-name-scale:.88}
#wb-ui#wb-ui #wb-field-markers.wb-card-slots .wb-slot-name[data-name-length='xlong']{--wb-slot-name-scale:.82}
/* Troop count as a plate on the art's lower corner. */
#wb-ui#wb-ui #wb-field-markers.wb-card-slots .wb-slot-count{
 position:absolute;right:calc(var(--w) * .1);top:calc(var(--w) * .62);display:block;margin:0!important;padding:1px 4px;
 border:1px solid #a88b52;border-radius:3px;background:#000c;white-space:nowrap;
 font:max(9px,calc(var(--w) * .11)) Arial,sans-serif!important;line-height:1.1!important;color:#f2e6c8!important;text-shadow:0 1px 1px #000;
}
/* An empty position: the dimmed card shows its movement arrow in the art window and its row below. */
#wb-ui#wb-ui #wb-field-markers.wb-card-slots .wb-ground-point:not(.occupied) .wb-slot-card{opacity:.6;filter:brightness(.82) drop-shadow(0 3px 3px #000b)}
#wb-ui#wb-ui #wb-field-markers.wb-card-slots .wb-slot-art-empty{display:flex;align-items:center;justify-content:center;background:#05080acc;border:1px solid #5d4f37;border-radius:3px;box-sizing:border-box}
#wb-ui#wb-ui #wb-field-markers.wb-card-slots .wb-slot-art-empty img{width:76%!important;height:76%!important;border:0!important;box-shadow:none;object-fit:contain;opacity:.85}
#wb-ui#wb-ui #wb-field-markers.wb-card-slots .wb-slot-art-empty img.wb-movement-mirrored{transform:scaleX(-1)}
#wb-ui#wb-ui #wb-field-markers.wb-card-slots .wb-slot-label{
 position:absolute;left:4%;right:4%;bottom:calc(var(--w) * .13);display:block;
 font:max(9px,calc(var(--w) * .12))/1.08 WarbandFriz,Georgia,serif!important;color:#e6cf93!important;text-shadow:0 1px 2px #000,0 0 3px #000;
}

/* ---- Drag feedback ----------------------------------------------------------------------------------------
   Hover or a held squad over a position: the owner's card highlight, a small lift and a preview of the held squad
   (art and name). A refused target darkens, the held squad's own slot fades, and a drop in flight pulses. */
#wb-ui#wb-ui #wb-field-markers.wb-card-slots .wb-slot-preview{
 display:none;position:absolute;left:10%;top:calc(var(--w) * .1);width:80%;height:calc(var(--w) * .76);
 background:var(--wb-held-art) center/cover no-repeat;border:2px solid #e8c873;border-radius:3px;opacity:.7;box-shadow:0 0 10px #f2cf7a99;
}
#wb-ui#wb-ui #wb-field-markers.wb-card-slots .wb-slot-preview::after{
 content:var(--wb-held-name,"");position:absolute;left:-24%;right:-24%;top:calc(100% + var(--w) * .05);
 font:max(10px,calc(var(--w) * .13))/1.06 WarbandFriz,Georgia,serif;color:#f3d78a;text-shadow:0 1px 2px #000,0 0 3px #000;
}
#wb-ui#wb-ui #wb-field-markers.wb-card-slots .wb-ground-point:is(:hover,:focus-visible,.wb-drop-target,.selected) .wb-slot-card{--wb-slot-glow:var(--wb-card-highlight)}
#wb-ui#wb-ui #wb-field-markers.wb-card-slots .wb-ground-point:is(:hover,.wb-drop-target):not(.wb-drop-refused) .wb-slot-card{opacity:1;transform:translateY(-5px);filter:drop-shadow(0 0 6px #f4d57d) drop-shadow(0 6px 4px #000b)}
#wb-ui#wb-ui #wb-field-markers.wb-card-slots .wb-ground-point.wb-drop-target:not(.wb-drop-refused):not(.occupied) .wb-slot-preview{display:block}
#wb-ui#wb-ui #wb-field-markers.wb-card-slots .wb-ground-point.wb-drop-target:not(.wb-drop-refused):not(.occupied) :is(.wb-slot-label,.wb-slot-art-empty){opacity:0}
#wb-ui#wb-ui #wb-field-markers.wb-card-slots .wb-ground-point.wb-drop-refused .wb-slot-card{--wb-slot-glow:none;filter:grayscale(1) brightness(.55) drop-shadow(0 0 4px #b33)!important}
#wb-ui#wb-ui #wb-field-markers.wb-card-slots .wb-ground-point.wb-drag-source .wb-slot-card{opacity:.35!important;filter:grayscale(.8) brightness(.8)!important}
#wb-ui#wb-ui #wb-field-markers.wb-card-slots .wb-ground-point.wb-pending .wb-slot-card{animation:wb-slot-pending .7s ease-in-out infinite alternate}
@keyframes wb-slot-pending{from{opacity:.62}to{opacity:1}}
@media(prefers-reduced-motion:reduce){#wb-ui#wb-ui #wb-field-markers.wb-card-slots .wb-slot-card{transition:none!important;animation:none!important}}
