/*
 * WRAPT Auth Service - Shared login UI styles
 * Adapted from disabled/wrapt_auth-service/assets/auth.css for the
 * new server-rendered auth service (member-login.php, admin-login.php).
 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand-primary:   #1565c0;
  --brand-dark:      #0d2a5e;
  --brand-light:     #eef2f8;
  --brand-border:    #b8cff0;
  --text-primary:    #0d2a5e;
  --text-secondary:  #3a4f6a;
  --text-muted:      #7a96b4;
  --text-faint:      #9ab0cc;
  --error-bg:        #fff0f0;
  --error-border:    #f5a0a0;
  --error-text:      #c62828;
  --success:         #2e7d32;
  --radius:          12px;
  --radius-sm:       8px;
  --shadow:          0 4px 24px rgba(13,42,94,.10);
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 16px;
  background: #f0f4fb;
  color: var(--text-primary);
}

/* Page layout */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  flex-direction: column;
}

/* Floating logo above the card */
.auth-logo-float {
  width: 100%;
  max-width: 420px;
  text-align: center;
  margin-bottom: 20px;
  padding: 0 20px;
}
.auth-logo-float img {
  width: 200px;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 2px 10px rgba(13,42,94,.25));
}

/* Card */
.auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Header */
.auth-header {
  background: var(--brand-primary);
  padding: 22px 28px 22px;
  text-align: center;
  color: #fff;
}
.auth-header h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .01em;
  margin-bottom: 4px;
}
.auth-header p {
  font-size: .85rem;
  opacity: .82;
}

/* Body */
.auth-body {
  padding: 28px 28px 20px;
}

/* Step heading + sub */
.step-heading { font-size: .95rem; font-weight: 700; color: var(--brand-dark); margin-bottom: 3px; }
.step-sub { font-size: .84rem; color: var(--text-secondary); margin-bottom: 18px; line-height: 1.55; }

/* Form elements */
label.field-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  display: block;
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1.5px solid #d0ddef;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: var(--text-primary);
  background: #fff;
  transition: border-color .15s;
  outline: none;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(21,101,192,.12);
}

input.otp-input {
  font-size: 1.6rem;
  letter-spacing: .3em;
  text-align: center;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* Primary / link buttons */
.btn-primary {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 13px;
  background: var(--brand-primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: background .15s;
}
.btn-primary:hover { background: #1255a8; }

.btn-link {
  display: inline-block;
  margin-top: 14px;
  padding: 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: .82rem;
  text-decoration: none;
  cursor: pointer;
}
.btn-link:hover { color: var(--brand-primary); text-decoration: underline; }

/* Channel selector (mode radio buttons styled as cards) */
.channel-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 6px;
}
.channel-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 16px;
  background: var(--brand-light);
  border: 1.5px solid var(--brand-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.channel-option:hover { border-color: var(--brand-primary); }
.channel-option:has(input:checked) {
  border-color: var(--brand-primary);
  background: #dde8f8;
}
.channel-option input[type="radio"] {
  width: auto;
  margin: 0;
  accent-color: var(--brand-primary);
}
.channel-icon { font-size: 1.15rem; line-height: 1; }
.channel-label { font-weight: 600; font-size: .92rem; color: var(--text-primary); }
.channel-text { display: flex; flex-direction: column; gap: 1px; }
.channel-detail { font-size: .78rem; color: var(--text-muted); }
.greeting { font-size: .9rem; color: var(--text-secondary); margin-bottom: 14px; }

/* Errors */
.auth-error {
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  border-radius: var(--radius-sm);
  color: var(--error-text);
  font-size: .85rem;
  line-height: 1.4;
}

/* Footer */
.auth-footer {
  padding: 14px 28px 18px;
  text-align: center;
  font-size: .73rem;
  color: var(--text-faint);
  border-top: 1px solid #edf1f7;
}
.auth-footer a {
  color: var(--text-faint);
  text-decoration: none;
}
.auth-footer a:hover { text-decoration: underline; }

@media (max-width: 460px) {
  .auth-header { padding: 18px 20px 18px; }
  .auth-body   { padding: 22px 20px 16px; }
  .auth-footer { padding: 12px 20px 16px; }
}
