/* ═══════════════════════════════════════════════════════════
   WP Auth Shortcodes — v1.2 Clean flat style
   ═══════════════════════════════════════════════════════════ */

/* ── Design tokens ─────────────────────────────────────────── */
:root {
  --wpas-bg:           #f8f8f6;
  --wpas-surface:      #ffffff;
  --wpas-border-b:     rgba(0, 0, 0, 0.18);
  --wpas-border-hover: #1a1a1a;
  --wpas-border-focus: #1a1a1a;
  --wpas-text:         #1a1a1a;
  --wpas-text-muted:   #6b6b6b;
  --wpas-text-faint:   #b0b0b0;
  --wpas-primary:      #1a1a1a;
  --wpas-primary-h:    #333333;
  --wpas-error:        #b91c1c;
  --wpas-error-bg:     #fef2f2;
  --wpas-success:      #15803d;
  --wpas-success-bg:   #f0fdf4;
  --wpas-info-bg:      #f0f9ff;
  --wpas-info:         #0369a1;
  --wpas-transition:   160ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Strength colors */
  --wpas-str-1: #ef4444;
  --wpas-str-2: #f97316;
  --wpas-str-3: #eab308;
  --wpas-str-4: #22c55e;
  --wpas-str-5: #16a34a;
}

/* ── Wrapper ────────────────────────────────────────────────── */
.wpas-wrap {
  display: flex;
  justify-content: center;
  padding: 32px 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

/* Card : flat, white, no shadow, no border, no radius */
.wpas-card {
  background: #ffffff !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 36px 32px;
  width: 100%;
  max-width: 550px;
}

@media (max-width: 580px) {
  .wpas-card {
    padding: 24px 20px;
  }
}

/* ── Typography ─────────────────────────────────────────────── */
.wpas-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--wpas-text);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
  text-align: center;
}

.wpas-subtitle {
  font-size: 15px;
  color: var(--wpas-text-muted);
  margin: 0 0 28px;
  line-height: 1.5;
  text-align: center;
}

/* ── Notices ────────────────────────────────────────────────── */
.wpas-notice {
  font-size: 14px;
  border-radius: 0;
  padding: 10px 14px;
  margin-bottom: 20px;
  line-height: 1.45;
}
.wpas-notice--error   { background: var(--wpas-error-bg);   color: var(--wpas-error);   font-weight: 500; }
.wpas-notice--success { background: var(--wpas-success-bg); color: var(--wpas-success); }
.wpas-notice--info    { background: var(--wpas-info-bg);    color: var(--wpas-info); }

/* ── Form ───────────────────────────────────────────────────── */
.wpas-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.wpas-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 460px) {
  .wpas-row { grid-template-columns: 1fr; }
}

.wpas-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wpas-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--wpas-text);
  letter-spacing: 0.005em;
}

.wpas-req {
  color: var(--wpas-error);
  margin-left: 1px;
}

/* ── Inputs — underline only, white bg, no top/side border ──── */
.wpas-input {
  width: 100% !important;
  height: 42px !important;
  padding: 0 38px 0 2px !important;
  font-size: 15px !important;
  color: var(--wpas-text) !important;
  background: #ffffff !important;
  border: none !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  border-bottom: 1px solid var(--wpas-border-b) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  transition: border-color var(--wpas-transition) !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.wpas-input::placeholder {
  color: var(--wpas-text-faint) !important;
}

.wpas-input:hover {
  border-bottom-color: var(--wpas-border-hover) !important;
  box-shadow: none !important;
  outline: none !important;
}

.wpas-input:focus,
.wpas-input:focus-visible {
  border-bottom-color: var(--wpas-border-focus) !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Datepicker — same underline style */
.wpas-input.wpas-datepicker {
  cursor: pointer !important;
  padding-right: 38px !important;
}


/* ── Input + icon wrapper ───────────────────────────────────── */
.wpas-input-icon {
  position: relative;
}
.wpas-input-icon .wpas-input {
  padding-right: 38px !important;
}

/* Calendar icon */
.wpas-icon-field {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  fill: transparent !important;
  stroke: #1a1a1a !important;
  stroke-width: 1px !important;
}

/* ── Password toggle ────────────────────────────────────────── */
.wpas-pw-toggle {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  border-radius: 0 !important;
  transition: opacity var(--wpas-transition);
  opacity: 0.4;
}
.wpas-pw-toggle:hover { opacity: 1; }
.wpas-pw-toggle:focus-visible {
  outline: 2px solid var(--wpas-primary);
  outline-offset: 2px;
}

.wpas-eye-open,
.wpas-eye-closed {
  stroke: #1a1a1a !important;
  stroke-width: 1px !important;
  fill: transparent !important;
}

/* ── Password strength bar ──────────────────────────────────── */
.wpas-strength-bar {
  height: 2px;
  background: rgba(0, 0, 0, 0.07);
  border-radius: 0;
  overflow: hidden;
  margin-top: 6px;
}

.wpas-strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 0;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.wpas-strength-fill[data-score="1"] { width: 20%;  background: var(--wpas-str-1); }
.wpas-strength-fill[data-score="2"] { width: 40%;  background: var(--wpas-str-2); }
.wpas-strength-fill[data-score="3"] { width: 65%;  background: var(--wpas-str-3); }
.wpas-strength-fill[data-score="4"] { width: 85%;  background: var(--wpas-str-4); }
.wpas-strength-fill[data-score="5"] { width: 100%; background: var(--wpas-str-5); }

.wpas-strength-label {
  font-size: 12px;
  color: var(--wpas-text-muted);
  margin-top: 3px;
  display: block;
  min-height: 14px;
}

/* ── Password match msg ─────────────────────────────────────── */
.wpas-pw-match-msg {
  font-size: 12px;
  display: block;
  min-height: 14px;
  margin-top: 2px;
}
.wpas-pw-match-msg.ok  { color: var(--wpas-success); }
.wpas-pw-match-msg.err { color: var(--wpas-error); }

/* ── Checkbox ───────────────────────────────────────────────── */
.wpas-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--wpas-text-muted);
  cursor: pointer;
  user-select: none;
}
.wpas-check-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--wpas-primary);
  cursor: pointer;
}

/* ── reCAPTCHA ──────────────────────────────────────────────── */
.wpas-recaptcha {
  margin-top: 4px;
}

/* ── Button — flat, 50px, square ───────────────────────────── */
.wpas-btn {
  display: block;
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 0;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background var(--wpas-transition),
    opacity var(--wpas-transition),
    transform var(--wpas-transition);
  letter-spacing: 0.01em;
  margin-top: 8px;
}

.wpas-btn--primary {
  background: var(--wpas-primary);
  color: #ffffff;
}
.wpas-btn--primary:hover  { background: var(--wpas-primary-h); }
.wpas-btn--primary:active { transform: translateY(1px); }
.wpas-btn--primary:focus-visible {
  outline: 2px solid var(--wpas-primary);
  outline-offset: 3px;
}

/* ── Form footer / links ────────────────────────────────────── */
.wpas-form-footer {
  text-align: center;
  font-size: 14px;
  color: var(--wpas-text-muted);
  margin-top: 10px;
}
.wpas-form-footer a {
  color: var(--wpas-text);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(0, 0, 0, 0.14);
  transition: border-color var(--wpas-transition);
}
.wpas-form-footer a:hover { border-color: var(--wpas-text); }

.wpas-form-links {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.wpas-form-links a {
  font-size: 14px;
  color: var(--wpas-text-muted);
  text-decoration: none;
  transition: color var(--wpas-transition);
}
.wpas-form-links a:hover { color: var(--wpas-text); }

/* ── Native date input ──────────────────────────────────────── */
.wpas-input--date {
  cursor: pointer !important;
  padding-right: 2px !important;
}

/* Suppress default calendar icon on WebKit so our underline style is preserved */
.wpas-input--date::-webkit-calendar-picker-indicator {
  opacity: 0.4;
  cursor: pointer;
  filter: none;
}
.wpas-input--date::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}
