/* identity.css — VoterConnect Identity / Account scaffolding.
 * Wraps every /Account/* page with a centred frosted card on a Steel-Indigo
 * gradient backdrop and restyles the Bootstrap-classed forms (.form-floating,
 * .form-control, .btn-primary, …) so we don't have to rewrite every Razor.
 *
 * The Razor pages that opt in add a <div class="vc-id"> wrapper. Pages that
 * haven't been touched still benefit from the global class overrides below. */

/* ========== Full-page shell ========== */
.vc-id {
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow: auto;
  background:
    radial-gradient(60% 60% at 50% 0%,
      color-mix(in srgb, var(--vc-primary) 24%, transparent), transparent 70%),
    radial-gradient(40% 40% at 80% 30%,
      color-mix(in srgb, var(--vc-accent) 18%, transparent), transparent 70%),
    var(--vc-bg-base);
}

/* ========== Card wrapper ========== */
.vc-id__card {
  width: 100%;
  max-width: 420px;
  background: var(--vc-bg-glass);
  border: 1px solid var(--vc-border);
  border-radius: 20px;
  padding: 36px 28px 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), 0 0 80px rgba(99,102,241,.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
}
.vc-id__card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--vc-primary), var(--vc-accent), var(--vc-primary));
  background-size: 200% auto;
  animation: vc-id-shine 3s linear infinite;
}
@keyframes vc-id-shine { to { background-position: 200% center; } }
.vc-id__brand {
  display: block;
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(120deg, var(--vc-primary), var(--vc-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 6px;
  text-decoration: none;
}
.vc-id__sub {
  text-align: center;
  font-size: 14px;
  color: var(--vc-text-muted);
  margin: 0 0 28px;
}
.vc-id__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--vc-text-high);
  margin: 0 0 4px;
}
.vc-id__lead {
  font-size: 14px;
  color: var(--vc-text-muted);
  margin: 0 0 18px;
}

/* ========== Form controls (Bootstrap class overrides) ==========
 * Labels sit ABOVE the input as a clean uppercase caption — avoids the
 * messy "notched border" look that the original floating-label CSS
 * produced when the label background couldn't fully mask the input's
 * top border on a translucent card. */
.vc-id .form-floating { position: relative; margin-bottom: 18px; }
.vc-id .form-floating > .form-label,
.vc-id .form-floating > label {
  position: static;
  display: block;
  margin: 0 0 6px 2px;
  padding: 0;
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--vc-text-muted);
  pointer-events: none;
}
.vc-id .form-control,
.vc-id input.form-control,
.vc-id input[type="email"].form-control,
.vc-id input[type="password"].form-control,
.vc-id input[type="text"].form-control,
.vc-id input[type="tel"].form-control,
.vc-id select.form-select,
.vc-id textarea.form-control {
  width: 100%;
  padding: 14px 14px;
  background: var(--vc-bg-surface);
  border: 1px solid var(--vc-border);
  border-radius: 12px;
  color: var(--vc-text-high);
  font: inherit;
  font-size: 15px;
  line-height: 1.4;
  transition: border-color 120ms ease, box-shadow 120ms ease;
  height: auto;
  min-height: 50px;
  box-shadow: none;
}
.vc-id .form-control:focus,
.vc-id .form-select:focus {
  outline: none;
  border-color: var(--vc-primary);
  box-shadow: 0 0 0 3px var(--vc-primary-soft);
  background: var(--vc-bg-surface);
  color: var(--vc-text-high);
}
.vc-id .form-control::placeholder { color: transparent; }   /* labels live above */

/* Checkbox row */
.vc-id .checkbox,
.vc-id .form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 16px;
  font-size: 13px;
  color: var(--vc-text-muted);
}
.vc-id .form-check-input,
.vc-id input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--vc-primary);
  margin: 0;
}
.vc-id .form-check-label,
.vc-id label.form-label { color: var(--vc-text-muted); font-size: 13px; }

/* ========== Buttons ========== */
.vc-id .btn,
.vc-id button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 18px;
  border-radius: var(--vc-radius);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: filter 120ms ease, transform 120ms ease;
}
.vc-id .btn-primary,
.vc-id .btn-lg.btn-primary,
.vc-id button.btn-primary,
.vc-id button[type="submit"].btn-primary {
  background: linear-gradient(120deg, var(--vc-primary), var(--vc-accent));
  color: #fff;
  height: 52px;
  font-size: 16px;
  border-radius: 14px;
  margin-top: 8px;
  box-shadow: 0 4px 20px color-mix(in srgb, var(--vc-primary) 35%, transparent);
}
.vc-id .btn-primary:hover { filter: brightness(1.12); transform: translateY(-1px); box-shadow: 0 6px 28px color-mix(in srgb, var(--vc-primary) 45%, transparent); }
.vc-id .btn-primary:active { transform: translateY(1px); }
.vc-id .btn-link {
  background: transparent;
  color: var(--vc-primary);
  height: auto;
  padding: 6px 0;
  font-weight: 500;
}
.vc-id .btn-link:hover { color: var(--vc-accent); text-decoration: underline; }
.vc-id .w-100 { width: 100%; }

/* ========== Validation messages ========== */
.vc-id .text-danger,
.vc-id .validation-message,
.vc-id [role="alert"] {
  display: block;
  color: var(--vc-danger);
  font-size: 12.5px;
  margin: 4px 0 0;
  line-height: 1.4;
}
.vc-id .validation-summary-errors {
  background: color-mix(in srgb, var(--vc-danger) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--vc-danger) 30%, transparent);
  border-radius: var(--vc-radius);
  padding: 10px 12px;
  margin-bottom: 14px;
}
.vc-id .validation-summary-errors li { list-style: none; }
.vc-id .validation-summary-valid { display: none; }

/* StatusMessage component (info / success / error) */
.vc-id .alert,
.vc-id .alert-success,
.vc-id .alert-danger,
.vc-id .alert-info,
.vc-id .status-message {
  border-radius: var(--vc-radius);
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 13.5px;
}
.vc-id .alert-success,
.vc-id .alert-success * {
  background: color-mix(in srgb, var(--vc-success) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--vc-success) 30%, transparent);
  color: var(--vc-success);
}
.vc-id .alert-danger {
  background: color-mix(in srgb, var(--vc-danger) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--vc-danger) 30%, transparent);
  color: var(--vc-danger);
}

/* ========== Misc layout in cards ========== */
.vc-id hr {
  border: 0;
  border-top: 1px solid var(--vc-border);
  margin: 16px 0;
}
.vc-id h1, .vc-id h2, .vc-id h3 {
  color: var(--vc-text-high);
  font-weight: 700;
}
.vc-id h1 { font-size: 22px; margin: 0 0 12px; }
.vc-id h2 { font-size: 16px; margin: 16px 0 10px; }
.vc-id h3 { font-size: 14px; margin: 12px 0 8px; }
.vc-id p { color: var(--vc-text-muted); font-size: 13.5px; margin: 0 0 12px; line-height: 1.55; }
.vc-id a { color: var(--vc-primary); text-decoration: none; }
.vc-id a:hover { color: var(--vc-accent); text-decoration: underline; }

/* Row + column collapse — Identity scaffolds use .row .col-lg-6 / col-lg-4
 * to put external-login picker beside the form. On our card layout we stack
 * vertically so the form gets the full width. */
.vc-id .row { display: block; }
.vc-id .col-lg-6,
.vc-id .col-lg-4,
.vc-id .col-lg-offset-2 { width: 100%; padding: 0; margin: 0; }

/* Footer links inline (instead of <p> stack) */
.vc-id__links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 20px;
  font-size: 15px;
  text-align: center;
}
.vc-id__links a { color: var(--vc-text-muted); }
.vc-id__links a:hover { color: var(--vc-primary); }
.vc-id__links strong a { color: var(--vc-primary); font-weight: 600; }

/* Divider between password + passkey + external providers */
.vc-id__or {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--vc-text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 20px 0;
}
.vc-id__or::before,
.vc-id__or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--vc-border);
}

/* ========== External OAuth provider buttons — 3-col card row ========== */
.vc-id__providers {
  display: flex;
  gap: 8px;
}
.vc-id__provider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  padding: 12px 6px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--vc-border);
  background: var(--vc-bg-surface);
  color: var(--vc-text-high);
  text-decoration: none;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}
.vc-id__provider:hover { transform: translateY(-2px); }
.vc-id__provider--google:hover    { border-color: #ea4335; background: rgba(234,67,53,.08); }
.vc-id__provider--microsoft:hover { border-color: #0078d4; background: rgba(0,120,212,.08); }
.vc-id__provider--facebook:hover  { border-color: #1877f2; background: rgba(24,119,242,.08); }
.vc-id__provider--apple:hover     { border-color: #888; background: rgba(255,255,255,.06); }
.vc-id__provider-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  flex-shrink: 0;
}

/* Provider-specific brand colours on the icon tile */
.vc-id__provider--google    .vc-id__provider-icon { background: #ea4335; }
.vc-id__provider--microsoft .vc-id__provider-icon { background: #0078d4; }
.vc-id__provider--facebook  .vc-id__provider-icon { background: #1877f2; }
.vc-id__provider--apple     .vc-id__provider-icon { background: #000; }
