/* Support (support.php) — out-of-game contact form, rebuilt on the register's
   crz-* design system. The support template emits the register markup
   (crz-ornate-panel / crz-field / crz-btn) + a ClashRZ top bar; theme.css styles
   the panel/form; this sheet handles the shell: background, chrome strip, top bar
   and the bits theme.css doesn't cover (select/textarea).

   NOTE: this sheet only ever loads on support.php (via SupportCtrl headExtraStyles),
   so bare `html {}` rules here are safe and scoped in practice. The background goes
   on `html` on purpose — the Travian body carries `perspectiveBuildings`, which
   turns it into the containing block for position:fixed, so a fixed layer on the
   body only covers the (narrow) body box. `html` has no such ancestor. */

/* ---- Background: a SIMPLE BLURRED Game-BG image showing behind everything ----
   The gpack paints the washed-out village scene via
   body.buildingsV1.perspectiveBuildings::before/::after + div#background
   (specificity 0,3,1 / 0,3,2), which beat a plain `body.support #background` rule —
   that is what was showing. We (1) kill those with higher-specificity rules, and
   (2) draw our own blurred image on html::before. It lives on `html` because the
   Travian body carries `perspectiveBuildings`, which makes it the containing block
   for position:fixed (a fixed layer on the body would only cover the narrow body
   box). `html` has no such ancestor. */
html {
  min-height: 100%;
  background: #0a0d14 !important;
}
/* blurred image layer (fixed to the viewport, behind body) */
html::before {
  content: "";
  position: fixed;
  inset: -40px;                 /* bleed so the blur never reveals transparent edges */
  z-index: -2;
  background: url('../../img/Game-BG.jpeg') center center / cover no-repeat;
  filter: blur(9px) brightness(0.66) saturate(1.05);
  transform: scale(1.06);
  pointer-events: none;
}
/* light veil: keeps text readable while the image clearly shows through */
html::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 96% 92% at 50% 42%, rgba(6, 8, 13, 0.08) 0%, rgba(5, 7, 12, 0.5) 100%),
    linear-gradient(180deg, rgba(6, 8, 13, 0.24) 0%, rgba(4, 6, 10, 0.42) 100%);
  pointer-events: none;
}
/* Legacy purge batch D (2026-10-24): the legacy `body { min-width: 1290px }` (compact.css) made every support-shell page
   1290 px wide on tablets and phones (content off screen, sideways scrolling); the shell is fluid. */
body.support { min-width: 0 !important; }
body.support {
  color: var(--crz-text, #d8dae0) !important;
  font-family: var(--crz-font-body, "Source Sans 3"), "Segoe UI", sans-serif !important;
}
/* Body transparent + KILL the gpack village scene. These selectors carry more
   classes than the gpack's (body.buildingsV1.perspectiveBuildings…), so they win. */
body.support.buildingsV1 {
  background: transparent !important;
}
body.support.buildingsV1.perspectiveBuildings::before,
body.support.buildingsV1.perspectiveBuildings::after {
  display: none !important;
  background: none !important;
  background-image: none !important;
}
body.support.buildingsV1.perspectiveBuildings div#background,
body.support div#background {
  background: none !important;
  background-image: none !important;
}

/* ---- Strip the legacy Travian chrome ---- */
body.support #header,
body.support #sidebarBeforeContent,
body.support #sidebarAfterContent,
body.support .contentTitle,
body.support .contentFooter,
body.support #footer,
body.support #content.support > h1.titleInHeader {
  display: none !important;
}

/* ---- Full-width, transparent wrappers so our shell can span the viewport ---- */
body.support #bodyWrapper,
body.support #center,
body.support #contentOuterContainer,
body.support #contentOuterContainer.size1,
body.support .contentContainer,
body.support #content.support {
  position: relative;
  z-index: 1;
  float: none !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  overflow: visible !important;
}

/* ---- Shell wrapper ---- */
body.support .crz-support {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---- Top bar (logo left, nav right) ---- */
body.support .crz-support-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
  padding: 12px clamp(16px, 4vw, 52px);
  background: linear-gradient(180deg, rgba(12, 14, 20, 0.9) 0%, rgba(8, 10, 16, 0.82) 100%);
  border-bottom: 1px solid rgba(201, 162, 78, 0.4);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
body.support .crz-support-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
body.support .crz-support-brand-logo {
  height: 40px;
  width: 40px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}
body.support .crz-support-brand-name {
  font-family: var(--crz-font-display, "Cinzel"), serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--crz-gold-bright, #f0d080);
  white-space: nowrap;
}
body.support .crz-support-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
body.support .crz-support-navlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--crz-text-muted, #9a958a);
  font-family: var(--crz-font-body, sans-serif);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
body.support .crz-support-navlink .crz-nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: currentColor;
}
body.support .crz-support-navlink:hover {
  color: var(--crz-gold-bright, #f0d080);
  border-color: rgba(201, 162, 78, 0.4);
  background: rgba(201, 162, 78, 0.07);
}
body.support .crz-support-navlink.is-active {
  color: #1a1408;
  background: linear-gradient(180deg, #f0d47a 0%, #d0a844 100%);
  border-color: #f0d478;
  box-shadow: 0 3px 12px rgba(201, 162, 78, 0.3);
}

/* ---- Main: centre the ornate panel ---- */
body.support .crz-support-main {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px 32px;
}
body.support .crz-support-main .crz-panel {
  width: 100%;
  max-width: 540px;
}
/* Password reset reuses this shell with sparse content (title + link only).
   Keep the panel top-aligned like every other page; centre the title/message.
   Shrink the password title + give it a real line-height: the big Cinzel size
   overflowed the gpack h1 line-height, so the wrapped "PASSWORD" / "FORGOTTEN?"
   lines collided (looked like doubled text). */
body.support .crz-support .crz-title,
body.support .crz-support .crz-support-done {
  text-align: center !important;
}
body.support .crz-support--solo .crz-title {
  font-size: clamp(1.4rem, 3.4vw, 1.9rem) !important;
  letter-spacing: 0.08em !important;
  line-height: 1.2 !important;
}
body.support .crz-support-lead {
  text-align: center;
  color: var(--crz-text-muted, #9a958a);
  max-width: 440px;
  margin: -18px auto 26px;
  line-height: 1.55;
  font-size: 0.95rem;
}

/* ---- <select> + <textarea>: match theme.css .crz-field input ---- */
body.support .crz-field select,
body.support .crz-field textarea {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 12px 14px !important;
  font-family: var(--crz-font-body, sans-serif) !important;
  font-size: 1rem !important;
  color: var(--crz-text, #d8dae0) !important;
  background: rgba(0, 0, 0, 0.35) !important;
  border: 1px solid rgba(201, 162, 78, 0.25) !important;
  border-radius: var(--crz-radius, 4px) !important;
  outline: none !important;
  color-scheme: dark;
}
/* The open list: explicit colours, because browsers differ on what an unstyled option inherits (GD P0 2026-11-02) */
/* compact.css gives a closed select height 1.8em: with this padding its value had no room and the box looked empty */
body.support .crz-field select {
  height: auto !important;
  min-height: 44px;
}
body.support .crz-field select option {
  background-color: #141a24 !important;
  color: #e8e6e0 !important;
}
body.support .crz-field select:focus,
body.support .crz-field textarea:focus {
  border-color: var(--crz-gold, #c9a24e) !important;
}
body.support .crz-field textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.5;
}

/* ---- Footer ---- */
body.support .crz-support-footer {
  margin-top: 8px;
  padding: 18px 16px 30px;
}

/* ---- Success (?success=1) ---- */
body.support .crz-support-done {
  text-align: center;
  color: var(--crz-text, #d8dae0);
  font-size: 1.05rem;
  line-height: 1.6;
}
body.support .crz-support-done a {
  color: var(--crz-gold, #c9a24e);
  text-decoration: none;
}

/* ---- Small screens ---- */
@media (max-width: 620px) {
  body.support .crz-support-topbar {
    justify-content: center;
  }
  body.support .crz-support-navlink span {
    display: none;
  }
  body.support .crz-support-navlink {
    padding: 9px 11px;
  }
}
