/* =========================================================
   WARTIME — player panel theme
   Maps the brand tokens (homepage: assets/site/templates/default/wt/css/wartime.css)
   onto MoonShine's colour variables. MoonShine expects "R, G, B" triplets.
   ========================================================= */
html:root,html:root.dark{
  --primary:142, 32, 43;          /* --wt-crimson */
  --secondary:177, 43, 56;        /* --wt-crimson-hover */
  --body:9, 10, 13;               /* --wt-bg */
  --dark-DEFAULT:23, 26, 32;      /* --wt-surface */
  --dark-50:119, 126, 137;        /* --wt-text-muted */
  --dark-100:69, 75, 86;          /* --wt-border-strong */
  --dark-200:43, 48, 57;          /* --wt-border */
  --dark-300:36, 40, 48;
  --dark-400:32, 36, 44;          /* --wt-surface-hover */
  --dark-500:28, 31, 38;
  --dark-600:23, 26, 32;          /* --wt-surface */
  --dark-700:20, 23, 28;
  --dark-800:16, 18, 23;          /* --wt-bg-secondary */
  --dark-900:9, 10, 13;           /* --wt-bg */
  --success-bg:47, 104, 76;  --success-text:220, 240, 228;
  --warning-bg:138, 104, 44; --warning-text:255, 240, 214;
  --error:212, 91, 99;       --error-bg:142, 32, 43;  --error-text:255, 232, 234;
  --info-bg:52, 62, 78;      --info-text:220, 225, 232;

  --wt-text:#F0F0EC;
  --wt-text-secondary:#A0A5AE;
  --wt-text-muted:#777E89;
  --wt-silver:#AEB6C2;
  --wt-border:#2B3039;
  --wt-font-ui:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --wt-font-display:"Bona Nova SC",Georgia,serif;
  color-scheme:dark;
}

/* typography: Inter for UI, Bona Nova SC for headings (overrides the old custom font) */
html body{font-family:var(--wt-font-ui);color:var(--wt-text-secondary);-webkit-font-smoothing:antialiased}
html body :is(h1,h2,h3),html body .text-2xl,html body .text-xl{font-family:var(--wt-font-display);font-weight:700;letter-spacing:.02em;color:var(--wt-text)}
html body :is(strong,b){color:var(--wt-text)}

/* page surfaces: obsidian page, slightly lighter sidebar */
html.dark body,html.dark .layout-wrapper{background-color:rgb(9,10,13)}
html.dark .layout-page{background-color:rgb(9,10,13);border:1px solid var(--wt-border)}
@media (min-width:769px){html.dark .layout-menu{background-color:rgb(16,18,23)}}

/* buttons: flat, 2px radius, 200ms colour transitions, no shimmer */
html body .btn{border-radius:2px;font-weight:600;letter-spacing:.04em;transition:background-color .2s ease,border-color .2s ease,color .2s ease}
html body .btn:before{display:none!important}
html body .btn-primary{color:var(--wt-text)}
html body .btn-primary:hover{background-color:rgb(177,43,56);border-color:rgb(177,43,56)}

/* form fields: dark surface, neutral border, crimson focus */
html.dark body :is(input,select,textarea):not([type=checkbox]):not([type=radio]){background-color:rgb(23,26,32);border-color:var(--wt-border);color:var(--wt-text)}
html.dark body :is(input,select,textarea):focus{border-color:rgb(177,43,56);box-shadow:0 0 0 2px rgba(177,43,56,.25)}
html body ::placeholder{color:var(--wt-text-muted)}

/* links */
html body a:not(.btn):not(.menu-inner-link){transition:color .18s ease}

/* sidebar logo */
.wt-panel-logo{display:flex;align-items:center;min-height:44px}
.wt-panel-logo img{display:block;height:44px;width:auto;max-width:100%}
.wt-panel-logo .wt-panel-logo__mark{height:32px;width:32px}

/* footer (replaces the CMS vendor link) */
.wt-panel-foot{padding:16px 20px;text-align:right;font:500 12px/1.4 var(--wt-font-ui);letter-spacing:.08em;color:var(--wt-text-muted)}

/* titles that hard-code an unavailable font ("ee") → brand display face */
html body [style*="font-family: ee"],html body [style*="font-family:ee"]{font-family:var(--wt-font-display)!important;font-weight:700!important;letter-spacing:.03em;color:var(--wt-text)}
html body .description{color:var(--wt-text-muted)}

/* form submits are the primary action */
html body form button[type=submit].btn{background-color:rgb(142,32,43);border-color:rgb(142,32,43);color:var(--wt-text);height:44px;text-transform:uppercase;letter-spacing:.12em;font-size:.8125rem}
html body form button[type=submit].btn:hover{background-color:rgb(177,43,56);border-color:rgb(177,43,56)}
html body form button[type=submit].btn:active{background-color:rgb(118,26,36)}
html body .btn:focus-visible,html body a:focus-visible{outline:2px solid #DCE1E8;outline-offset:2px}

/* sidebar: quiet items, crimson indicator on the current page */
html body .menu-inner-item>a,html body .menu-inner-link{transition:background-color .2s ease,color .2s ease}
html.dark body .menu-inner-item._is-active>a,html.dark body .menu-inner-item._is-active>.menu-inner-link{background-color:rgb(23,26,32);box-shadow:inset 2px 0 0 rgb(177,43,56);color:var(--wt-text)}
html.dark body .menu-inner-item:not(._is-active)>a:hover{background-color:rgb(23,26,32)}

/* content panel: same castle atmosphere as the homepage, heavily darkened */
html.dark .layout-page{background:
  linear-gradient(180deg,rgba(9,10,13,.84),rgba(9,10,13,.95) 45%,rgb(9,10,13)),
  url("../../site/templates/default/wt/img/castle-1280.webp") center top/cover no-repeat,
  rgb(9,10,13)}
html.dark .layout-content .box,html.dark .box{background-color:rgba(23,26,32,.92);border:1px solid var(--wt-border);border-radius:4px;box-shadow:none}

/* page-specific leftovers (navy/purple hard-coded in rating, donate, files) */
html.dark body fieldset.bg-gray-50{background-color:rgba(16,18,23,.9)!important;border-color:var(--wt-border)!important}
html.dark body .box.box-donate{background-color:rgb(23,26,32)!important;border:1px solid var(--wt-border)}
html.dark body :is(.badge-purple,.donate-bns,.irs-min,.irs-max){background-color:rgb(32,36,44)!important;color:var(--wt-text-secondary)!important}
html.dark body .irs-single{background-color:rgb(142,32,43)!important;color:var(--wt-text)!important}
html.dark body .irs-bar,html.dark body .irs-bar--single{background:rgb(142,32,43)!important}
html.dark body .irs-handle,html.dark body .irs-handle>i:first-child{background-color:rgb(177,43,56)!important;border-color:rgb(177,43,56)!important}
html.dark body a.floating-button{background-color:rgb(142,32,43)!important;color:var(--wt-text)!important;border-color:rgb(142,32,43)!important;border-radius:2px}
html.dark body a.floating-button:hover{background-color:rgb(177,43,56)!important}
html body .layout-content :is(h1,h2,h3,h4,.title)[style*="font-family"]{font-family:var(--wt-font-display)!important}
html body .layout-content [style*="f2"],html body .layout-content [style*="Arial"]{font-family:var(--wt-font-ui)!important}
html body .layout-content .floating-button{font-family:var(--wt-font-ui)!important;font-weight:600;letter-spacing:.1em}
html body .layout-content h1.truncate[style*="font-family"]{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.2}

/* =========================================================
   Consistency pass — same surfaces, corners and lines as the site
   ========================================================= */
/* one palette: page #090A0D · surface #171A20 · hover #20242C · line #2B3039 */
html:root,html:root.dark{
  --dark-DEFAULT:23, 26, 32;
  --dark-300:23, 26, 32; --dark-400:32, 36, 44; --dark-500:23, 26, 32; --dark-600:23, 26, 32;
  --dark-700:23, 26, 32; --dark-800:9, 10, 13;  --dark-900:9, 10, 13;
}

/* square corners everywhere (2px like the site); real circles (avatars, dots) keep .rounded-full */
html body :is(div,a,button,input,select,textarea,fieldset,section,span,ul,li,table,thead,tbody,tr,th,td,form,img,label,nav,header,footer,aside,dialog):not(.rounded-full){border-radius:2px!important}

/* edge-to-edge frame: full-height sidebar, content separated by one hairline */
@media (min-width:769px){
  /* sidebar is position:fixed (16.75rem, 4.75rem when collapsed); keep the matching left offset, drop the outer gaps */
  html.dark body .layout-wrapper:has(>.layout-menu){padding:0 0 0 calc(16.75rem + 1.25rem)!important;row-gap:0!important;background:rgb(9,10,13)}
  html.dark body .layout-wrapper-short:has(>.layout-menu){padding-left:calc(4.75rem + 1.25rem)!important}
  html.dark body .layout-menu{box-sizing:border-box!important;left:0!important;top:0!important;height:100vh!important;padding-top:1.5rem!important;padding-bottom:1rem!important;padding-left:1.25rem;background-color:rgb(9,10,13)!important;border-right:1px solid var(--wt-border)}
  html.dark body .layout-page{margin:0!important;border:0!important;min-height:100vh}
}
@media (max-width:768.98px){
  html.dark body .layout-wrapper{padding:4rem 0 0!important}
  html.dark body .layout-page{margin:0!important;border:0!important;border-top:1px solid var(--wt-border)!important}
}
html.dark body .layout-header{border-bottom:1px solid var(--wt-border)}
html.dark body .layout-content .box,html.dark body .box{background-color:rgb(23,26,32)!important;border:1px solid var(--wt-border)!important}
html.dark body fieldset{background-color:rgb(23,26,32)!important;border:1px solid var(--wt-border)!important}
html.dark body .btn:not(.btn-primary):not([type=submit]){background-color:rgb(23,26,32);border-color:var(--wt-border);color:#DCE1E8}
html.dark body .btn:not(.btn-primary):not([type=submit]):hover{background-color:rgb(32,36,44);border-color:#454B56}
html.dark body .menu-inner-item>a,html.dark body .menu-inner-link{color:#AEB6C2}
html.dark body .menu-inner-item>a:hover{color:#F0F0EC}
html.dark body .menu-inner-item._is-active>a,html.dark body .menu-inner-item._is-active>.menu-inner-link{background-color:rgb(23,26,32)!important;color:#F0F0EC!important;box-shadow:inset 2px 0 0 rgb(177,43,56)}
html.dark body :is(.ratting-badge){background-color:rgb(23,26,32)!important;box-shadow:none!important}
html.dark body table :is(th){color:#777E89;font-weight:600;text-transform:uppercase;letter-spacing:.08em;font-size:.75rem}
html.dark body table :is(td,th){border-color:var(--wt-border)!important}

/* no glows: inline and legacy box-shadow / drop-shadow halos on icons, badges and cards */
html body [style*="box-shadow"],html body img,html body .btn-ava,html body .ratting-badge,html body .bgs-ava{box-shadow:none!important}
html body :is(svg,img,.icon)[style*="drop-shadow"],html body .menu-inner-icon{filter:none!important}

/* sidebar server card: brand castle instead of the old artwork, one hairline border */
html body #server-info .status-s{
  background:linear-gradient(90deg,rgba(9,10,13,.92),rgba(9,10,13,.55)),url("../../site/templates/default/wt/img/castle-1280.webp") 70% 35%/cover no-repeat!important;
  border:1px solid var(--wt-border)!important;box-shadow:none!important}
html body #server-info .status-s .badge,html body #server-info .status-s [class*="badge"]{box-shadow:none!important;border:1px solid #454B56!important;color:#DCE1E8!important}

/* ---------- collapsed sidebar: 72px rail, centred 40px icons, nothing overflows ---------- */
@media (min-width:769px){
  html.dark body .layout-wrapper:has(>.layout-menu){padding-left:268px!important}
  html.dark body .layout-wrapper-short:has(>.layout-menu){padding-left:72px!important}
  html.dark body .layout-menu._is-minimized{width:72px!important;padding-left:12px!important;padding-right:12px!important}
  html body .layout-menu._is-minimized .menu{padding-right:0!important;align-items:stretch}
  html body .layout-menu._is-minimized .menu-heading{margin-right:0!important;padding:0 0 12px!important;align-items:center}
  html body .layout-menu._is-minimized .wt-panel-logo{justify-content:center;width:100%}
  html body .layout-menu._is-minimized .menu-inner-item{margin:0!important}
  html body .layout-menu._is-minimized :is(.menu-inner-link,.menu-inner-button){justify-content:center;height:40px;padding:0!important;column-gap:0}
  html body .layout-menu._is-minimized :is(.menu-inner-link,.menu-inner-button)>:is(svg,div){width:20px;height:20px}
  html body .layout-menu._is-minimized .menu-inner-link:after{display:none}
  html body .layout-menu._is-minimized .menu-inner-divider,html body .layout-menu._is-minimized li.border-t{margin-left:0!important;margin-right:0!important}
  html body .layout-menu._is-minimized #server-info{margin:0!important}
  html body .layout-menu._is-minimized .status-mini{display:flex!important;justify-content:center;margin:8px 0!important}
  html body .layout-menu._is-minimized .status-mini hr{display:none}
}
/* radial gauges stay round (exempt from the square-corner rule) */
html body div.radial-progress.radial-progress{border-radius:50%!important;--size:40px!important;width:40px!important;height:40px!important;font-size:11px!important}

/* ---------- contacts dropdown: one quiet list, monochrome icons ---------- */
.wt-contacts{display:flex;flex-direction:column;min-width:220px;padding:6px}
.wt-contacts a{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:2px;color:#DCE1E8!important;text-decoration:none;font:500 .875rem/1.2 var(--wt-font-ui);transition:background-color .18s ease,color .18s ease}
.wt-contacts a:hover{background:#20242C;color:#F0F0EC!important}
.wt-contacts svg{width:18px;height:18px;flex:none;fill:#AEB6C2;transition:fill .18s ease}
.wt-contacts a:hover svg{fill:#F0F0EC}
.wt-contacts small{margin-left:auto;font-size:.75rem;color:#777E89}
.wt-contacts__empty{padding:12px;font-size:.875rem;color:#777E89}
html.dark body .dropdown-body{background-color:#171A20!important;border:1px solid #2B3039!important;box-shadow:0 12px 32px rgba(0,0,0,.5)!important}

/* ---------- profile avatar + menu: same language as the lang button ---------- */
html body [data-dropdown-toggle="dropdown-user"]{background:transparent!important;border-radius:2px!important;--tw-ring-shadow:0 0 #0000!important;box-shadow:none!important}
html.dark body .btn-ava,html body .btn-ava{width:42px!important;height:42px!important;border-radius:2px!important;background:#171A20!important;border:1px solid #2B3039!important;color:#F0F0EC!important;font:600 1rem/1 var(--wt-font-ui);text-transform:uppercase;object-fit:cover;transition:border-color .18s ease,background-color .18s ease}
html body [data-dropdown-toggle="dropdown-user"],html body [data-dropdown-toggle="dropdown-user"] *,html.dark body .btn-ava,html body .btn-ava{box-shadow:none!important;filter:none!important;--tw-ring-shadow:0 0 #0000!important;--tw-ring-offset-shadow:0 0 #0000!important;outline:none}
html body #dropdown-user{background:#171A20!important;border:1px solid #2B3039!important;border-radius:2px!important;box-shadow:0 12px 32px rgba(0,0,0,.5)!important;min-width:240px;padding:6px 0}
html body #dropdown-user>div:first-child{border-bottom:1px solid #2B3039!important;padding:10px 16px 12px}
html body #dropdown-user>div:first-child p:first-child{color:#F0F0EC!important;font:600 .95rem/1.3 var(--wt-font-ui)}
html body #dropdown-user>div:first-child p:last-child{color:#777E89!important;font:400 .8rem/1.4 var(--wt-font-ui);margin-top:2px}
html body #dropdown-user ul{border:0!important;padding:6px!important}
html body #dropdown-user .bgs-ava{border-radius:2px;color:#DCE1E8!important;font:500 .875rem/1.2 var(--wt-font-ui);padding:10px 12px!important;transition:background-color .18s ease,color .18s ease}
html body #dropdown-user .bgs-ava:hover{background:#20242C!important;color:#F0F0EC!important}

/* ---------- switcher: knob centred in the track ---------- */
html body .form-switcher .form-switcher-toggler{position:relative;box-sizing:border-box;width:44px;height:24px;border-radius:999px!important;border:1px solid #2B3039!important;background-color:#10121A!important}
html body .form-switcher .form-switcher-toggler:after{box-sizing:border-box;position:absolute;top:50%!important;left:3px!important;width:16px!important;height:16px!important;margin:0;border:0!important;border-radius:999px!important;background:#777E89!important;transform:translate(0,-50%)!important;transition:transform .2s ease,background-color .2s ease}
html body .form-switcher .peer:checked+.form-switcher-toggler{background-color:rgb(142,32,43)!important;border-color:rgb(142,32,43)!important}
html body .form-switcher .peer:checked+.form-switcher-toggler:after{background:#F0F0EC!important;transform:translate(20px,-50%)!important}
html body .form-switcher .peer:focus-visible+.form-switcher-toggler{outline:1px solid #AEB6C2;outline-offset:2px}

/* ---------- fixed-width modals: tabs don't resize the dialog ---------- */
html body .modal.wt-modal-fixed .modal-dialog{width:100%;max-width:520px}
html body .modal.wt-modal-fixed .modal-content{width:100%}

/* ---------- send coins: one clean column, brand range ---------- */
html body .wt-transfer-amount{display:flex;flex-direction:column;gap:12px}
html.dark body select{background-color:rgb(16,18,23)!important;border:1px solid #2B3039!important;color:#F0F0EC!important}
html.dark body select optgroup{background:#10121A;color:#777E89;font-style:normal;font-weight:600}
html.dark body select option{background:#10121A;color:#F0F0EC}
html body input[type=range].wt-range,html body input[type=range]{-webkit-appearance:none;appearance:none;height:24px;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;accent-color:rgb(142,32,43);cursor:pointer}
html body input[type=range]::-webkit-slider-runnable-track{height:4px;border-radius:2px;background:#2B3039}
html body input[type=range]::-moz-range-track{height:4px;border-radius:2px;background:#2B3039}
html body input[type=range]::-moz-range-progress{height:4px;border-radius:2px;background:rgb(142,32,43)}
html body input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;margin-top:-6px;border-radius:2px;background:#F0F0EC;border:2px solid rgb(142,32,43);box-shadow:none}
html body input[type=range]::-moz-range-thumb{width:12px;height:12px;border-radius:2px;background:#F0F0EC;border:2px solid rgb(142,32,43);box-shadow:none}
html body input[type=range]:focus-visible{outline:1px solid #AEB6C2;outline-offset:4px}
html body .form-switcher .form-switcher-toggler,html body .form-switcher .peer:focus+.form-switcher-toggler{box-shadow:none!important;--tw-ring-shadow:0 0 #0000!important;--tw-ring-offset-shadow:0 0 #0000!important}
/* profile avatar hover = language button hover */
html.dark body .btn-ava,html body .btn-ava{color:#DCE1E8!important;transition:background-color .2s ease,border-color .2s ease,color .2s ease!important}
html.dark body [data-dropdown-toggle="dropdown-user"]:hover .btn-ava{background-color:#20242C!important;border-color:#454B56!important}

/* iOS: no auto-zoom on focus (Safari zooms when field text < 16px); pinch-zoom stays available */
@supports (-webkit-touch-callout: none) {
  html body input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=submit]):not([type=button]),
  html body select, html body textarea, html body .choices__input { font-size: 16px !important; }
}
