/* Configurações (systems/settings.js): the window, the player's layout choices, the layout editor. */

/* ---------------------------------------------------------------- the window */
.st-box {
  width: 100%; max-width: 520px; max-height: calc(calc(100vh / var(--ui-zoom, 1)) - 32px); display: flex; flex-direction: column;
  background: linear-gradient(180deg, #1a1030, #110b22); border: 2px solid #6b3fc4; border-radius: 14px;
  box-shadow: 0 20px 60px #000c, 0 0 0 4px #a86bff14; overflow: hidden;
}
.st-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #3b2a66; }
.st-head h2 { flex: 1; font-family: var(--pixel); font-size: 1.15rem; letter-spacing: 0.06em; text-transform: uppercase; }
.st-icon, .st-back {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; font-size: 1.2rem;
  background: #2a1a4a; border: 1px solid #6b3fc4; color: #e7dcff;
}
.st-back { cursor: pointer; font-size: 1.6rem; line-height: 1; }
.st-back:hover { background: #3b2366; }
.st-close { width: 34px; height: 34px; border-radius: 8px; border: 1px solid #3b2a66; background: #0b0716; color: var(--muted); cursor: pointer; font-size: 1rem; }
.st-close:hover { color: #fff; border-color: #a86bff; }
.st-body { display: grid; gap: 10px; padding: 14px 16px 16px; overflow-y: auto; }

/* a category: icon, title, description, its value, › */
.st-cat {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 14px; border-radius: 10px; text-align: left; cursor: pointer; color: inherit; font: inherit;
  background: #160e2a; border: 1px solid #2e2150;
}
.st-cat:hover { border-color: #a86bff; background: #1e1338; }
.st-cat-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 8px; font-size: 1.3rem; background: #2a1a4a; border: 1px solid #6b3fc4; }
.st-cat-text { display: grid; gap: 2px; min-width: 0; }
.st-cat-text b { font-family: var(--pixel); font-size: 1rem; letter-spacing: 0.04em; text-transform: uppercase; }
.st-cat-text span { font-size: 0.85rem; color: #b9b0d4; }
.st-cat-text em { font-style: normal; font-size: 0.8rem; font-weight: 700; color: #c08bff; }
.st-chev { color: #8a7cb0; font-size: 1.4rem; }

/* a setting: text on the left, its control on the right */
.st-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px;
  padding: 10px 12px; border-radius: 10px; background: #160e2a; border: 1px solid #2e2150;
}
.st-row-text { display: grid; gap: 2px; min-width: 0; }
.st-row-text b { font-size: 0.92rem; }
.st-row-text span { font-size: 0.78rem; color: #b9b0d4; }
.st-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 9px; background: #0b0716; border: 1px solid #2e2150; }
.st-seg button { padding: 5px 10px; border-radius: 6px; border: 0; background: none; color: #b9b0d4; font: inherit; font-size: 0.8rem; cursor: pointer; }
.st-seg button:hover { color: #fff; }
.st-seg button.on { background: #6b3fc4; color: #fff; }
.st-toggle { position: relative; width: 44px; height: 24px; border-radius: 12px; border: 1px solid #2e2150; background: #0b0716; cursor: pointer; flex: none; }
.st-toggle i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #8a7cb0; transition: left 0.15s, background 0.15s; }
.st-toggle.on { background: #3b2366; border-color: #a86bff; }
.st-toggle.on i { left: 23px; background: #fff; }
.st-slider { display: flex; align-items: center; gap: 10px; }
.st-range { width: 160px; accent-color: #a86bff; }
.st-val { font-family: var(--pixel); min-width: 44px; text-align: right; }
.st-sub { font-family: var(--pixel); font-size: 0.78rem; color: #b9b0d4; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }
.st-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.st-check { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; background: #160e2a; border: 1px solid #2e2150; font-size: 0.85rem; cursor: pointer; }
.st-check input { accent-color: #a86bff; }
.st-edit { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border-radius: 10px; background: #2a1a4a; border: 1px dashed #a86bff; }
.st-edit > div { display: grid; gap: 2px; }
.st-reset { justify-self: start; }
.st-net { --q: #8fa3c9; display: grid; gap: 2px; text-align: right; font-size: 0.85rem; }
.st-net[data-q="good"] { --q: #4ade80; }
.st-net[data-q="ok"] { --q: #ffd75e; }
.st-net[data-q="bad"], .st-net[data-q="off"] { --q: #ff7a8a; }
.st-net > span:first-child { color: var(--q); font-family: var(--pixel); }
.st-net em { font-style: normal; font-family: inherit; opacity: 0.8; }
.st-net-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--q); box-shadow: 0 0 5px var(--q); vertical-align: 1px; }
.st-links { padding: 0 2px; }
@media (max-width: 520px) {
  .st-checks { grid-template-columns: 1fr; }
  .st-range { width: 120px; }
}

/* ---------------------------------------------------------------- the player's layout choices */
.ui-hidden { display: none !important; }
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after {
  animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important;
}
@media (min-width: 721px) {
  /* the side menu on the right */
  html.nav-right:not(.mobile) body {
    grid-template-columns: 1fr 92px;
    grid-template-areas: "topbar topbar" "content sidebar" "legal sidebar";
  }
  html.nav-right:not(.mobile) #sidebar { border-right: 0; border-left: 2px solid #0a1120; }
  html.nav-right:not(.mobile) { --win-left: 0px; --win-right: 92px; }
  /* the side menu with icons only */
  html.nav-compact:not(.mobile) body { grid-template-columns: 64px 1fr; }
  html.nav-compact.nav-right:not(.mobile) body { grid-template-columns: 1fr 64px; }
  html.nav-compact:not(.mobile) { --win-left: 64px; }
  html.nav-compact.nav-right:not(.mobile) { --win-left: 0px; --win-right: 64px; }
  html.nav-compact:not(.mobile) .nav-btn > span { display: none; }
  /* the hunt's column on the left */
  html.side-left:not(.mobile) .hunt { grid-template-columns: 300px minmax(0, 1fr); }
  html.side-left:not(.mobile) .hunt-side { order: -1; }
}
.win-layer { right: var(--win-right, 0px); }

/* ---------------------------------------------------------------- the layout editor */
.lay-item {
  outline: 2px dashed #a86bff !important; outline-offset: 2px; cursor: grab !important;
  pointer-events: auto !important; user-select: none; touch-action: none;
}
.lay-item * { pointer-events: none !important; }
.lay-item::before, .lay-zone::before {
  content: attr(data-lay-label); order: -9999; align-self: flex-start;
  padding: 1px 8px; border-radius: 6px; background: #6b3fc4; color: #fff;
  font-family: var(--pixel); font-size: 0.7rem; white-space: nowrap;
}
.lay-zone { outline: 2px dashed #ffd75e !important; outline-offset: -2px; touch-action: none; }
.lay-zone::before { background: #8a6a10; }
.lay-zone > * { cursor: grab !important; }
.lay-zone > * * { pointer-events: none !important; }
.lay-lift { opacity: 0.6; outline: 2px solid #ffd75e; }
/* the pieces that are empty or hidden now still show, to be placed */
html.layout-edit .hunt-log:empty { display: flex; min-height: 48px; }
html.layout-edit .stage-corpses[hidden] { display: flex !important; min-height: 60px; }
.lay-bar {
  position: fixed; z-index: 220; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px;
  background: #160e2a; border: 2px solid #6b3fc4; border-radius: 12px; box-shadow: 0 12px 30px #000a;
  max-width: calc(calc(100vw / var(--ui-zoom, 1)) - 24px);
}
.lay-bar-title { display: grid; padding-right: 6px; margin-right: 4px; border-right: 1px solid #3b2a66; }
.lay-bar-title b { font-family: var(--pixel); font-size: 0.9rem; }
.lay-bar-title span { font-size: 0.72rem; color: #b9b0d4; }
