/* "서버" (views/servers.js, server-new.js, server-page.js). The tiles on
   the list are computers.css's (.computer-card); only what a server adds is
   here: the tile that opens its page when clicked, the "서버 추가" form
   with its storage bar, and the server's page (name and controls on top,
   five tabs under them). Tokens come from style.css. */

/* ---- list ---- */
.server-card { cursor: pointer; }
.server-link { color: inherit; text-decoration: none; }
.server-link:hover { text-decoration: none; }
.server-info { margin-top: 0; }
/* A server that is off: grey dot (the computer tiles' default). */

/* ---- 서버 추가 ---- */
.server-form-area { max-width: 760px; }
.server-form { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.server-form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.server-storage { padding: 14px 16px; border-radius: var(--radius-card); background: var(--surface); }
.server-storage-text { margin: 0 0 10px; font-size: 14px; line-height: 1.45; }
.server-storage.full .server-storage-text { color: var(--error); }
.server-storage-bar {
  display: block;
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 4px;
  background: var(--fill);
  -webkit-appearance: none;
  appearance: none;
}
.server-storage-bar::-webkit-meter-bar { height: 8px; border: 0; border-radius: 4px; background: var(--fill); }
.server-storage-bar::-webkit-meter-optimum-value,
.server-storage-bar::-webkit-meter-suboptimum-value,
.server-storage-bar::-webkit-meter-even-less-good-value { border-radius: 4px; background: var(--accent); }
.server-storage-bar::-moz-meter-bar { border-radius: 4px; background: var(--accent); }
.server-storage.full .server-storage-bar::-webkit-meter-optimum-value,
.server-storage.full .server-storage-bar::-webkit-meter-suboptimum-value,
.server-storage.full .server-storage-bar::-webkit-meter-even-less-good-value { background: var(--error); }
.server-storage.full .server-storage-bar::-moz-meter-bar { background: var(--error); }

/* ---- the server's page ---- */
.server-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 16px; margin-bottom: 16px; }
.server-head-text { flex: 1; min-width: 0; }
.server-back { display: inline-flex; align-items: center; gap: 2px; margin-bottom: 4px; color: var(--muted); font-size: 13px; text-decoration: none; }
.server-back:hover { color: var(--text); }
.server-back .icon { width: 14px; height: 14px; transform: rotate(90deg); }
.server-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.server-title { margin: 0; overflow-wrap: anywhere; }
.server-status { margin: 0; }
.server-meta { margin: 4px 0 0; }
.server-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.server-controls .btn .icon { width: 14px; height: 14px; fill: currentColor; }
/* The state's colour, as on the computer tiles. */
.server-status[data-state="online"] .status-dot { background: var(--ok); }
.server-status[data-state="online"] .status-text { color: var(--ok); }
.server-status[data-state="noagent"] .status-dot { background: var(--warn); }
.server-status[data-state="noagent"] .status-text { color: var(--warn); }
.server-status[data-state="offline"] .status-dot { background: var(--error); }
.server-status[data-state="offline"] .status-text { color: var(--error); }
.server-status[data-state="setup"] .status-dot { background: var(--accent); }
.server-status[data-state="setup"] .status-text { color: var(--accent); }

.server-tabs { position: relative; display: flex; gap: 4px; margin-bottom: 16px; padding: 4px; overflow-x: auto; border-radius: var(--radius); background: var(--fill); }
/* The sliding mark under the chosen tab (views/server-page.js). */
.server-tab-slider { position: absolute; top: 4px; bottom: 4px; left: 0; width: var(--w, 0); border-radius: 8px; background: var(--accent); transform: translateX(var(--x, 0)); pointer-events: none; }
.server-tab-slider.ready { transition: transform 0.32s cubic-bezier(0.3, 0.9, 0.3, 1), width 0.32s cubic-bezier(0.3, 0.9, 0.3, 1); }
.server-tab { position: relative; z-index: 1; flex: none; padding: 8px 16px; border-radius: 8px; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background-color 0.15s, color 0.3s; }
.server-tab:hover { background: var(--hover); color: var(--text); }
.server-tab[aria-current="page"] { color: var(--accent-ink); }
.server-tab[aria-current="page"]:hover { background: none; color: var(--accent-ink); }
/* While the mark slides over, the chosen tab waits in the plain colour and the tab it left keeps the dark one. */
.server-tabs:not(.settled) .server-tab[aria-current="page"] { color: var(--muted); }
.server-tabs:not(.settled) .server-tab[data-from] { color: var(--accent-ink); }
.server-notes { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.server-notes:empty { display: none; }
.server-notes .banner-file { margin: 0; }
.server-tab-body { min-height: 240px; }

@media (prefers-reduced-motion: reduce) {
  .server-tab { transition: none; }
  .server-tab-slider.ready { transition: none; }
}

/* ---- 사용자 > 서버 한도 (admin-users.js): a number with its unit ---- */
.size-row { display: flex; gap: 8px; }
.size-row .input:first-child { flex: 1; min-width: 0; }
.size-row .select { flex: none; width: 96px; }
.server-eula-link { color: var(--accent); }

/* The address of a server (its port forward) under its name, with a copy button. */
.server-address { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
/* The label, the box and the two buttons are one row of one height (40px, as .input). */
.server-address-label { display: flex; align-items: center; min-height: 40px; color: var(--muted); font-size: 13px; }
.server-address .copy-field { flex: 1 1 320px; max-width: 520px; margin: 0; align-items: center; }
.server-address .copy-field .input, .server-address .btn { min-height: 40px; }
.server-address-note { flex-basis: 100%; margin: 0; color: var(--warn); font-size: 13px; }
.server-address-none { margin: 0; color: var(--muted); font-size: 14px; }

/* ---- the window of a server being made (views/server-built.js) ---- */
.build-dialog .dialog-inner { min-width: min(360px, 80vw); text-align: center; }
.build-dialog .dialog-title { font-size: 22px; overflow-wrap: anywhere; }
.build-working { display: grid; place-items: center; padding: 14px 0 6px; color: var(--muted); }
.build-done { margin: 6px 0 4px; font-size: 19px; font-weight: 600; }
.build-failed { margin: 6px 0 8px; color: var(--error); font-size: 18px; }
.build-dialog .dialog-actions { justify-content: center; }
/* Fireworks (views/fireworks.js): the whole screen, above the window, never in the way of a click. */
.fx-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; margin: 0; padding: 0; border: 0; background: transparent; pointer-events: none; overflow: visible; }
