/* =====================================================================================================
   A6 (ADR-065): the pause menu, the Settings panel, the career bar's menu button, the Play screen's
   Settings corner, and the locked Online card. Built from the game's own tokens (gameplan.css):
   sharp edges, the frosted plate, blue only for what is selected.
   ===================================================================================================== */

/* --- the Play screen's corner button (the user: "Play screen corner") --- */
.screen[data-screen="play"] .settings-btn { padding: 0 16px 0 13px; }
.screen[data-screen="play"] .settings-btn:hover { transform: translateY(-1px); }

/* --- a mode that cannot start yet: visible, greyed, tagged "Coming later" (the user) --- */
.mode-card.is-locked { cursor: default; background: rgba(255, 255, 255, 0.42); }
.mode-card.is-locked .mode-art { filter: grayscale(0.85) brightness(1.04); opacity: 0.6; }
.mode-card.is-locked .mode-body { opacity: 0.62; }
.mode-card.is-locked .mode-slots { display: none; }
.mode-card.is-locked.is-on { transform: none; background: rgba(255, 255, 255, 0.5); box-shadow: var(--shadow-1); }
.mode-card.is-locked.is-on::after { transform: scaleX(0); }
.mode-lock {
  position: absolute; z-index: 2; top: 14px; right: 14px; padding: 6px 10px 5px; background: var(--dark); color: var(--paper);
  font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
}

/* --- the career bar's menu button: a square at the bar's right end, the bar's own glass --- */
.bar-menu.icon-btn {
  width: var(--tab-h); height: var(--tab-h); flex: none; color: var(--ink-700);
  background: rgba(255, 255, 255, 0.55); backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08), 0 8px 22px rgba(16, 24, 40, 0.12);
}
.bar-menu.icon-btn svg { width: 22px; height: 22px; }
.bar-menu.icon-btn:hover { background: var(--paper); color: var(--ink-900); transform: none; }
.bar-menu:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --- the pause menu: three tall rows on one plate --- */
.tr-modal.is-pause .tr-sheet { width: min(460px, 100%); }
.pm-head { padding: clamp(16px, 2.4vh, 26px) clamp(20px, 2vw, 32px) 8px; }
.pm-head h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 2.2vw, 40px); letter-spacing: 0.06em; text-transform: uppercase; line-height: 1; }
.pm-list { display: flex; flex-direction: column; gap: 2px; padding: 8px clamp(12px, 1.2vw, 20px) clamp(14px, 2vh, 22px); }
.pm-item {
  all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: 3px; padding: 14px 16px 13px; min-height: 64px;
  background: var(--paper-2); border-left: 4px solid transparent;
  transition: background var(--t-micro) var(--ease-std), border-color var(--t-fast) var(--ease-std);
}
.pm-item b { font-family: var(--font-display); font-weight: 700; font-size: clamp(19px, 1.4vw, 24px); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-900); line-height: 1; }
.pm-item span { font-size: 14px; font-weight: 500; color: var(--ink-500); }
.pm-item:hover, .pm-item:focus-visible { background: var(--paper); border-left-color: var(--accent); box-shadow: var(--shadow-1); }
.pm-item:active { transform: scale(0.99); }
.pm-item.is-warn span { color: var(--warn); }

/* --- the Settings panel --- */
.tr-modal.is-settings .tr-sheet { width: min(820px, 100%); }
.st-body { gap: 0; padding-top: 4px; }
.st-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 24px; padding: 14px 0; border-top: 1px solid var(--line); }
.st-row:first-child { border-top: 0; }
.st-head { min-width: 0; }
.st-head h3 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(17px, 1.2vw, 21px); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-900); }
.st-head p { margin: 3px 0 0; font-size: 14px; font-weight: 500; color: var(--ink-500); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.st-tag { font-family: var(--font-display); font-weight: 700; font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 7px 1px; background: var(--surface-ink); color: var(--ink-700); }

.st-seg { display: inline-flex; gap: 2px; padding: 2px; background: var(--surface-ink); }
.st-seg button {
  all: unset; box-sizing: border-box; cursor: pointer; min-width: 76px; min-height: 40px; padding: 0 14px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-500);
  background: transparent; transition: background var(--t-micro), color var(--t-micro);
}
.st-seg button:hover { color: var(--ink-900); background: rgba(255, 255, 255, 0.6); }
.st-seg button.is-on { background: var(--paper); color: var(--ink-900); box-shadow: inset 0 -3px 0 var(--accent), 0 2px 8px rgba(16, 24, 40, 0.1); }
.st-seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.st-saves { grid-template-columns: minmax(0, 1fr); }
.st-save-list { display: grid; gap: 2px; }
.st-save { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px; background: var(--paper-2); }
.st-save > div { display: grid; gap: 2px; min-width: 0; }
.st-save b { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-900); }
.st-save span { font-size: 14px; font-weight: 500; color: var(--ink-500); overflow-wrap: anywhere; }
.st-save.is-import { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.st-btn.btn { min-height: 40px; padding: 0 18px; flex: none; }
.st-btn.btn:disabled { opacity: 0.4; cursor: default; transform: none; }
.st-empty { margin: 0; padding: 10px 12px; font-size: 14px; color: var(--ink-500); background: var(--paper-2); }
.st-message { margin: 10px 0 0; font-size: 14px; font-weight: 600; color: var(--ink-700); }
.st-message.is-error { color: var(--form-loss, #c8352b); }

/* A9: the match sound's volume -- the game's own slider rail (pp-slider, profile.css), as wide as the choices beside it */
.st-slider.pp-slider-row { width: clamp(244px, 19vw, 340px); gap: 16px; }
.st-slider .pp-slider { margin-right: 0; height: 40px; }
.st-slider .pp-slider-value { min-width: 3ch; font-size: clamp(17px, 1.2vw, 21px); color: var(--ink-900); }
@media (max-height: 520px) { .st-slider.pp-slider-row { width: 212px; gap: 12px; } }
@media (min-width: 2200px) { .st-slider.pp-slider-row { width: 400px; } .st-slider .pp-slider-value { font-size: 24px; } }

/* landscape phones: one column per row, the choices beneath their names */
@media (max-height: 520px) {
  .tr-modal.is-pause .tr-sheet { width: min(420px, 100%); }
  .pm-head { padding: 12px 18px 4px; }
  .pm-item { min-height: 52px; padding: 10px 14px; }
  .st-row { grid-template-columns: minmax(0, 1fr) auto; padding: 9px 0; }
  .st-head p { font-size: 12.5px; }
  .st-seg button { min-width: 60px; min-height: 40px; padding: 0 10px; font-size: 14px; }
  .bar-menu.icon-btn svg { width: 19px; height: 19px; }
}
@media (min-width: 2200px) {
  .pm-item span, .st-head p, .st-save span, .st-message { font-size: 17px; }
  .st-seg button { min-height: 48px; font-size: 18px; }
}

/* A6 (tracker #7): on a landscape phone the open bench panel covers the column; the Substitutes button showed through
   its frosted glass as a ghost. While the bench is open, the panel's own close button is the way back. */
@media (max-height: 520px) {
  .side:has(.dugout.is-open) .squad-actions { visibility: hidden; }
}

/* =====================================================================================================
   A6: hold to confirm (taking a job, resigning) -- a fill runs across the button while it is held.
   ===================================================================================================== */
[data-hold] { position: relative; overflow: hidden; touch-action: none; }
.hold-fill { position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left center; pointer-events: none; }
.hold-label { position: relative; display: grid; justify-items: center; line-height: 1.05; }
.hold-label small { font-family: var(--font-ui); font-weight: 500; font-size: 11px; letter-spacing: 0.02em; text-transform: none; opacity: 0.72; }

/* =====================================================================================================
   A6 (ADR-065): the Jobs page -- a card per club, read like a job advert.
   ===================================================================================================== */
.detail-jobs .detail-body { padding-top: 6px; }
.jb-page { display: flex; flex-direction: column; gap: 12px; }
.jb-line { margin: 0; font-size: clamp(14px, 1vw, 18px); font-weight: 600; color: var(--ink-700); }
.jb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: clamp(10px, 1vw, 18px); }
.jb-card {
  display: flex; flex-direction: column; background: var(--paper); box-shadow: var(--shadow-1);
  border-top: 5px solid var(--k1, var(--ink-900));
}
.jb-card.is-focus { box-shadow: 0 0 0 2px var(--accent), var(--shadow-2); }
.jb-head { display: flex; align-items: center; gap: 14px; padding: 14px 16px 10px; }
.jb-crest .crest { width: 46px; height: auto; display: block; filter: drop-shadow(0 2px 3px rgba(16, 24, 40, 0.25)); }
.jb-head h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 1.6vw, 30px); letter-spacing: 0.04em; text-transform: uppercase; line-height: 1; color: var(--ink-900); }
.jb-head p { margin: 4px 0 0; font-size: 14px; font-weight: 500; color: var(--ink-500); }
.jb-facts { margin: 0; padding: 4px 16px 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; }
.jb-facts div { min-width: 0; }
.jb-facts dt { font-family: var(--font-display); font-weight: 600; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-500); }
.jb-facts dd { margin: 2px 0 0; font-size: 14.5px; font-weight: 600; color: var(--ink-900); overflow-wrap: anywhere; }
.jb-facts dd.tnum { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1; }
.jb-actions { margin-top: auto; display: flex; justify-content: flex-end; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid var(--line); }
.jb-actions .btn { min-height: 46px; min-width: 130px; justify-content: center; }
.jb-decline.btn { background: var(--paper-2); color: var(--ink-900); box-shadow: inset 0 0 0 1px var(--line); }
.jb-decline.btn:hover { background: var(--paper); }
.jb-actions .btn:disabled { opacity: 0.4; cursor: default; transform: none; }

/* the out-of-work match card: who wants him, and the way to the offers */
.match-card.is-quiet .mc-jobs { position: relative; align-self: center; display: grid; justify-items: center; gap: 8px; margin-top: 10px; transform: translateZ(20px); }
.mc-jobs b { font-family: var(--font-display); font-weight: 700; font-size: clamp(16px, 1.2vw, 22px); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-700); }
.mc-jobs span { font-size: 14px; font-weight: 500; color: var(--ink-500); }
.mc-jobs-open.btn { min-height: 44px; padding: 0 20px; }

/* the chairman's office: Resign, held (a red fill: it ends the job) */
.bo-room .bo-resign .hold-fill { background: #c8352b; }
.bo-room .bo-resign .hold-label small { font-size: 10.5px; opacity: 0.8; }

@media (max-height: 520px) {
  .jb-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 8px; }
  .jb-head { padding: 8px 10px 6px; gap: 10px; }
  .jb-crest .crest { width: 32px; }
  .jb-head h2 { font-size: 18px; }
  .jb-head p { font-size: 12px; }
  .jb-facts { padding: 2px 10px 8px; gap: 6px 10px; }
  .jb-facts dt { font-size: 10px; }
  .jb-facts dd { font-size: 12px; }
  .jb-facts dd.tnum { font-size: 16px; }
  .jb-actions { padding: 6px 10px 8px; }
  .jb-actions .btn { min-height: 40px; min-width: 104px; }
}

/* =====================================================================================================
   A6 (the user, 3 October): the manager's name -- the sheet "Take the job" opens before the contract, and the
   one an older career asks once. Two big underlined fields, the club's colours along the top, and a live line
   saying how the letters will be addressed.
   ===================================================================================================== */
.tr-modal.is-name .tr-sheet { position: relative; width: min(640px, 100%); }
.tr-modal.is-name .tr-sheet::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 6px;
  background: linear-gradient(90deg, var(--k1, var(--accent)) 0 74%, var(--k2, var(--accent)) 74% 100%);
}
.mn-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 26px; padding-top: 6px; }
.mn-field { display: grid; gap: 4px; min-width: 0; }
.mn-label { font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-500); }
.mn-input {
  all: unset; box-sizing: border-box; width: 100%; min-height: 56px; padding: 6px 2px 4px; cursor: text;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 2.1vw, 38px); letter-spacing: 0.02em; color: var(--ink-900);
  border-bottom: 2px solid var(--ink-300); caret-color: var(--accent); transition: border-color var(--t-fast) var(--ease-std);
}
.mn-input:hover { border-bottom-color: var(--ink-500); }
.mn-input:focus { border-bottom-color: var(--accent); }
.mn-field.is-wrong .mn-input { border-bottom-color: var(--warn); }
.mn-error { min-height: 18px; font-size: 13px; font-weight: 600; color: var(--warn); }
.mn-preview { grid-column: 1 / -1; margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 12px 14px; background: var(--paper-2); }
.mn-preview-k { font-size: 14px; font-weight: 500; color: var(--ink-500); }
.mn-preview b { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: 0.04em; color: var(--ink-900); overflow-wrap: anywhere; }
.mn-preview.is-empty b { color: var(--ink-300); }
.tr-modal.is-name .pp-sheet-foot .btn { min-width: 240px; }

/* the save slot names the manager over his club */
.slot-body .slot-manager { font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-500); line-height: 1.1; }

/* the keyboard leaves a short strip: the sheet scrolls and drops what is not needed to type a name */
.tr-modal.is-name .pp-sheet-body { overflow-y: auto; }
@media (max-height: 400px) {
  .tr-modal.is-name .mn-preview, .tr-modal.is-name .pp-sheet-head p { display: none; }
  .tr-modal.is-name .mn-error { min-height: 0; }
}
@media (max-height: 520px) {
  .mn-form { gap: 4px 16px; padding-top: 0; }
  .mn-input { min-height: 42px; font-size: 24px; }
  .mn-error { min-height: 14px; font-size: 12px; }
  .mn-preview { padding: 7px 10px; }
  .mn-preview b { font-size: 17px; }
  .slot-body .slot-manager { font-size: 12px; }
}
@media (max-width: 560px) {
  .mn-form { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 2200px) {
  .mn-label, .slot-body .slot-manager { font-size: 17px; }
  .mn-error, .mn-preview-k { font-size: 16px; }
  .mn-preview b { font-size: 26px; }
}
