/* Subsense branding for the xpra HTML5 login page.
   Layout/behaviour classes (form-control, btn, panel-group, etc.) are kept
   so the stock connect.html JS keeps working unmodified — only look & feel
   changes, plus a few fields hidden that this deployment never needs
   (server/port/username are fixed per session URL, so the user only sees
   a password field). */

:root {
  --subsense-blue: #1a4a7a;
  --subsense-blue-dark: #123356;
  --subsense-accent: #2ea3f2;
  --ink: #1f2733;
  --muted: #6b7684;
  --border: #e2e6ea;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
  font-family: -apple-system, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #f4f6f8;
  color: var(--ink);
}

/* Screenreader-only (unchanged from stock) */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: none;
}

/* kill the stock xpra background photo */
div.bg-image { display: none !important; }

/* ── centred white card ─────────────────────────────────────────────── */
div.container {
  margin: 0;
  min-height: 100vh;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-signin {
  max-width: 380px;
  width: 100%;
  padding: 32px 30px;
  margin: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 2px 14px rgba(20, 30, 50, 0.06);
}

.form-signin-heading {
  font-weight: 700;
  font-size: 21px;
  color: var(--subsense-blue);
  text-align: center;
  margin: 0 0 22px 0;
}

.form-signin p.subhead {
  margin: 0 0 22px 0;
  font-size: 13px;
  color: var(--muted);
}

h5 { display: none; } /* stock "Version NN" line */

/* This deployment gives each colleague a dedicated session URL, so the
   server/port fields underneath (auto-filled from that URL) add nothing
   but clutter — hidden, not removed, so the existing connect.html JS still
   reads/writes their values normally. Username + password stay visible;
   those are the only two fields colleagues need to see. */
#server, #port, #server-info-box { display: none !important; }
.security-box { display: none !important; }
.panel-group:not([role="tablist"]) { display: none !important; }
/* "Advanced options" (encoding, keyboard layout, debug flags, ...) is
   internal xpra tooling with no place on a login page — hidden entirely. */
.panel-group[role="tablist"] { display: none !important; }

/* ── inputs ──────────────────────────────────────────────────────────── */
.form-control::placeholder { color: #9aa3ad; opacity: 1; }

.form-control {
  display: block;
  width: 100%;
  height: 42px;
  padding: 8px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cfd6dd;
  border-radius: 6px;
  font-size: 15px;
  margin-bottom: 14px;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control:focus {
  outline: none;
  border-color: var(--subsense-accent);
  box-shadow: 0 0 0 3px rgba(46, 163, 242, 0.15);
}

label {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
}

.form-group { margin-bottom: 18px; }

/* ── buttons ─────────────────────────────────────────────────────────── */
.btn { border: 1px solid transparent; cursor: pointer; border-radius: 6px; }
.btn-lg { padding: 11px 18px; font-size: 15px; width: 100%; }

.btn-success {
  color: #fff;
  background-color: var(--subsense-blue);
  border-color: var(--subsense-blue);
  font-weight: 600;
}
.btn-success:hover {
  color: #fff;
  background-color: var(--subsense-blue-dark);
  border-color: var(--subsense-blue-dark);
}

/* Keep only the primary Connect button; "Client URI" / "Connection File"
   are power-user tools this audience doesn't need. */
.form-group .btn-success:not(#main_action_button) { display: none !important; }

/* Password field with an eye icon inside it to reveal what was typed. */
.password-wrap {
  position: relative;
}
.password-wrap .form-control {
  padding-right: 40px;
}
img.field-icon {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  margin: 0;
  width: 20px;
  height: 20px;
  opacity: 0.55;
  cursor: pointer;
}
img.field-icon:hover { opacity: 0.9; }

#alert-disconnect {
  background: #fdecea;
  border: 1px solid #f4c7c3;
  color: #7a2a20;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* ── advanced options (still reachable, kept out of the way) ───────────── */
.panel-group[role="tablist"] { margin-top: 4px; }
#expandopts {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
}
.panel-title { font-size: 12px; font-weight: 500; color: var(--muted); }
.list-group-item {
  background-color: #fff;
  border: 1px solid var(--border);
  border-left: none;
  border-right: none;
  font-size: 13px;
  padding: 6px 10px;
}

span#server-info {
  padding-left: 20px;
  font-size: 11px;
  font-style: italic;
  color: var(--muted);
}
