/* PrepDoctors — SimpleSAMLphp login page (loaded by the portaltheme twig).
   Lives in public_html/assets so it satisfies SimpleSAMLphp's CSP (style-src 'self'). */

:root {
  --brand: #0362B2;
  --brand-dark: #024a87;
  --brand-tint: #e8f1fa;
  --ink: #16232f;
  --muted: #5b6b7b;
  --border: #e2eaf2;
}

* { box-sizing: border-box; margin: 0; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
    background: radial-gradient(1200px 600px at 85% -10%, var(--brand-tint), #16232f), radial-gradient(900px 500px at -10% 110%, var(--brand-tint), transparent), #ffffff !important;
}

.panel {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 44px 40px 36px;
  box-shadow: 0 1px 2px rgba(16, 42, 67, .06), 0 16px 48px rgba(16, 42, 67, .12);
  text-align: center;
}

.logo { height: 52px; margin-bottom: 26px; }

h1 { font-size: 21px; font-weight: 650; margin-bottom: 6px; }

.sub { color: var(--muted); font-size: 14px; margin-bottom: 26px; }

form { text-align: left; }

label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin: 16px 0 6px;
}

input[type=text],
input[type=password] {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfdfe;
  transition: border-color .15s, box-shadow .15s;
}

input[type=text]:focus,
input[type=password]:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(3, 98, 178, .18);
  background: #fff;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 14px;
}

.check input { width: auto; }

button {
  width: 100%;
  margin-top: 24px;
  padding: 12px;
  font-size: 15.5px;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s, transform .05s;
}

button:hover { background: var(--brand-dark); }
button:active { transform: scale(.99); }

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px; }

/* Must out-specific the generic full-width button rules on this page.
   The generic `button` rule sets color:#fff; without resetting it here the
   eye SVG (stroke=currentColor) would render white/invisible on the input. */
button.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  margin: 0;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  color: var(--muted);
}

button.pw-toggle svg { display: block; stroke: #16232f !important; }
button.pw-toggle:hover, button.pw-toggle:active { background: none; transform: translateY(-50%); color: var(--brand); }

.alert {
  background: #fdf0f0;
  border: 1px solid #f2c4c4;
  color: #8d2f2f;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13.5px;
  text-align: left;
  margin-bottom: 4px;
}

.alert strong { display: block; margin-bottom: 2px; }

.foot { margin-top: 22px; font-size: 13.5px; color: var(--muted); }

.foot a { color: var(--brand); text-decoration: none; font-weight: 600; }

.foot a:hover { text-decoration: underline; }

h1 { text-wrap: balance; }

input::placeholder { color: var(--muted); opacity: 1; }

button:disabled { opacity: .65; cursor: not-allowed; }
button:disabled:hover { background: var(--brand); }

/* Visible keyboard focus (inputs already show a border + ring via :focus) */
a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(3, 98, 178, .35);
  outline-offset: 2px;
}

/* ── "First time using the Portal?" callout (top right) ──
   A speech bubble linking to /how-to.php with an animated arrow nudging
   toward it. Bump the twig's ?v= cache-buster when editing this block. */

.howto-hint {
  position: fixed;
  top: 24px;
  right: 28px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
}

.howto-arrow {
  width: 40px;
  height: 40px;
  flex: none;
  color: var(--brand-dark);
  animation: howto-nudge 1.1s ease-in-out infinite;
}

@keyframes howto-nudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(9px); }
}

.howto-callout {
  display: block;
  position: relative;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(3, 98, 178, .08), 0 14px 34px rgba(3, 98, 178, .16);
  transition: border-color .15s, transform .15s;
}

/* Speech-bubble tail (bottom left) */
.howto-callout::after {
  content: '';
  position: absolute;
  left: 18px;
  bottom: -7.5px;
  width: 13px;
  height: 13px;
  background: #fff;
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transform: rotate(-45deg);
}

.howto-callout:hover { border-color: var(--brand); transform: translateY(-1px); }
.howto-callout:hover .howto-callout-sub { text-decoration: underline; }

.howto-callout-title { display: block; font-weight: 700; font-size: 14px; color: var(--ink); }
.howto-callout-sub { display: block; font-size: 12.5px; font-weight: 600; color: var(--brand); margin-top: 2px; }

/* Small screens: the bubble sits above the sign-in card instead of floating */
@media (max-width: 720px) {
  body { flex-direction: column; }
  .howto-hint { position: static; margin-bottom: 18px; }
  .howto-arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
  .howto-arrow { animation: none; }
}
