/* =========================================================
   GiftFlow Auth UI
   CSS-only presentation layer for existing custom auth forms.
   Consolidated from assets/css/gf-auth.css (Phase 13D)
========================================================= */

:root {
  --gf-auth-bg: #f7f3ff;
  --gf-auth-surface: rgba(255, 255, 255, 0.9);
  --gf-auth-surface-strong: #ffffff;
  --gf-auth-ink: #17122f;
  --gf-auth-muted: #67617f;
  --gf-auth-soft: #8a82a4;
  --gf-auth-primary: #7b4dff;
  --gf-auth-primary-dark: #6336ef;
  --gf-auth-primary-soft: rgba(123, 77, 255, 0.12);
  --gf-auth-border: rgba(88, 63, 150, 0.16);
  --gf-auth-focus: rgba(123, 77, 255, 0.16);
  --gf-auth-success: #15803d;
  --gf-auth-success-bg: #ecfdf3;
  --gf-auth-error: #b42318;
  --gf-auth-error-bg: #fff1f0;
  --gf-auth-info: #4338ca;
  --gf-auth-info-bg: #eef2ff;
  --gf-auth-shadow: 0 28px 90px rgba(47, 31, 96, 0.14);
  --gf-auth-card-shadow: 0 24px 70px rgba(31, 26, 61, 0.12);
}

body.page-template-gf-login,
body.page-template-templategf-login-php {
  background: var(--gf-auth-bg);
}

body.page-template-gf-login .site,
body.page-template-gf-login .site-content,
body.page-template-gf-login .ast-container,
body.page-template-gf-login .content-area,
body.page-template-gf-login .entry-content,
body.page-template-templategf-login-php .site,
body.page-template-templategf-login-php .site-content,
body.page-template-templategf-login-php .ast-container,
body.page-template-templategf-login-php .content-area,
body.page-template-templategf-login-php .entry-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
}

.gf-entry-page,
.gf-auth-page {
  min-height: 100vh;
  color: var(--gf-auth-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 11% 9%, rgba(123, 77, 255, 0.18), transparent 26%),
    radial-gradient(circle at 92% 90%, rgba(255, 244, 235, 0.92), transparent 34%),
    linear-gradient(135deg, #f8f4ff 0%, #fbfbff 48%, #fff8f2 100%);
}

.gf-entry-hero,
.gf-auth-page {
  min-height: 100vh;
  padding: 22px;
  display: grid;
  align-items: stretch;
}

.gf-entry-wrap,
.gf-auth-shell {
  width: 100%;
  max-width: 1380px;
  min-height: calc(100vh - 44px);
  margin: 0 auto;
}

.gf-entry-grid,
.gf-auth-shell {
  display: grid;
  grid-template-columns: minmax(420px, 0.92fr) minmax(480px, 1.08fr);
  gap: 0;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: var(--gf-auth-shadow);
  backdrop-filter: blur(16px);
}

.gf-entry-copy,
.gf-auth-story {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(44px, 6vw, 78px);
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 18%, rgba(124, 58, 237, 0.16), transparent 30%),
    linear-gradient(145deg, rgba(243, 235, 255, 0.92), rgba(255, 255, 255, 0.54));
}

.gf-entry-copy::before,
.gf-auth-story::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 72% 72%, rgba(123, 77, 255, 0.14), transparent 28%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.28), transparent);
}

.gf-entry-copy::after,
.gf-auth-story::after {
  content: "";
  position: absolute;
  right: -108px;
  bottom: -118px;
  width: 310px;
  height: 310px;
  border: 1px dashed rgba(116, 56, 245, 0.28);
  border-radius: 50%;
  pointer-events: none;
}

.gf-entry-brand,
.gf-entry-kicker,
.gf-entry-title,
.gf-entry-sub,
.gf-entry-points {
  position: relative;
  z-index: 1;
}

.gf-entry-brand {
  margin-bottom: clamp(30px, 5vw, 56px);
}

.gf-entry-brand__icon {
  width: 176px;
  height: auto;
  display: block;
}

.gf-entry-kicker {
  margin: 0 0 18px;
  color: var(--gf-auth-primary);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.gf-entry-title {
  max-width: 560px;
  margin: 0 0 20px;
  color: #111328;
  font-size: clamp(40px, 4.5vw, 62px);
  line-height: 1.07;
  font-weight: 850;
  letter-spacing: 0;
}

.gf-entry-sub {
  max-width: 490px;
  margin: 0 0 38px;
  color: #4d5266;
  font-size: 17px;
  line-height: 1.7;
}

.gf-entry-points {
  display: grid;
  gap: 14px;
  max-width: 430px;
}

.gf-entry-point {
  width: fit-content;
  max-width: 100%;
  padding: 12px 18px;
  border: 1px solid rgba(123, 77, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: #3d365c;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(75, 52, 130, 0.06);
}

.gf-entry-auth,
.gf-auth-panel {
  min-width: 0;
  display: grid;
  place-items: center;
  padding: clamp(34px, 6vw, 72px);
}

.gf-entry-card,
.gf-auth-card {
  width: min(100%, 560px);
  max-width: 560px;
  padding: clamp(30px, 4.8vw, 54px);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.88));
  box-shadow: var(--gf-auth-card-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(18px);
}

.gf-entry-card__head,
.gf-auth-card__head {
  margin-bottom: 28px;
}

.gf-entry-card__head h2,
.gf-auth-card__head h2 {
  margin: 0 0 8px;
  color: #111328;
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1.08;
  font-weight: 850;
  letter-spacing: 0;
}

.gf-entry-card__head p,
.gf-auth-card__head p {
  margin: 0;
  color: #5f6476;
  font-size: 15px;
  line-height: 1.5;
}

.gf-entry-social,
.gf-auth-socials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 26px;
}

.gf-entry-social:empty,
.gf-auth-socials:empty {
  display: none;
}

.gf-entry-social .nsl-container,
.gf-entry-social .nsl-container-buttons,
.gf-entry-social .nsl-button,
.gf-auth-socials .nsl-container,
.gf-auth-socials .nsl-container-buttons,
.gf-auth-socials .nsl-button {
  width: 100%;
}

.gf-entry-social .nsl-button,
.gf-auth-socials .nsl-button {
  min-height: 46px;
  border-radius: 10px;
  border: 1px solid #dfe3ec;
  background: #fff;
  box-shadow: 0 3px 10px rgba(25, 28, 45, 0.04);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.gf-entry-social .nsl-button:hover,
.gf-auth-socials .nsl-button:hover {
  transform: translateY(-1px);
  border-color: rgba(123, 77, 255, 0.28);
  box-shadow: 0 10px 22px rgba(25, 28, 45, 0.07);
}

.gf-entry-divider,
.gf-auth-divider {
  position: relative;
  margin: 28px 0 24px;
  text-align: center;
}

.gf-entry-divider::before,
.gf-auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #dfe3ec;
}

.gf-entry-divider span,
.gf-auth-divider span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.94);
  color: #6d7283;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0;
}

.gf-auth-view {
  display: none;
}

.gf-auth-view.is-active {
  display: block;
  animation: gfAuthViewIn 220ms ease both;
}

@keyframes gfAuthViewIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gf-auth-form {
  display: grid;
  gap: 16px;
}

.gf-auth-field {
  position: relative;
  display: grid;
  gap: 8px;
  margin: 0;
}

.gf-auth-field span,
.gf-auth-form label {
  color: #17192d;
  font-size: 12.5px;
  line-height: 1.3;
  font-weight: 760;
}

.gf-auth-input,
.gf-auth-form input[type="text"],
.gf-auth-form input[type="email"],
.gf-auth-form input[type="password"] {
  width: 100%;
  min-height: 52px;
  border: 1px solid #d8deea;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  color: #111328;
  font-size: 15px;
  padding: 0 16px;
  box-shadow: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.gf-auth-input:focus,
.gf-auth-form input[type="text"]:focus,
.gf-auth-form input[type="email"]:focus,
.gf-auth-form input[type="password"]:focus {
  outline: none;
  border-color: rgba(116, 56, 245, 0.58);
  background: #fff;
  box-shadow: 0 0 0 4px var(--gf-auth-focus);
}

.gf-auth-input.is-error {
  border-color: rgba(180, 35, 24, 0.58);
  background: #fffafa;
}

.gf-auth-input.is-success {
  border-color: rgba(21, 128, 61, 0.52);
  background: #fbfffc;
}

.gf-auth-password-wrap,
.gf-auth-field:has(.gf-password-toggle) {
  position: relative;
}

.gf-password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #697086;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 0.18s ease, background-color 0.18s ease, opacity 0.18s ease;
}

.gf-password-toggle:hover,
.gf-password-toggle:focus {
  background: rgba(17, 19, 40, 0.05);
  color: var(--gf-auth-primary);
  outline: none;
}

.gf-auth-field .gf-password-toggle + input,
.gf-auth-password-wrap input,
.gf-auth-field input[type="password"] {
  padding-right: 50px;
}

.gf-auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #4f5568;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
}

.gf-auth-check input {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  accent-color: var(--gf-auth-primary);
}

.gf-auth-btn,
.gf-btn-secondary {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, opacity 0.18s ease;
}

.gf-auth-btn {
  margin-top: 4px;
  background: linear-gradient(135deg, var(--gf-auth-primary), var(--gf-auth-primary-dark));
  color: #fff;
  box-shadow: 0 14px 30px rgba(116, 56, 245, 0.28);
}

.gf-auth-btn:hover {
  transform: translateY(-1px);
  filter: saturate(1.04);
  box-shadow: 0 18px 38px rgba(116, 56, 245, 0.33);
}

.gf-auth-btn:active {
  transform: translateY(0);
}

.gf-auth-btn:disabled,
.gf-auth-btn.is-disabled,
.gf-auth-btn.is-loading {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.gf-btn-secondary {
  background: var(--gf-auth-primary-soft);
  color: var(--gf-auth-primary-dark);
}

.gf-btn-secondary:hover {
  background: rgba(123, 77, 255, 0.18);
}

#gf-2fa-use-backup,
#gf-2fa-use-totp {
  text-align: center;
  font-size: 13.5px;
}

#gf-2fa-use-backup a,
#gf-2fa-use-totp a {
  color: var(--gf-auth-primary);
  font-weight: 760;
  text-decoration: none;
}

#gf-2fa-use-backup a:hover,
#gf-2fa-use-totp a:hover {
  color: #552bd4;
}

.gf-entry-footer,
.gf-auth-footer {
  margin-top: 26px;
  text-align: center;
  color: #626879;
  font-size: 15px;
}

.gf-entry-footer p,
.gf-auth-footer p {
  margin: 0;
}

.gf-entry-footer a,
.gf-auth-footer a,
#gf-forgot-password,
#gf-resend-link {
  color: var(--gf-auth-primary);
  font-weight: 760;
  text-decoration: none;
}

.gf-entry-footer a:hover,
.gf-auth-footer a:hover,
#gf-forgot-password:hover,
#gf-resend-link:hover {
  color: #552bd4;
}

#gf-forgot-password {
  display: block;
  margin-top: 16px;
  text-align: right;
  font-size: 13px;
}

.gf-auth-message,
.gf-verify-message {
  display: none;
  padding: 13px 15px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.45;
}

.gf-auth-message.is-error,
.gf-auth-message--error,
.gf-verify-message.is-error {
  display: block;
  border: 1px solid rgba(180, 35, 24, 0.16);
  background: var(--gf-auth-error-bg);
  color: var(--gf-auth-error);
}

.gf-auth-message.is-success,
.gf-auth-message--success,
.gf-verify-message.is-success {
  display: block;
  border: 1px solid rgba(21, 128, 61, 0.16);
  background: var(--gf-auth-success-bg);
  color: var(--gf-auth-success);
}

.gf-auth-message.is-info,
.gf-verify-message.is-info {
  display: block;
  border: 1px solid rgba(67, 56, 202, 0.14);
  background: var(--gf-auth-info-bg);
  color: var(--gf-auth-info);
}

.gf-password-requirements {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin: -4px 0 0;
  padding: 0;
  list-style: none;
}

.gf-password-requirements li {
  position: relative;
  min-height: 18px;
  padding-left: 22px;
  color: #8a849c;
  font-size: 12.5px;
  line-height: 1.35;
  transition: color 0.18s ease;
}

.gf-password-requirements li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 14px;
  height: 14px;
  border: 1px solid #cfc8df;
  border-radius: 999px;
  background: #fff;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.gf-password-requirements li.is-met {
  color: var(--gf-auth-success);
}

.gf-password-requirements li.is-met::before {
  border-color: var(--gf-auth-success);
  background: var(--gf-auth-success);
}

.gf-password-requirements li.is-met::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 5px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.gf-email-feedback,
.gf-password-feedback,
#gf-register-over18-feedback,
.gf-password-strength,
.gf-password-match {
  min-height: 16px;
  margin-top: -8px;
  color: var(--gf-auth-soft);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  transition: color 0.18s ease;
}

.gf-email-feedback:not(:empty),
.gf-password-feedback:not(:empty),
#gf-register-over18-feedback:not(:empty),
.gf-password-strength:not(:empty),
.gf-password-match:not(:empty) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
}

.gf-email-feedback.error,
.gf-password-feedback.error,
#gf-register-over18-feedback.error,
.gf-password-match.error,
.gf-password-strength.weak,
.gf-password-feedback.weak {
  background: var(--gf-auth-error-bg);
  color: var(--gf-auth-error);
}

.gf-email-feedback.success,
.gf-password-feedback.success,
.gf-password-match.success,
.gf-password-strength.strong,
.gf-password-feedback.strong {
  background: var(--gf-auth-success-bg);
  color: var(--gf-auth-success);
}

.gf-password-strength.medium,
.gf-password-feedback.medium {
  background: #fff6e8;
  color: #b76e00;
}

.gf-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #fff;
  border-radius: 999px;
  vertical-align: -2px;
  animation: gfAuthSpin 700ms linear infinite;
}

@keyframes gfAuthSpin {
  to {
    transform: rotate(360deg);
  }
}

.gf-verify-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  font-size: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gf-auth-primary-soft), rgba(123, 77, 255, 0.22));
  box-shadow: 0 10px 26px rgba(123, 77, 255, 0.22);
}

.gf-verify-wrap {
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.gf-verify-card {
  width: min(100%, 430px);
  padding: 36px;
  border: 1px solid var(--gf-auth-border);
  border-radius: 22px;
  background: var(--gf-auth-surface-strong);
  text-align: center;
  box-shadow: var(--gf-auth-card-shadow);
}

.gf-verify-logo {
  width: 58px;
  margin-bottom: 18px;
}

.gf-verify-card h1 {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.15;
}

.gf-verify-card p,
.gf-verify-sub {
  color: var(--gf-auth-muted);
}

.gf-progress-bar {
  width: 100%;
  height: 6px;
  margin: 20px 0;
  overflow: hidden;
  border-radius: 999px;
  background: #ece8f7;
}

.gf-progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gf-auth-primary), var(--gf-auth-primary-dark));
  transition: width 0.1s linear;
}

@media (max-width: 980px) {
  .gf-entry-hero,
  .gf-auth-page {
    padding: 16px;
    align-items: start;
  }

  .gf-entry-grid,
  .gf-auth-shell {
    min-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    border-radius: 18px;
  }

  .gf-entry-auth,
  .gf-auth-panel {
    order: 1;
    width: 100%;
    min-height: auto;
    padding: 28px 18px;
    place-items: start center;
  }

  .gf-entry-copy,
  .gf-auth-story {
    order: 2;
    width: 100%;
    min-height: auto;
    padding: 28px 22px;
  }

  .gf-entry-card,
  .gf-auth-card {
    width: min(100%, 560px);
    padding: 30px 24px;
  }

  .gf-entry-brand {
    margin-bottom: 20px;
  }

  .gf-entry-brand__icon {
    width: 142px;
  }

  .gf-entry-title {
    font-size: clamp(30px, 7vw, 42px);
  }

  .gf-entry-sub {
    margin-bottom: 22px;
    font-size: 15px;
  }

  .gf-entry-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
}

@media (max-width: 640px) {
  .gf-entry-page,
  .gf-auth-page {
    background: #fbfaff;
  }

  .gf-entry-hero,
  .gf-auth-page {
    padding: 0;
  }

  .gf-entry-grid,
  .gf-auth-shell {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .gf-entry-auth,
  .gf-auth-panel {
    padding: 18px 12px 28px;
  }

  .gf-entry-card,
  .gf-auth-card {
    padding: 24px 18px;
    border-radius: 18px;
    box-shadow: none;
  }

  .gf-entry-card__head,
  .gf-auth-card__head {
    margin-bottom: 22px;
  }

  .gf-entry-card__head h2,
  .gf-auth-card__head h2 {
    font-size: 28px;
  }

  .gf-entry-social,
  .gf-auth-socials {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 22px;
  }

  .gf-entry-divider,
  .gf-auth-divider {
    margin: 22px 0 20px;
  }

  .gf-auth-form {
    gap: 14px;
  }

  .gf-auth-input,
  .gf-auth-form input[type="text"],
  .gf-auth-form input[type="email"],
  .gf-auth-form input[type="password"] {
    min-height: 48px;
    font-size: 14px;
  }

  .gf-auth-btn,
  .gf-btn-secondary {
    min-height: 50px;
  }

  .gf-password-requirements {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .gf-entry-copy,
  .gf-auth-story {
    display: flex;
    order: 2;
    padding: 28px 22px;
    min-height: auto;
    width: 100%;
    background: transparent;
  }

  .gf-entry-copy::after,
  .gf-auth-story::after {
    display: none;
  }
}
