/* Protection prayers (prayer.js): the strip by the action bar and the mark over an enemy that is about to strike.
   Everything here is under .pr-bar or .style-tell, so it collides with nothing in
   lab.css, forge.css or gear-sets.css. A state is always a word or a mark as well as a look: "On" with a tick,
   "Level 10", "Low", "No points". A style is always a shape and a word: a blade in a square, an arrow in a pointed
   tag, a star in a round plate. */

/* ---------------- the strip, mouse and keyboard: attached to the top of the action bar, at its left end (hud-layout.css places and sizes it) ---------------- */
.pr-bar {
  position: fixed; z-index: 7; pointer-events: auto;
  display: flex; align-items: center; gap: 8px; padding: 4px 6px;
  border: 1px solid #5a4e3a; border-radius: 10px; background: linear-gradient(#2a251d, #17140f);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); color: var(--text);
}
.pr-bar[hidden], body.in-hall .pr-bar, body.title-live .pr-bar { display: none; }
.pr-bar .pr-points { display: grid; grid-template-columns: auto auto; column-gap: 6px; align-items: baseline; padding: 0 4px; white-space: nowrap; }
.pr-bar .pr-points-name { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: #cdbf9e; }
.pr-bar .pr-points-num { font-size: 15px; font-weight: 700; }
.pr-bar .pr-meter { grid-column: 1 / -1; height: 5px; border: 1px solid #000; background: rgba(0, 0, 0, 0.6); }
.pr-bar .pr-meter i { display: block; height: 100%; background: #cfe3f2; }
.pr-bar .pr-points-word { grid-column: 1 / -1; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #f1b2a8; }
.pr-bar .pr-list { display: flex; gap: 6px; }
.pr-bar .pr-list[hidden] { display: none; }
.pr-bar .pr-btn {
  position: relative; display: grid; grid-template-rows: auto auto auto; place-items: center; align-content: center; gap: 1px;
  min-width: 58px; height: 48px; padding: 2px 6px 3px;
  border: 1px solid #5a4e3a; border-radius: 0; background: radial-gradient(circle at 50% 35%, #3a3122, #1c1811 75%); color: var(--text);
  font: inherit; cursor: pointer; touch-action: manipulation;
}
/* One frame a style, so the outline differs as well as the picture inside it. */
.pr-bar .pr-btn.pr-tag { border-radius: 0 16px 16px 0; }
.pr-bar .pr-btn.pr-round { border-radius: 18px; }
.pr-bar .pr-glyph { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pr-bar .pr-short { font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: 0.02em; }
.pr-bar .pr-state, .pr-bar .pr-key { font-size: 10px; line-height: 1; letter-spacing: 0.03em; color: #cdbf9e; }
.pr-bar .pr-key { min-width: 14px; padding: 1px 3px; border: 1px solid #6b5d44; border-radius: 3px; font-family: inherit; color: var(--accent); }
.pr-bar .pr-btn.on { border-color: #f0c27a; border-width: 2px; }
.pr-bar .pr-btn.on .pr-state { color: #f0c27a; font-weight: 700; }
.pr-bar .pr-btn.on .pr-key, .pr-bar .pr-btn.dim .pr-key { display: none; } /* the state's word reads where the key was */
.pr-bar .pr-check { position: absolute; top: 2px; right: 3px; width: 12px; height: 12px; fill: none; stroke: #f0c27a; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pr-bar .pr-btn.dim { opacity: 0.6; border-style: dashed; }
.pr-bar .pr-points-word, .pr-bar .pr-short, .pr-bar .pr-points-name { font-size: 11px; }
.pr-bar .pr-btn:focus-visible, .pr-bar .pr-toggle:focus-visible { outline: 3px solid #91d1bd; outline-offset: 2px; }

/* ---------------- the strip, touch: one small button on the ring of the combat pad, opening three ----------------
   The pad (lab.css, "Touch combat pad") is one big circle (--B across) in the corner with Heal, the sweep and the
   charge on a ring about it (radius --R, at 193, 141 and 87 degrees), and the Sets button between Heal and the sweep
   (gear-sets.css, 167 degrees). Between the sweep and the charge the ring has room for one more 44px button: the Pray
   button sits there, at 114 degrees, and shows the prayer that is on and the points left. It opens into the three
   prayers on the wider ring just beyond it. The numbers below are the pad's own, repeated so this file needs nothing
   from lab.css. */
.pr-bar.touch {
  left: auto; transform: none; right: calc(10px + var(--safe-r)); bottom: calc(10px + var(--safe-b));
  width: 0; height: 0; padding: 0; border: 0; background: none; box-shadow: none; display: block; z-index: 8; pointer-events: none;
  --B: 180px; --k: 58px; --b: 44px; --R: calc(var(--B) / 2 + var(--k) / 2 + 12px); --R2: calc(var(--R) + var(--k) / 2 + var(--b) / 2 + 8px);
}
.pr-bar.touch .pr-toggle, .pr-bar.touch .pr-btn {
  position: absolute; width: var(--b); height: var(--b); min-width: 0; border-radius: 50%; pointer-events: auto; touch-action: manipulation;
  right: calc(var(--B) / 2 - var(--rad) * cos(var(--ang)) - var(--b) / 2); bottom: calc(var(--B) / 2 + var(--rad) * sin(var(--ang)) - var(--b) / 2);
  border: 2px solid #5a4e3a; background: radial-gradient(circle at 50% 35%, rgba(70, 60, 45, 0.94), rgba(24, 20, 15, 0.94) 75%); color: var(--text); font: inherit;
}
.pr-bar.touch .pr-toggle { --rad: var(--R); --ang: 114deg; display: grid; place-items: center; align-content: center; gap: 1px; padding: 0; }
/* (the word is "Pray" or the style of the prayer that is on, "Magic", "Ranged" or "Melee": six letters at most, in plain case, so it fits) */
.pr-bar.touch .pr-toggle-word { font-size: 11px; font-weight: 700; line-height: 1.05; text-align: center; white-space: nowrap; }
.pr-bar.touch .pr-toggle-sub { font-size: 11px; line-height: 1; color: #cdbf9e; }
/* (a prayer that is on: the button grows so the word clears the doubled edge, and the tick sits above the word, not on it) */
.pr-bar.touch.praying .pr-toggle { --b: 54px; border-color: #f0c27a; border-style: double; border-width: 4px; align-content: end; padding-bottom: 7px; }
.pr-bar.touch.praying .pr-toggle .pr-check { top: 3px; right: auto; left: 50%; margin-left: -5px; }
.pr-bar.touch.open .pr-toggle { border-color: #91d1bd; }
.pr-bar.touch .pr-list { display: block; }
.pr-bar.touch .pr-list[hidden] { display: none; }
.pr-bar.touch .pr-btn { --rad: var(--R2); padding: 0; }
.pr-bar.touch .pr-btn.pr-tag, .pr-bar.touch .pr-btn.pr-round { border-radius: 50%; } /* a thumb's target is round; the picture and the word still differ */
.pr-bar.touch .pr-btn[data-pr="0"] { --ang: 148deg; } /* (17 degrees apart: a clear gap between two thumbs' worth of button) */
.pr-bar.touch .pr-btn[data-pr="1"] { --ang: 131deg; }
.pr-bar.touch .pr-btn[data-pr="2"] { --ang: 114deg; }
/* A picture and one word of 11px: the state is the tick and the doubled edge (on) or the dashed edge (not to be said yet), and the label. */
.pr-bar.touch .pr-glyph { width: 14px; height: 14px; }
.pr-bar.touch .pr-short { font-size: 11px; }
.pr-bar.touch .pr-btn.on { border-color: #f0c27a; border-style: double; border-width: 4px; }
.pr-bar.touch .pr-check { top: 1px; right: 5px; width: 10px; height: 10px; }
@media (orientation: portrait) { .pr-bar.touch { --B: 172px; --k: 54px; } }
/* The three prayers open onto the ground the three gear sets open onto: opening either fold-out shuts the other
   (prayer-plan.js tapFold; prayer.js and gear-sets.js). */

/* ---------------- the mark over an enemy that is about to strike ---------------- */
#styleTells { position: absolute; inset: 0; pointer-events: none; }
.style-tell {
  position: absolute; transform: translate(-50%, -100%); display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px 2px 5px;
  border: 2px solid #f3ead2; background: #17140f; color: #f3ead2;
  font-size: calc(12px * var(--ts, 1)); font-weight: 700; line-height: 1.2; letter-spacing: 0.03em; white-space: nowrap;
}
.style-tell[hidden] { display: none; }
.style-tell.st-tag { border-radius: 0 12px 12px 0; }
.style-tell.st-round { border-radius: 12px; border-style: double; border-width: 4px; }
.style-tell .st-glyph { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
