/*
 * Yachay — assets/css/yachay-auth.css
 * Estilos de registro y onboarding
 */

/* ── Base ── */
body.ya-auth-page {
  background: var(--ya-bg, #000);
  color: var(--ya-text, #F5F5F7);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 24px 16px 48px;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── Screen wrapper ── */
.ya-auth-screen {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: ya-fade-up 0.4s ease both;
}

.ya-auth-screen--onboarding { max-width: 460px; }

/* ── Brand ── */
.ya-auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.ya-auth-brand__logo {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  object-fit: cover;
}

.ya-auth-brand__initials {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  background: var(--ya-accent, #F5A623);
  color: var(--ya-btn-text, #000);
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ya-auth-brand__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ya-text, #F5F5F7);
  margin: 0;
}

.ya-auth-brand__community {
  font-size: 13px;
  color: rgba(245,245,247,0.55);
  margin: 0;
}

/* ── Card ── */
.ya-auth-card {
  width: 100%;
  background: #FFFFFF;
  color: #1D1D1F;
  border-radius: 20px;
  padding: 28px 24px 24px;
}

.ya-auth-card--wide { max-width: 100%; }

.ya-auth-card__title {
  font-size: 20px;
  font-weight: 700;
  color: #1D1D1F;
  text-align: center;
  margin: 0 0 4px;
}

.ya-auth-card__sub {
  font-size: 13px;
  color: rgba(29,29,31,0.5);
  text-align: center;
  margin: 0 0 20px;
}

/* ── Errors ── */
.ya-auth-errors {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

.ya-auth-errors p {
  font-size: 12px;
  color: #B91C1C;
  margin: 0;
  line-height: 1.5;
}

/* ── Google button ── */
.ya-auth-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: #1D1D1F;
  background: white;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.ya-auth-google-btn:hover { background: #F5F5F7; color: #1D1D1F; }
.ya-auth-google-btn:active { transform: scale(0.98); }

/* ── Divider ── */
.ya-auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: rgba(0,0,0,0.25);
  font-size: 12px;
}

.ya-auth-divider::before,
.ya-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0,0,0,0.08);
}

/* ── Form ── */
.ya-auth-form { display: flex; flex-direction: column; gap: 14px; }

.ya-auth-field { display: flex; flex-direction: column; gap: 5px; }

.ya-auth-field__label {
  font-size: 12px;
  font-weight: 600;
  color: #1D1D1F;
}

.ya-auth-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: 11px;
  font-size: 15px;
  color: #1D1D1F;
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  font-family: inherit;
  -webkit-appearance: none;
}

.ya-auth-input:focus {
  border-color: var(--ya-accent, #F5A623);
  box-shadow: 0 0 0 3px rgba(245,166,35,0.15);
}

.ya-auth-input::placeholder { color: rgba(0,0,0,0.28); }

/* ── Password toggle ── */
.ya-auth-input-wrap {
  position: relative;
}

.ya-auth-input-wrap .ya-auth-input {
  padding-right: 44px;
}

.ya-auth-toggle-pw {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  cursor: pointer;
  color: rgba(0,0,0,0.35);
  padding: 4px;
  display: flex;
  align-items: center;
}

.ya-auth-toggle-pw:hover { color: #1D1D1F; }

/* ── Submit button ── */
.ya-auth-submit {
  width: 100%;
  padding: 14px;
  background: var(--ya-accent, #F5A623);
  color: var(--ya-btn-text, #000);
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
  -webkit-tap-highlight-color: transparent;
}

.ya-auth-submit:hover  { opacity: 0.9; }
.ya-auth-submit:active { transform: scale(0.98); }

.ya-auth-submit__arrow { font-size: 16px; }

/* ── Footer links ── */
.ya-auth-footer-text {
  text-align: center;
  font-size: 13px;
  color: rgba(29,29,31,0.5);
  margin-top: 14px;
}

.ya-auth-footer-text a {
  color: #1D1D1F;
  font-weight: 600;
  text-decoration: none;
}

/* ── Legal ── */
.ya-auth-legal {
  font-size: 11px;
  color: rgba(245,245,247,0.3);
  text-align: center;
  line-height: 1.5;
}

.ya-auth-legal a {
  color: rgba(245,245,247,0.45);
  text-decoration: underline;
}

/* ════════════════════════════════════════════════════════════
   ONBOARDING
   ════════════════════════════════════════════════════════════ */

/* ── Progress bar ── */
.ya-onb-progress {
  height: 3px;
  background: rgba(0,0,0,0.07);
  border-radius: 2px;
  margin-bottom: 22px;
  overflow: hidden;
}

.ya-onb-progress__fill {
  height: 100%;
  background: var(--ya-accent, #F5A623);
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* ── Question ── */
.ya-onb-question { margin-bottom: 22px; }

.ya-onb-question__text {
  font-size: 14px;
  font-weight: 600;
  color: #1D1D1F;
  margin: 0 0 12px;
  line-height: 1.4;
}

.ya-onb-required {
  color: #EF4444;
  margin-left: 2px;
}

/* ── Radio options ── */
.ya-onb-options { display: flex; flex-direction: column; gap: 8px; }

.ya-onb-option { cursor: pointer; display: block; }

.ya-onb-option__radio { position: absolute; opacity: 0; width: 0; height: 0; }

.ya-onb-option__box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: 11px;
  transition: border-color 0.15s, background 0.15s;
  font-size: 13px;
  color: #1D1D1F;
  line-height: 1.4;
}

.ya-onb-option:hover .ya-onb-option__box { border-color: var(--ya-accent, #F5A623); }

.ya-onb-option__radio:checked + .ya-onb-option__box {
  border-color: var(--ya-accent, #F5A623);
  background: rgba(245,166,35,0.06);
}

.ya-onb-option__dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.18);
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ya-onb-option__radio:checked + .ya-onb-option__box .ya-onb-option__dot {
  border-color: var(--ya-accent, #F5A623);
  background: var(--ya-accent, #F5A623);
}

.ya-onb-option__radio:checked + .ya-onb-option__box .ya-onb-option__dot::after {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ya-btn-text, #000);
}

/* ── Select ── */
.ya-onb-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* ════════════════════════════════════════════════════════════
   PHONE FIELD CON BANDERA
   ════════════════════════════════════════════════════════════ */
.ya-phone-field {
  position: relative;
  display: flex;
  gap: 0;
  align-items: stretch;
}

.ya-phone-country {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  border: 1.5px solid rgba(0,0,0,0.1);
  border-right: none;
  border-radius: 11px 0 0 11px;
  background: white;
  cursor: pointer;
  font-size: 14px;
  color: #1D1D1F;
  white-space: nowrap;
  transition: border-color 0.15s;
  flex-shrink: 0;
  min-height: 48px;
}

.ya-phone-country:focus { outline: none; }

.ya-phone-country__flag { font-size: 18px; line-height: 1; }
.ya-phone-country__code { font-size: 13px; font-weight: 600; }

.ya-phone-input {
  border-radius: 0 11px 11px 0 !important;
  flex: 1;
}

/* ── Country Dropdown ── */
.ya-country-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 280px;
  max-height: 300px;
  background: white;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  z-index: 100;
  overflow: hidden;
  display: none;
  flex-direction: column;
}

.ya-country-dropdown.is-open {
  display: flex;
}

.ya-country-search-wrap {
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.ya-country-search {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
}

.ya-country-search:focus { border-color: var(--ya-accent, #F5A623); }

.ya-country-list {
  overflow-y: auto;
  flex: 1;
  padding: 6px 0;
}

.ya-country-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  font-size: 13px;
  color: #1D1D1F;
  transition: background 0.1s;
}

.ya-country-item:hover { background: rgba(0,0,0,0.04); }
.ya-country-item.is-selected { background: rgba(245,166,35,0.07); }

.ya-country-item__flag { font-size: 18px; flex-shrink: 0; }
.ya-country-item__name { flex: 1; }
.ya-country-item__code { font-size: 12px; color: rgba(0,0,0,0.4); }

/* ── Skip link ── */
.ya-onb-skip {
  display: block;
  text-align: center;
  font-size: 12px;
  color: rgba(29,29,31,0.4);
  margin-top: 12px;
  text-decoration: none;
  transition: color 0.15s;
}

.ya-onb-skip:hover { color: rgba(29,29,31,0.7); }

/* ── Empty state ── */
.ya-onb-empty {
  text-align: center;
  padding: 24px;
  font-size: 13px;
  color: rgba(29,29,31,0.55);
}

.ya-onb-empty a {
  display: inline-block;
  margin-top: 8px;
  font-weight: 600;
  color: #1D1D1F;
}

/* ── Animación ── */
@keyframes ya-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════════════════════════
   PÁGINA DE MEMBRESÍA — Fase 3
   ════════════════════════════════════════════════════════════ */

.ya-auth-screen--membership { max-width: 440px; }
.ya-mem-card { padding: 24px 22px 22px; }

/* ── Planes ── */
.ya-mem-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }

.ya-mem-plan {
  position: relative;
  display: block;
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.ya-mem-plan--featured { border-color: var(--ya-accent, #E8842A); background: rgba(232,132,42,0.03); }
.ya-mem-plan--selected { border-color: var(--ya-accent, #E8842A) !important; background: rgba(232,132,42,0.06) !important; }
.ya-mem-plan:hover:not(.ya-mem-plan--disabled) { border-color: rgba(232,132,42,0.5); }
.ya-mem-plan--disabled { opacity: 0.5; cursor: default; }

.ya-mem-plan__radio { position: absolute; opacity: 0; width: 0; height: 0; }

.ya-mem-plan__badge {
  position: absolute;
  top: -10px; right: 10px;
  background: #22C55E;
  color: white;
  font-size: 10px; font-weight: 700;
  padding: 3px 9px;
  border-radius: 10px;
  white-space: nowrap;
}

.ya-mem-plan__inner { display: flex; flex-direction: column; gap: 5px; }

.ya-mem-plan__top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }

.ya-mem-plan__dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.15);
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
  display: flex; align-items: center; justify-content: center;
}

.ya-mem-plan--selected .ya-mem-plan__dot,
.ya-mem-plan--featured .ya-mem-plan__dot {
  border-color: var(--ya-accent, #E8842A);
  background: var(--ya-accent, #E8842A);
}

.ya-mem-plan--selected .ya-mem-plan__dot::after,
.ya-mem-plan--featured .ya-mem-plan__dot::after {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: white;
}

.ya-mem-plan__name { font-size: 13px; font-weight: 600; color: #1D1D1F; }

.ya-mem-plan__price {
  display: flex; align-items: baseline; gap: 2px; margin-bottom: 1px;
}

.ya-mem-plan__price strong { font-size: 20px; font-weight: 700; color: #1D1D1F; }
.ya-mem-plan__price span { font-size: 11px; color: rgba(29,29,31,0.5); }

.ya-mem-plan__billed { font-size: 10px; color: rgba(29,29,31,0.4); margin: 0; }

/* ── CTA ── */
.ya-mem-cta { margin-top: 4px; text-decoration: none; display: flex; }

/* ── Métodos de pago ── */
.ya-mem-payment-methods {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin-top: 12px;
  font-size: 11px; color: rgba(29,29,31,0.4);
}

.ya-mem-stripe-badge, .ya-mem-cards {
  display: flex; align-items: center;
  opacity: 0.55;
}

/* ── Aviso WooCommerce ── */
.ya-mem-notice {
  background: #FEF3C7; border: 1px solid #FCD34D; border-radius: 11px;
  padding: 14px 16px; margin-bottom: 16px; font-size: 13px; color: #92400E;
}
.ya-mem-notice strong { display: block; margin-bottom: 4px; }
.ya-mem-notice p { margin: 0 0 8px; line-height: 1.5; }
.ya-mem-notice__link { color: #92400E; font-weight: 600; text-decoration: underline; }
