/* ================= Waku: pause / options drawer -- PROTECTED chrome ================= *
 * Round 18: "desacopla el codigo del menu pausa" -- every rule that only
 * exists for the paused-game options drawer (sound/volume/debug controls,
 * the abilities codex popup, the lore panel) used to live here instead of
 * buried in index.html's one giant <style> block. Its behavior is only
 * PARTIALLY decoupled (see ui/pause.js's header comment for why): the
 * abilities-codex open/close/render, the lore toggle and the drawer's own
 * close/resume button moved into that file, while setPaused() itself and
 * the rest of the pause/resume plumbing -- deeply fused with live
 * gameplay and save-state -- stayed in the main script.
 *
 * Round 21, Fase 1: "desacopla... sin cambiar nada visible" -- this file
 * now holds ONLY the rules the redesign plan marks protected (shared game
 * chrome, or self-contained popups that aren't part of the drawer's own
 * layout): .top-right-controls/.pause-fab (the floating pause button,
 * used whether the drawer's new layout looks like anything or not), the
 * abilities-codex popup, .star-row/.tag-row/.feedback-text (the
 * random-mode feedback banner, not the drawer), and .side-panel (the
 * review panel) plus .debug-head (shared between .side-panel's own header
 * and the debug panel's header, so it stays here rather than being
 * duplicated). Everything that WAS the drawer's own layout (the header,
 * the sound/volume controls, the debug panel's box, the lore box, the
 * footer) moved to styles/pause-drawer.css -- see that file's header
 * comment for how, and Fase 4 is where that file actually gets a new
 * look. Nothing below changed from before this split.
 *
 * Left OUT of this file on purpose (shared primitives used well beyond the
 * pause drawer, or entirely unrelated systems that just happened to sit
 * nearby in the old inline block): .banner/h2/p, .btn/.btn.secondary/
 * .btn.mode-active, .hint, .level-select-overlay family, .hud-timer,
 * .celebrate-* y .confetti-bit, .tutorial-*. Those all stay in index.html's
 * own <style> block.
 */

/* ---- floating menu/pause buttons ----
   Grouped in one flex row (top-right-controls) instead of two
   independently absolute-positioned buttons with hand-tuned pixel
   offsets -- the old 10px/58px split was drifting off the right edge on
   notched/Dynamic-Island iPhones in landscape, and the two buttons never
   hid themselves behind the level-select screen, so they sat on top of
   (and collided with) its own Cerrar button. One positioned container,
   hidden whenever a full-screen overlay is up, fixes both. */
.top-right-controls{
  position:absolute; z-index:8;
  top:calc(10px + env(safe-area-inset-top,0px));
  right:calc(10px + env(safe-area-inset-right,0px));
  display:flex; align-items:center; gap:8px;
}
.top-right-controls[hidden]{ display:none; }
/* "el boton pausa, debe ir 40px mas a la izquierda" -- nudged off the
   screen edge so it doesn't sit flush against the corner/notch. Also used
   as the in-game HUD's own pause button (merged from a second, duplicate
   rule that used to sit far below in the old inline stylesheet). */
.pause-fab{
  margin-right:40px;
  width:36px; height:36px; border-radius:50%; border:none; background:rgba(20,14,8,0.55); color:#fff;
  font-size:16px; cursor:pointer; flex-shrink:0;
}

.star-row{ display:flex; gap:6px; justify-content:center; }
.star-btn{
  background:none; border:none; cursor:pointer;
  font-size:30px; line-height:1; padding:2px;
  color:rgba(255,255,255,0.35);
  transition:transform 0.08s ease, color 0.08s ease;
}
.star-btn.on{ color:#f2c14e; }
.star-btn:active{ transform:scale(0.85); }

.tag-row{ display:flex; gap:6px; flex-wrap:wrap; justify-content:center; max-width:420px; }
.tag-chip{
  font-family:inherit; font-size:12px; font-weight:700;
  padding:6px 12px; border-radius:999px;
  border:1.5px solid rgba(255,255,255,0.4);
  background:transparent; color:#fff;
  cursor:pointer;
}
.tag-chip.on{ background:#fff; color:var(--ink); }

.feedback-text{
  width:100%; max-width:380px;
  font-family:inherit; font-size:13px;
  border-radius:10px; border:1.5px solid rgba(255,255,255,0.4);
  background:rgba(255,255,255,0.12); color:#fff;
  padding:8px 10px; resize:vertical;
}
.feedback-text::placeholder{ color:rgba(255,255,255,0.6); }

.debug-head{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:6px;}
.debug-head strong{font-size:13px;}

.side-panel{
  width:100%;
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.16);
  border-radius:12px;
  padding:10px 14px;
  max-height:340px;
  overflow-y:auto;
}
.side-panel[hidden]{ display:none; }
.side-panel h3{ font-size:14px; margin:10px 0 6px; }
.review-item{
  border:1px solid rgba(255,255,255,0.16); border-radius:10px;
  padding:8px 10px; margin-bottom:8px; font-size:13px;
}
.review-item .stars{ color:#f2c14e; letter-spacing:1px; }
.review-item .tags{ font-size:11px; color:rgba(255,255,255,0.65); }
.review-item .meta{ font-size:11px; color:rgba(255,255,255,0.65); }
.review-empty{ font-size:13px; color:rgba(255,255,255,0.65); padding:6px 0; }

/* ---- character abilities codex popup (opened from the options drawer) ---- */
.abilities-codex-overlay{
  position:absolute; inset:0; z-index:12;
  background:rgba(10,7,4,0.85);
  display:flex; align-items:center; justify-content:center;
  padding:20px;
}
.abilities-codex-overlay[hidden]{ display:none; }
.abilities-codex-card{
  background:#1c140c; border:1px solid rgba(255,255,255,0.15);
  border-radius:16px; padding:18px; width:100%; max-width:520px;
  max-height:82vh; overflow-y:auto; color:#fff;
  box-shadow:0 20px 50px rgba(0,0,0,0.5);
}
.abilities-codex-list{ display:flex; flex-direction:column; gap:8px; }
.codex-item{
  display:flex; align-items:center; gap:12px;
  padding:8px 10px; border-radius:12px;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
}
.codex-item.locked{ opacity:0.55; }
.codex-item img{
  width:44px; height:44px; object-fit:contain; flex-shrink:0;
  filter:drop-shadow(0 3px 6px rgba(0,0,0,0.4));
}
.codex-item.locked img{ filter:grayscale(1) brightness(0.6); }
.codex-item-body{ flex:1; min-width:0; text-align:left; }
.codex-item-name{ font-weight:800; font-size:13px; display:flex; align-items:center; gap:6px; }
.codex-item-ability{ font-size:12px; opacity:0.85; margin-top:2px; }
.codex-item-upgrade{ font-size:11px; opacity:0.6; margin-top:2px; }
.codex-lock-tag{
  font-size:10px; font-weight:700; padding:2px 7px; border-radius:99px;
  background:rgba(255,255,255,0.1); white-space:nowrap;
}
.codex-lock-tag.unlocked{ background:rgba(126,217,87,0.18); color:#9ef0a0; }
