/**
 * SGOC Directory — Frontend styles for Member Sign In & Registration.
 * Namespaced under .sgoc-fe (shares design tokens, .pg-header, .pg-wrap
 * and .form-label with frontend.css, which is enqueued alongside this
 * file). Adds the auth-card, OTP, password-strength, and step-tracker
 * components used by the [sgoc_login] and [sgoc_register] shortcodes.
 */

.sgoc-fe .pg-wrap-narrow {
  max-width: 480px;
}

/* ── Card shell (shared by login + register) ── */
.sgoc-fe .auth-card {
  background: var(--sgoc-paper);
  border: 1px solid var(--sgoc-border);
  border-radius: 12px;
  box-shadow: 0 2px 20px rgba(92,21,25,0.10);
  overflow: hidden;
}
.sgoc-fe .auth-card-head {
  background: var(--sgoc-parch);
  border-bottom: 1px solid var(--sgoc-border);
  padding: 1.25rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.sgoc-fe .auth-card-icon {
  width: 32px; height: 32px;
  background: var(--sgoc-wine);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sgoc-fe .auth-card-icon svg { width: 15px; height: 15px; fill: var(--sgoc-amber); }
.sgoc-fe .auth-card-head-text h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--sgoc-wine);
  margin: 0;
  letter-spacing: 0.02em;
}
.sgoc-fe .auth-card-head-text p {
  font-size: 0.75rem;
  color: var(--sgoc-muted);
  margin: 0.1rem 0 0;
  font-weight: 300;
}
.sgoc-fe .auth-card-body { padding: 1.75rem 1.75rem 1.5rem; }
.sgoc-fe .auth-card-foot { padding: 0.75rem 1.75rem 1.5rem; text-align: center; }
.sgoc-fe .auth-card-foot p { font-size: 0.8rem; color: var(--sgoc-muted); margin: 0; }
.sgoc-fe .auth-card-foot p + p { margin-top: 0.3rem; }
.sgoc-fe .auth-card-foot a { color: var(--sgoc-wine); font-weight: 500; text-decoration: none; }
.sgoc-fe .auth-card-foot a:hover { color: var(--sgoc-amber); text-decoration: underline; }

.sgoc-fe .auth-field { margin-bottom: 0.9rem; }

/* ── Inputs ── */
.sgoc-fe .input-wrap { position: relative; }
.sgoc-fe .input-wrap .input-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  fill: var(--sgoc-muted);
  opacity: 0.6;
  pointer-events: none;
}
.sgoc-fe .form-control {
  border: 1px solid var(--sgoc-border);
  border-radius: var(--sgoc-radius);
  background: #fff;
  color: var(--sgoc-ink);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  padding: 0.6rem 0.85rem 0.6rem 2.5rem;
  width: 100%;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.sgoc-fe .form-control:focus {
  border-color: var(--sgoc-amber);
  box-shadow: 0 0 0 3px rgba(196,131,42,0.15);
  outline: none;
}
.sgoc-fe .form-control::placeholder { color: #C5B8A8; }
.sgoc-fe .form-control.has-toggle { padding-right: 2.6rem; }

.sgoc-fe .toggle-pw {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  background: none; border: none; padding: 0;
  cursor: pointer; display: flex; align-items: center;
  opacity: 0.45; transition: opacity 0.15s;
}
.sgoc-fe .toggle-pw:hover { opacity: 0.8; }
.sgoc-fe .toggle-pw svg { width: 17px; height: 17px; fill: var(--sgoc-muted); }

/* ── Misc rows ── */
.sgoc-fe .auth-row-end { text-align: right; margin: 0.25rem 0 1.1rem; }
.sgoc-fe .forgot-link { font-size: 0.8rem; color: var(--sgoc-wine); text-decoration: none; font-weight: 500; }
.sgoc-fe .forgot-link:hover { color: var(--sgoc-amber); text-decoration: underline; }

.sgoc-fe .wine-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--sgoc-amber), transparent);
  border: none;
  margin: 1.5rem 0 0;
  opacity: 0.35;
}

/* ── Submit buttons ── */
.sgoc-fe .btn-auth-submit {
  background: var(--sgoc-wine);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  border: none;
  border-radius: var(--sgoc-radius);
  padding: 0.75rem 1rem;
  width: 100%;
  cursor: pointer;
  transition: background 0.18s, transform 0.1s;
}
.sgoc-fe .btn-auth-submit:hover { background: var(--sgoc-wine-d); transform: translateY(-1px); }
.sgoc-fe .btn-auth-submit:active { transform: translateY(0); }
.sgoc-fe .btn-auth-submit:disabled { opacity: 0.6; cursor: default; transform: none; }

/* ── Alerts ── */
.sgoc-fe .auth-alert {
  display: none;
  font-size: 0.83rem;
  padding: 0.65rem 0.9rem;
  border-radius: var(--sgoc-radius);
  margin-bottom: 1.1rem;
  border: 1px solid transparent;
}
.sgoc-fe .auth-alert.error   { display: block; background: #fdf1f1; border-color: #e8b4b4; color: #7a1a1a; }
.sgoc-fe .auth-alert.success { display: block; background: #f1faf4; border-color: #a3d9b4; color: #1a5c30; }

/* ── Forgot-password modal ── */
.sgoc-fe .fp-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(43,26,27,0.45);
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
}
.sgoc-fe .fp-overlay.open { opacity: 1; pointer-events: all; }
.sgoc-fe .fp-modal {
  background: var(--sgoc-paper);
  border-radius: 12px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(92,21,25,0.18);
  overflow: hidden;
  transform: translateY(-12px);
  transition: transform 0.2s ease;
}
.sgoc-fe .fp-overlay.open .fp-modal { transform: translateY(0); }
.sgoc-fe .fp-head {
  background: var(--sgoc-parch);
  border-bottom: 1px solid var(--sgoc-border);
  padding: 1rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.sgoc-fe .fp-head h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--sgoc-wine);
  margin: 0;
}
.sgoc-fe .fp-close {
  background: none; border: none;
  font-size: 1.2rem; line-height: 1;
  color: var(--sgoc-muted); cursor: pointer;
  padding: 0; opacity: 0.6; transition: opacity 0.15s;
}
.sgoc-fe .fp-close:hover { opacity: 1; }
.sgoc-fe .fp-body { padding: 1.5rem; }
.sgoc-fe .fp-body p { font-size: 0.85rem; color: var(--sgoc-muted); margin: 0 0 1rem; }
.sgoc-fe .fp-foot { padding: 0 1.5rem 1.5rem; }

/* ── Step tracker (register flow) ── */
.sgoc-fe .step-track {
  display: flex;
  align-items: center;
  padding: 1.4rem 1.75rem 0;
}
.sgoc-fe .step-node { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; flex-shrink: 0; }
.sgoc-fe .step-bubble {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--sgoc-border);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--sgoc-muted);
  transition: all 0.25s ease;
}
.sgoc-fe .step-bubble.active { background: var(--sgoc-wine); border-color: var(--sgoc-wine); color: #fff; }
.sgoc-fe .step-bubble.done   { background: var(--sgoc-amber); border-color: var(--sgoc-amber); color: #fff; }
.sgoc-fe .step-label {
  font-size: 0.62rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sgoc-muted);
  white-space: nowrap;
  transition: color 0.25s;
}
.sgoc-fe .step-label.active { color: var(--sgoc-wine); }
.sgoc-fe .step-label.done   { color: var(--sgoc-amber); }
.sgoc-fe .step-line {
  flex: 1; height: 2px;
  background: var(--sgoc-border);
  margin: 0 0.4rem 1.25rem;
  transition: background 0.25s;
}
.sgoc-fe .step-line.done { background: var(--sgoc-amber); }

.sgoc-fe .step-panel { display: none; }
.sgoc-fe .step-panel.active { display: block; }
.sgoc-fe .step-intro { margin-bottom: 1.1rem; }
.sgoc-fe .step-intro h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--sgoc-wine);
  margin: 0 0 0.2rem;
}
.sgoc-fe .step-intro p { font-size: 0.83rem; color: var(--sgoc-muted); margin: 0; }

/* ── OTP boxes ── */
.sgoc-fe .otp-row { display: flex; gap: 0.5rem; justify-content: center; margin: 1rem 0 0.5rem; }
.sgoc-fe .otp-digit {
  width: 44px; height: 52px;
  border: 1.5px solid var(--sgoc-border);
  border-radius: var(--sgoc-radius);
  background: #fff;
  text-align: center;
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--sgoc-ink);
  caret-color: var(--sgoc-amber);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.sgoc-fe .otp-digit:focus {
  border-color: var(--sgoc-amber);
  box-shadow: 0 0 0 3px rgba(196,131,42,0.15);
  outline: none;
}
.sgoc-fe .otp-digit.filled { border-color: var(--sgoc-wine-l); }

.sgoc-fe .resend-row { text-align: center; font-size: 0.8rem; color: var(--sgoc-muted); margin-bottom: 0.25rem; }
.sgoc-fe .resend-btn {
  background: none; border: none; padding: 0;
  font-family: inherit; font-size: inherit;
  color: var(--sgoc-wine); font-weight: 500;
  cursor: pointer; transition: color 0.15s;
}
.sgoc-fe .resend-btn:hover { color: var(--sgoc-amber); text-decoration: underline; }
.sgoc-fe .resend-btn:disabled { color: var(--sgoc-muted); cursor: default; text-decoration: none; }

/* ── Password strength ── */
.sgoc-fe .pw-strength-wrap { margin-top: 0.5rem; }
.sgoc-fe .pw-strength-bar { height: 4px; border-radius: 2px; background: var(--sgoc-border); overflow: hidden; margin-bottom: 0.25rem; }
.sgoc-fe .pw-strength-fill { height: 100%; width: 0%; border-radius: 2px; transition: width 0.25s, background 0.25s; }
.sgoc-fe .pw-strength-label { font-size: 0.72rem; color: var(--sgoc-muted); font-weight: 500; }

/* ── Back link ── */
.sgoc-fe .back-link {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.8rem; color: var(--sgoc-muted); text-decoration: none;
  margin-top: 1rem; font-weight: 500; transition: color 0.15s;
  cursor: pointer; background: none; border: none; padding: 0;
  font-family: inherit;
}
.sgoc-fe .back-link:hover { color: var(--sgoc-wine); }
.sgoc-fe .back-link svg { width: 14px; height: 14px; fill: currentColor; }

/* ── Success panel ── */
.sgoc-fe .success-panel { text-align: center; padding: 1rem 0 0.5rem; }
.sgoc-fe .success-icon {
  width: 56px; height: 56px;
  background: #f1faf4;
  border: 2px solid #a3d9b4;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
}
.sgoc-fe .success-icon svg { width: 26px; height: 26px; fill: #1a5c30; }
.sgoc-fe .success-panel h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--sgoc-wine);
  margin: 0 0 0.4rem;
}
.sgoc-fe .success-panel p { font-size: 0.85rem; color: var(--sgoc-muted); margin: 0 0 1.4rem; }
.sgoc-fe .success-panel .btn-auth-submit { display: inline-block; text-decoration: none; text-align: center; }

@media (max-width: 480px) {
  .sgoc-fe .otp-digit { width: 38px; height: 46px; font-size: 1.15rem; }
  .sgoc-fe .otp-row { gap: 0.4rem; }
  .sgoc-fe .step-label { display: none; }
}
