/* ==========================================================================
   Theme: Forever
   The Hearth's palette and artwork — deep navy, bronze rails, soft gold —
   laid over exactly the same portal structure as Classic Era. Only colour,
   type and images change; the layout in assets/css/base.css is untouched.
   ========================================================================== */

:root {
  /* Page — the Kingdoms banner takes the place of the Azeroth artwork. */
  --gw-bg: #0a1730;
  /* The Kingdoms banner, veiled just enough to keep text readable over it. */
  --gw-bg-image:
    linear-gradient(rgba(8, 18, 40, 0.35) 0, rgba(8, 19, 42, 0.72) 240px, #0a1730 560px),
    url('/_theme/forever/img/hearth/kingdoms-wide.webp');
  --gw-bg-size: auto, 100% auto;
  --gw-bg-position: center top, center top;

  --gw-hero-height: 360px;
  --gw-hero-height-lg: 320px;
  --gw-hero-height-md: 260px;
  --gw-hero-height-sm: 180px;

  /* The HUD bar sits over the top of the banner, so less headroom is needed. */
  --gw-hero-height-topbar: 300px;
  --gw-hero-height-topbar-lg: 260px;
  --gw-hero-height-topbar-md: 210px;
  --gw-hero-height-topbar-sm: 150px;

  --gw-shell-width: 1180px;

  /* Surfaces */
  --gw-panel: rgba(8, 18, 40, 0.94);
  --gw-panel-inner: rgba(9, 20, 39, 0.96);
  --gw-panel-raised: rgba(16, 38, 74, 0.92);

  --gw-line: #7c5e35;
  --gw-line-soft: rgba(166, 125, 70, 0.22);
  --gw-line-strong: #a67d46;

  /* Ink */
  --gw-text: #ddd2ba;
  --gw-text-strong: #f5ecd7;
  --gw-muted: #a9bcd8;
  --gw-accent: #f4c65b;
  --gw-accent-hi: #ffe09a;
  --gw-accent-dim: #a67d46;
  --gw-link: #8fcbff;
  --gw-link-hover: #b9e0ff;

  --gw-ok: #38b000;
  --gw-warn: #f4c65b;
  --gw-danger: #e06c75;

  /* Type */
  --gw-font-display: 'Marcellus', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  --gw-font-head: 'Marcellus SC', 'Palatino Linotype', Georgia, serif;
  --gw-font-body: 'Alegreya Sans', 'Segoe UI', system-ui, sans-serif;
  --gw-font-ui: 'Marcellus SC', 'Palatino Linotype', Georgia, serif;

  /* Chrome — the HUD bar replaces the grey metal bar. */
  --gw-navbar-bg: #091427;
  --gw-navbar-height: 56px;
  --gw-navbar-image: url('/_theme/forever/img/hearth/hud-mid.png');

  /* The Hearth draws no outer frame at all: the carved window borders belong to
     each panel, and the page content sits straight on the map. */
  --gw-frame-bg: none;
  --gw-frame-pad: 0;
  --gw-frame-pad-sm: 0;
  --gw-frame-shadow: none;

  --gw-liner-image: url('/_theme/forever/img/hearth/rule.png');
  --gw-liner-height: 10px;
  --gw-bar-image: url('/_theme/forever/img/hearth/hud-mid.png');

  /* The Hearth uses its sculpted caps on the main HUD bar only; repeating them
     on the breadcrumb bar reads as a stray sprite, so this bar goes without. */
  --gw-cap-left: none;
  --gw-cap-right: none;
  --gw-cap-width: 0;
  --gw-cap-height: 0;

  /* A flat bronze-lit band; row.png is a thin divider and tiles badly at this height. */
  --gw-widget-head: linear-gradient(180deg, rgba(166, 125, 70, 0.22), rgba(5, 11, 23, 0.45));
  --gw-btn-bg: url('/_theme/forever/img/hearth/btn.png') repeat-x center / auto 100%, linear-gradient(180deg, #16325c, #0d1f3d);
  --gw-btn-bg-hover: url('/_theme/forever/img/hearth/btn-hover.png') repeat-x center / auto 100%, linear-gradient(180deg, #1d4279, #122a50);
  --gw-btn-text: #ffe09a;
  --gw-btn-text-hover: #fff6dd;
  --gw-btn-border: 1px solid #a67d46;
  --gw-btn-radius: 2px;
  --gw-btn-shadow: inset 0 1px 0 rgba(255, 224, 154, 0.12), 0 1px 3px rgba(3, 8, 18, 0.6);
  --gw-btn-shadow-active: inset 0 2px 4px rgba(0, 0, 0, 0.5);
  --gw-btn-font: 400 0.9rem 'Marcellus SC', 'Palatino Linotype', Georgia, serif;
  --gw-btn-tracking: 0.04em;
  --gw-btn-transform: none;
  --gw-btn-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);

  --gw-shadow: 0 10px 30px rgba(3, 8, 18, 0.75);
}

@media (max-width: 1000px) {
  :root {
    --gw-bg-image:
      linear-gradient(rgba(8, 18, 40, 0.4) 0, rgba(8, 19, 42, 0.78) 160px, #0a1730 380px),
      url('/_theme/forever/img/hearth/kingdoms.webp');
    --gw-bg-size: auto, 100% auto;
  }
}

@media (max-width: 576px) {
  :root { --gw-bg-size: auto, auto 420px; }
}

/* --------------------------------------------------------------------------
   Theme-specific chrome
   -------------------------------------------------------------------------- */

/*
 * Pinned to the very top of the page and spanning the full viewport, as on
 * The Hearth: the sculpted end caps sit against the screen edges, the crest is
 * at the far left and the account menu at the far right.
 */
.theme-forever .gw-topbar {
  box-shadow: 0 6px 18px rgba(3, 8, 18, 0.55);
}

.theme-forever .gw-topbar .gw-nav {
  max-width: none;
  margin: 0;
}

.theme-forever .gw-nav-mark {
  display: flex;
}

.theme-forever .gw-nav-mark-art {
  background-image: url('/_theme/forever/img/hearth/logo-360.png');
}

.theme-forever .gw-nav-mark:hover .gw-nav-mark-art {
  filter: brightness(1.15) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}

/* The HUD bar keeps its sculpted end caps and the two bronze rails. */
.theme-forever .gw-nav {
  border: 0;
  background:
    url('/_theme/forever/img/hearth/hud-left.png') left top / auto 100% no-repeat,
    url('/_theme/forever/img/hearth/hud-right.png') right top / auto 100% no-repeat,
    url('/_theme/forever/img/hearth/hud-mid.png') left top / auto 100% repeat-x,
    linear-gradient(#7c5e35, #7c5e35) left top 8px / 100% 1px no-repeat,
    linear-gradient(#7c5e35, #7c5e35) left bottom 6px / 100% 1px no-repeat,
    #091427;
  padding: 0 8px 0 6px;
  box-shadow: 0 10px 30px rgba(3, 8, 18, 0.7);
}

.theme-forever .gw-nav-link {
  color: var(--gw-text);
  font-family: var(--gw-font-head);
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 0.9rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.theme-forever .gw-nav-link i {
  color: var(--gw-accent-dim);
}

.theme-forever .gw-nav-link:hover,
.theme-forever .gw-nav-link:hover i {
  color: var(--gw-accent-hi);
  background: transparent;
}

.theme-forever .gw-nav-link.is-active {
  color: var(--gw-accent);
  background: transparent;
  box-shadow: inset 0 -2px 0 var(--gw-accent);
}

.theme-forever .gw-nav-link.is-active i {
  color: var(--gw-accent);
}

.theme-forever .gw-frame {
  border: 0;
  background: none;
  box-shadow: none;
}

/* With no outer frame, the breadcrumbs become their own engraved plate. */
.theme-forever .gw-board-head {
  margin-bottom: var(--gw-gap);
}

.theme-forever .gw-board-bar {
  min-height: 34px;
  padding: 0 16px;
  border: 1px solid rgba(124, 94, 53, 0.8);
  border-image: url('/_theme/forever/img/hearth/row.png') 28 fill / 14px;
  background: rgba(6, 14, 30, 0.6);
  clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px),
                     calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px);
}

/* The liner belongs to a frame that this theme does not draw. */
.theme-forever .gw-board-liner {
  display: none;
}

.theme-forever .gw-crumbs {
  text-transform: none;
  letter-spacing: 0.03em;
}

/*
 * The Hearth window. The ornate frame is a border-image, not a background:
 * window.png is sliced 65/170/28 and drawn as a 32.5px / 85px / 14px border,
 * which is why the corners keep their carving at any size. The ::before layer
 * is the inner bevel and the fill behind the title bar, and the title itself
 * sits inside the top border rather than under it.
 */
.theme-forever .gw-panel,
.theme-forever .gw-stat-block {
  position: relative;
  margin-bottom: var(--gw-gap);
  padding: 0 7px 9px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.theme-forever .gw-panel::before,
.theme-forever .gw-stat-block::before {
  content: '';
  position: absolute;
  inset: 3px;
  z-index: 0;
  pointer-events: none;
  border: 1px solid #7c5e35;
  clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px),
                     calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px);
  background:
    linear-gradient(#7c5e35, #7c5e35) 0 27.5px / 100% 1px no-repeat,
    linear-gradient(#0c1b35, #0c1b35) 0 0 / 100% 28px no-repeat;
}

.theme-forever .gw-panel::after,
.theme-forever .gw-stat-block::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border: 85px solid transparent;
  border-width: 32.5px 85px 14px;
  border-image: url('/_theme/forever/img/hearth/window.png') 65 170 28 / 32.5px 85px 14px repeat;
}

.theme-forever .gw-panel-head {
  position: relative;
  z-index: 2;
  height: 32.5px;
  min-height: 0;
  margin: 0 -7px;
  padding: 1px 22px 0 16px;
  background: none;
  border-bottom: 0;
  color: var(--gw-gold-soft, #e3c07c);
  font: 400 0.95rem/1 var(--gw-font-head);
  letter-spacing: 0.08em;
  text-transform: none;
}

.theme-forever .gw-panel-body {
  position: relative;
  z-index: 0;
  background: rgba(8, 18, 38, 0.9);
}

/*
 * A panel with no title bar still has to clear the 32.5px top border. The
 * padding goes on the panel rather than the body: the panel has no top padding
 * of its own, so a margin on the body would simply collapse through it.
 */
.theme-forever .gw-panel:not(:has(> .gw-panel-head)) {
  padding-top: 32.5px;
}

/* The two community blocks carry their heading in the carved top border. */
.theme-forever .gw-stat-block-title {
  position: relative;
  z-index: 2;
  height: 32.5px;
  margin: 0 -7px;
  padding: 1px 22px 0 16px;
  display: flex;
  align-items: center;
  color: var(--gw-gold-soft, #e3c07c);
  font: 400 0.95rem/1 var(--gw-font-head);
  letter-spacing: 0.08em;
  text-transform: none;
}

.theme-forever .gw-stat-block-body {
  position: relative;
  z-index: 0;
}

.theme-forever .gw-recent-box {
  background: rgba(8, 18, 38, 0.9);
  padding: 7px 0;
}

.theme-forever .gw-stat-block-body {
  background: rgba(8, 18, 38, 0.9);
  padding: 12px 14px;
}

/*
 * Rows and secondary surfaces inside a window — board cards, recent topics,
 * alerts and ghost buttons — use The Hearth's lighter row art: row.png sliced
 * 28 and filled, so the plate stretches instead of being a flat CSS border.
 * Without this a ghost button falls back to a bare outline and looks unstyled.
 */
.theme-forever .gw-btn.is-ghost,
.theme-forever .gw-alert,
.theme-forever .gw-board-card,
.theme-forever .gw-recent-item {
  position: relative;
  z-index: 0;
  border: 1px solid rgba(124, 94, 53, 0.8);
  border-image: url('/_theme/forever/img/hearth/row.png') 28 fill / 14px;
  border-radius: 0;
  background-color: rgba(6, 14, 30, 0.6);
  box-shadow: none;
  clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px),
                     calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px);
  transition: filter 0.12s ease;
}

.theme-forever .gw-btn.is-ghost:hover,
.theme-forever .gw-board-card:hover,
.theme-forever .gw-recent-item:hover {
  filter: brightness(1.18);
  background-color: rgba(6, 14, 30, 0.6);
}

.theme-forever .gw-btn.is-ghost {
  color: var(--gw-accent-hi);
}

/* The alert keeps its state colour on the icon, since the plate is the border. */
.theme-forever .gw-alert.is-ok,
.theme-forever .gw-alert.is-error,
.theme-forever .gw-alert.is-info,
.theme-forever .gw-alert.is-warn {
  border-color: rgba(124, 94, 53, 0.8);
}

.theme-forever .gw-recent-item {
  margin: 0 10px 6px;
  padding: 9px 14px 9px 10px;
  border-bottom: 1px solid rgba(124, 94, 53, 0.8);
}

.theme-forever .gw-recent-item:last-child {
  margin-bottom: 0;
}

.theme-forever .gw-table th {
  color: var(--gw-accent);
  border-bottom: 1px solid #7c5e35;
  text-transform: none;
  letter-spacing: 0.06em;
  font-size: 0.82rem;
}

.theme-forever .gw-crumbs {
  background: rgba(9, 20, 39, 0.9);
  border-color: #7c5e35;
  text-transform: none;
  letter-spacing: 0.04em;
  color: var(--gw-muted);
}

.theme-forever .gw-section-head h1,
.theme-forever .gw-section-head h2 {
  color: var(--gw-text-strong);
  text-transform: none;
  letter-spacing: 0.02em;
  font-family: var(--gw-font-display);
}

.theme-forever .gw-section-head {
  border-bottom-color: #7c5e35;
}

/* News articles wear the same carved window as the panels. */
.theme-forever .gw-article {
  position: relative;
  padding: 32.5px 7px 9px;
  border: 0;
  background: none;
  box-shadow: none;
  overflow: visible;
}

.theme-forever .gw-article::before {
  content: '';
  position: absolute;
  inset: 3px;
  z-index: 0;
  pointer-events: none;
  border: 1px solid #7c5e35;
  clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px),
                     calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px);
  background:
    linear-gradient(#7c5e35, #7c5e35) 0 27.5px / 100% 1px no-repeat,
    linear-gradient(#0c1b35, #0c1b35) 0 0 / 100% 28px no-repeat;
}

.theme-forever .gw-article::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border: 85px solid transparent;
  border-width: 32.5px 85px 14px;
  border-image: url('/_theme/forever/img/hearth/window.png') 65 170 28 / 32.5px 85px 14px repeat;
}

.theme-forever .gw-article-banner,
.theme-forever .gw-article-body {
  position: relative;
  z-index: 0;
}

.theme-forever .gw-article-body {
  background: rgba(8, 18, 38, 0.9);
}

.theme-forever .gw-article-title {
  color: var(--gw-gold-soft, #e3c07c);
  font-family: var(--gw-font-display);
}

.theme-forever .gw-badge {
  text-transform: none;
  letter-spacing: 0.04em;
  border-color: #a67d46;
}

.theme-forever .gw-label,
.theme-forever .gw-field label {
  text-transform: none;
  letter-spacing: 0.04em;
  color: var(--gw-accent);
  font-size: 0.85rem;
}

.theme-forever .gw-input,
.theme-forever .gw-select,
.theme-forever .gw-textarea {
  background: rgba(5, 11, 23, 0.6);
  border-color: #7c5e35;
  color: var(--gw-text-strong);
}

.theme-forever .gw-input:focus,
.theme-forever .gw-select:focus,
.theme-forever .gw-textarea:focus {
  border-color: var(--gw-accent);
  background: rgba(5, 11, 23, 0.8);
}

/* The Hearth marks dividers with its own engraved rule. */
.theme-forever .gw-row {
  border-bottom: 1px solid rgba(166, 125, 70, 0.2);
}

.theme-forever .gw-char-avatar,
.theme-forever .gw-post-author .gw-avatar {
  border-color: #a67d46;
  background-image: url('/_theme/forever/img/hearth/g-hearth.png');
  background-size: 70%;
  background-position: center;
  background-repeat: no-repeat;
}

.theme-forever .gw-event-date {
  border-color: #a67d46;
  background: rgba(16, 38, 74, 0.6);
}

.theme-forever .gw-footer {
  background: rgba(5, 11, 23, 0.8);
  border-top: 1px solid #7c5e35;
}

.theme-forever .gw-tabs a.is-active {
  background: rgba(16, 38, 74, 0.55);
  border-color: #7c5e35;
}

.theme-forever .gw-manage-nav a.is-active {
  background: rgba(16, 38, 74, 0.6);
}

.theme-forever .gw-stat .value {
  font-family: var(--gw-font-display);
}
