/* ===================================================================
   Ocean Sun Theme — Auth Pages (Login, Register, Lost Password)
   =================================================================== */

/* ── Auth Box (centered card) ── */

.os-auth-box {
  max-width: 440px;
  margin: var(--os-space-8) auto;
  padding: var(--os-space-10) var(--os-space-8);
  background: var(--os-bg-white);
  border-radius: var(--os-radius-xl);
  box-shadow: var(--os-shadow-card);
  text-align: center;
}

.os-auth-box h1 {
  font-family: var(--os-font-display);
  font-size: var(--os-text-3xl);
  font-weight: var(--os-font-display-semibold);
  color: var(--os-text);
  margin: 0 0 var(--os-space-2);
}

.os-auth-subtitle {
  color: var(--os-text-muted);
  font-size: var(--os-text-sm);
  margin: 0 0 var(--os-space-8);
  line-height: var(--os-leading-normal);
}

/* ── Alert Boxes ── */

.os-alert {
  padding: var(--os-space-3) var(--os-space-4);
  border-radius: var(--os-radius-md);
  font-size: var(--os-text-sm);
  margin-bottom: var(--os-space-6);
  text-align: left;
  line-height: var(--os-leading-normal);
}

.os-alert a {
  font-weight: var(--os-font-body-semibold);
  text-decoration: underline;
}

.os-alert--error {
  background: var(--os-error-light);
  color: #991b1b;
  border-left: 3px solid var(--os-error);
}

.os-alert--error a {
  color: #991b1b;
}

.os-alert--success {
  background: var(--os-success-light);
  color: #065f46;
  border-left: 3px solid var(--os-success);
}

/* ── Form ── */

.os-auth-form {
  text-align: left;
}

.os-field {
  margin-bottom: var(--os-space-5);
}

.os-field label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: var(--os-text-sm);
  font-weight: var(--os-font-body-medium);
  color: var(--os-text);
  margin-bottom: var(--os-space-2);
}

.os-auth-forgot {
  font-size: var(--os-text-xs);
  color: var(--os-cta);
  text-decoration: none;
  font-weight: var(--os-font-body-normal);
}

.os-auth-forgot:hover {
  text-decoration: underline;
}

.os-field input[type="text"],
.os-field input[type="email"],
.os-field input[type="password"],
.os-field input[type="tel"] {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--os-font-body);
  font-size: var(--os-text-base);
  color: var(--os-text);
  background: var(--os-bg);
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius-md);
  transition: border-color var(--os-transition-fast), box-shadow var(--os-transition-fast);
  box-sizing: border-box;
}

.os-field input:focus {
  outline: none;
  border-color: var(--os-cta);
  box-shadow: 0 0 0 3px var(--os-cta-light);
}

.os-field input::placeholder {
  color: var(--os-text-muted);
}

/* Password toggle */
.os-field__password-wrap {
  position: relative;
}

.os-field__password-wrap input {
  padding-right: 48px;
}

.os-field__password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--os-text-muted);
  display: flex;
  align-items: center;
  transition: color var(--os-transition-fast);
}

.os-field__password-toggle:hover {
  color: var(--os-text);
}

/* Checkbox */
.os-field--checkbox {
  margin-bottom: var(--os-space-6);
}

.os-field--checkbox label {
  display: flex;
  align-items: center;
  gap: var(--os-space-2);
  font-size: var(--os-text-sm);
  color: var(--os-text-body);
  cursor: pointer;
  justify-content: flex-start;
}

.os-field--checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--os-cta);
}

/* ── Full-width button ── */

.os-btn--full {
  width: 100%;
  justify-content: center;
}

/* ── Divider ── */

.os-auth-divider {
  display: flex;
  align-items: center;
  gap: var(--os-space-4);
  margin: var(--os-space-6) 0;
}

.os-auth-divider::before,
.os-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--os-border);
}

.os-auth-divider span {
  font-size: var(--os-text-xs);
  color: var(--os-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* ── Turnstile CAPTCHA — center inside auth box ── */

.os-auth-form .osac-turnstile-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--os-space-5);
}

/* ── Social Login ── */

.os-auth-social {
  display: flex;
  justify-content: center;
}

/* ── Footer Link ── */

.os-auth-footer {
  margin-top: var(--os-space-6);
  font-size: var(--os-text-sm);
  color: var(--os-text-muted);
}

.os-auth-footer a {
  color: var(--os-cta);
  font-weight: var(--os-font-body-semibold);
  text-decoration: none;
}

.os-auth-footer a:hover {
  text-decoration: underline;
}

/* ── Header Login/Account Links ── */

.os-header__login {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  font-family: var(--os-font-body);
  font-size: var(--os-text-sm);
  font-weight: var(--os-font-body-semibold);
  color: var(--os-text-white);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--os-radius-full);
  text-decoration: none;
  transition: all var(--os-transition-fast);
}

.os-header__login:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--os-text-white);
}

.os-header__account {
  display: inline-flex;
  align-items: center;
  gap: var(--os-space-2);
  padding: 8px 16px;
  font-family: var(--os-font-body);
  font-size: var(--os-text-sm);
  font-weight: var(--os-font-body-medium);
  color: var(--os-text-white);
  text-decoration: none;
  transition: opacity var(--os-transition-fast);
}

.os-header__account:hover {
  opacity: 0.8;
  color: var(--os-text-white);
}

/* ── OSAC Registration Form Override ──
   Make OSAC plugin forms blend with theme styling. */

.os-auth-box .osac-register-wrap {
  max-width: none;
  margin: 0;
}

.os-auth-box .osac-card {
  padding: 0;
  box-shadow: none;
  background: transparent;
  border: none;
}

/* ── Responsive ── */

@media (max-width: 600px) {
  .os-auth-box {
    margin: var(--os-space-4) auto;
    padding: var(--os-space-6) var(--os-space-5);
    border-radius: var(--os-radius-lg);
  }

  .os-auth-box h1 {
    font-size: var(--os-text-2xl);
  }

  .os-header__account span {
    display: none;
  }
}
