/* ═══ auth.css — Auth modal, onboarding wizard, country dropdowns ═══ */

/* ── 6. Auth System ── */

.auth-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(45,62,74,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.auth-overlay.open {
  display: flex;
}

.auth-modal {
  background: var(--white);
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 24px 80px rgba(45,62,74,0.25);
  position: relative;
  animation: fadeInUp 0.3s ease;
  margin: auto 0;
  flex-shrink: 0;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform;
  overflow-y: visible;
}

.auth-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
}

.auth-close:hover {
  color: var(--ink);
}

.auth-title {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.auth-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.auth-field {
  margin-bottom: 16px;
}

.auth-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.auth-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--pale);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--ink);
  transition: border-color 0.2s;
}

.auth-field input:focus,
.auth-field select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(93,173,226,0.1);
}

.auth-field select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--pale);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--white);
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B8BA4' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0 4px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}

.auth-checkbox input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--blue);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.auth-pw-wrap {
  position: relative;
}

.auth-pw-wrap input {
  padding-right: 42px;
}

.auth-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 1.1rem;
  padding: 2px;
  line-height: 1;
}

.auth-eye:hover {
  color: var(--ink);
}

.auth-pw-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}

.auth-pw-hint.invalid {
  color: var(--error);
}

.auth-pw-hint.valid {
  color: var(--green);
}

.auth-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-btn);
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 0;
}

.auth-google-btn:hover {
  background: var(--frost);
  border-color: var(--blue);
  box-shadow: 0 2px 12px rgba(30,58,95,0.08);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}

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

.auth-divider span {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.auth-submit {
  width: 100%;
  padding: 13px;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: var(--radius-btn);
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}

.auth-submit:hover {
  box-shadow: 0 4px 20px rgba(93,173,226,0.3);
  transform: translateY(-1px);
}

.auth-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.auth-toggle {
  text-align: center;
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--muted);
}

.auth-toggle a {
  color: var(--blue);
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
}

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

.auth-error {
  background: var(--error-light);
  color: var(--error-dark);
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: none;
}

.auth-success {
  background: var(--success-light);
  color: var(--success-dark);
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: none;
}

/* ── 7. Onboarding Wizard ── */

.onboarding-wizard {
  max-width: 420px;
}

.onboarding-progress {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
}

.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pale);
  transition: all 0.3s;
}

.onboarding-dot.active {
  background: var(--blue);
  transform: scale(1.25);
}

.onboarding-dot.done {
  background: var(--sky);
}

.onboarding-step {
  animation: obFadeIn 0.25s ease;
}

.ob-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.ob-chips .ob-chip {
  background: var(--frost);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-btn);
  padding: 10px 18px;
  font-size: 0.88rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s;
  font-family: inherit;
  color: var(--ink);
}

.ob-chips .ob-chip:hover {
  background: rgba(93,173,226,0.08);
  border-color: var(--sky);
  transform: translateY(-1px);
}

.ob-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ob-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--frost);
  border: 1.5px solid var(--gray-200);
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  text-align: left;
  transition: all 0.15s;
}

.ob-card:hover {
  background: rgba(93,173,226,0.08);
  border-color: var(--sky);
  transform: translateY(-1px);
}

.ob-card-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.ob-card-label {
  font-weight: 500;
}

.ob-month-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
}

.ob-month-input:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(133,199,242,0.15);
}

.ob-multi-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.ob-chip-toggle {
  background: var(--frost);
  border: 2px solid var(--pale);
  border-radius: var(--radius-btn);
  padding: 10px 18px;
  font-size: 0.88rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s;
  font-family: inherit;
  color: var(--ink);
}

.ob-chip-toggle:hover {
  border-color: var(--sky);
}

.ob-chip-toggle.selected {
  background: rgba(93,173,226,0.1);
  border-color: var(--blue);
  color: var(--blue);
}

.ob-back {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0 0 8px;
  font-family: inherit;
  transition: color 0.15s;
}

.ob-back:hover {
  color: var(--blue);
}

/* ── 8. Country Dropdowns & Profile Skip ── */

.ob-country-dropdown,
.pm-country-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
  margin-top: 4px;
  box-shadow: 0 8px 24px rgba(30,58,95,0.12);
  display: none;
}

.ob-country-dropdown.open,
.pm-country-dropdown.open {
  display: block;
}

.ob-country-dropdown button,
.pm-country-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border: none;
  background: none;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.1s;
}

.ob-country-dropdown button:hover,
.pm-country-dropdown button:hover {
  background: var(--frost);
}

.ob-country-dropdown button:first-child {
  border-radius: 10px 10px 0 0;
}

.ob-country-dropdown button:last-child,
.pm-country-dropdown button:last-child {
  border-radius: 0 0 10px 10px;
}

.profile-skip {
  text-align: center;
  margin-top: 16px;
  font-size: 0.88rem;
}

.profile-skip a {
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
}

.profile-skip a:hover {
  color: var(--blue);
  text-decoration: underline;
}

