/* auth-sheet.css — premium auth BOTTOM SHEET shown when a guest taps "Cuenta".
   Ported 1:1 from the Claude Design bundle (account-sheet.jsx / login-redesign.jsx).
   Markup is injected once by js/auth-sheet.js. Shared by index.html + shop-products.html.
   Fonts (Raleway / Open Sans) + brand green (#81C408) are already loaded by both pages. */

#authSheet {
  --auth-green: #81C408;
  --auth-green-deep: #6CA50A;
  --auth-green-700: #4d7c0f;
  --auth-ink: #1f2a24;
  --auth-ink-soft: #7b8a82;
  --auth-accent: #6CA50A;            /* CTA fill (design default) */
  --auth-head: 'Raleway', 'Open Sans', sans-serif;
  --auth-body: 'Open Sans', sans-serif;
}

/* ───────── overlay ───────── */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 10070;                    /* above mobile nav (10050) + avatar sheet (10060) */
  background: rgba(20, 28, 22, .46);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .24s ease, visibility 0s linear .24s;
}
.auth-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .24s ease;
}

/* hide scrollbars inside the sheet */
.auth-no-sb { scrollbar-width: none; -ms-overflow-style: none; }
.auth-no-sb::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* ───────── sheet ───────── */
.auth-sheet {
  position: relative;
  background: #fff;
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
  max-height: 94%;
  overflow-y: auto;
  box-shadow: 0 -14px 44px rgba(0, 0, 0, .26);
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateY(100%);
  transition: transform .42s cubic-bezier(.2, .85, .25, 1);
  touch-action: pan-y;
}
/* class-based open state (not a fill:both keyframe) so the inline transform set
   during drag-to-dismiss can override it */
.auth-overlay.open .auth-sheet { transform: translateY(0); }

.auth-pad { padding: 4px 24px 28px; }

/* swap-in animation when switching providers <-> email */
.auth-view.auth-swap { animation: authSwapIn .34s cubic-bezier(.2, .85, .25, 1); }
@keyframes authSwapIn { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: translateX(0); } }

/* ───────── handle + close ───────── */
.auth-handle-wrap { display: flex; justify-content: center; padding-top: 12px; }
.auth-handle { width: 44px; height: 5px; border-radius: 3px; background: #E2E7DC; }

.auth-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 18px; border: none; cursor: pointer;
  background: #F2F4EF; display: flex; align-items: center; justify-content: center;
  padding: 0; z-index: 3;
}

/* ───────── providers view: brand ───────── */
.auth-brand { display: flex; align-items: center; gap: 13px; margin-top: 8px; }
.auth-brand-logo {
  width: 52px; height: 52px; border-radius: 14px; display: block; flex-shrink: 0;
  object-fit: cover; box-shadow: 0 8px 16px rgba(60, 90, 30, .18);
}
.auth-brand-title {
  margin: 0; font-family: var(--auth-head); font-weight: 800; font-size: 23px;
  letter-spacing: -.02em; color: var(--auth-ink);
}
.auth-brand-sub {
  margin: 3px 0 0; font-family: var(--auth-body); font-size: 13.5px; color: var(--auth-ink-soft);
}

/* ───────── provider buttons (social-first) ───────── */
.auth-providers { display: flex; flex-direction: column; gap: 11px; margin-top: 22px; }
.auth-prov {
  position: relative; width: 100%; height: 58px; border-radius: 17px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-family: var(--auth-head); font-weight: 700; font-size: 16.5px; letter-spacing: -.01em;
  border: 1.5px solid transparent; background: none;
  transition: transform .14s ease, box-shadow .2s ease, background .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.auth-prov:active { transform: scale(.978); }
.auth-prov .auth-ic { position: absolute; left: 20px; display: flex; align-items: center; }
.auth-prov--light {
  background: #fff; color: var(--auth-ink); border-color: #E7E9E4;
  box-shadow: 0 1px 2px rgba(31, 42, 36, .05), 0 8px 22px -12px rgba(31, 42, 36, .28);
}
.auth-prov--dark {
  background: #101411; color: #fff; border-color: #101411;
  box-shadow: 0 8px 22px -10px rgba(0, 0, 0, .55);
}
.auth-prov--ghost { background: #F4F6F1; color: var(--auth-ink); }

/* ───────── more options ───────── */
.auth-more-toggle {
  width: 100%; margin-top: 14px; padding: 8px 0; border: none; background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-family: var(--auth-head); font-weight: 700; font-size: 15px; color: #56635b;
}
.auth-more-toggle .auth-chev { transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.auth-more-toggle.is-open .auth-chev { transform: rotate(180deg); }

.auth-more {
  display: grid; grid-template-rows: 0fr; opacity: 0;
  transition: grid-template-rows .4s cubic-bezier(.2, .85, .25, 1), opacity .3s ease;
}
.auth-more.is-open { grid-template-rows: 1fr; opacity: 1; }
.auth-more > .auth-more-clip { overflow: hidden; }
.auth-more-inner { display: flex; flex-direction: column; gap: 11px; padding-top: 3px; padding-bottom: 2px; }

/* ───────── legal ───────── */
.auth-legal {
  margin: 18px 0 0; text-align: center; font-family: var(--auth-body);
  font-size: 12px; line-height: 1.55; color: #9aa6a0;
}
.auth-legal a { color: var(--auth-green-700); font-weight: 600; text-decoration: none; }

/* ───────── email view ───────── */
.auth-email-head { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.auth-back {
  width: 40px; height: 40px; border-radius: 20px; border: 1.5px solid #EAEDE5; background: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; flex-shrink: 0;
}
.auth-email-title {
  margin: 0; font-family: var(--auth-head); font-weight: 800; font-size: 22px;
  letter-spacing: -.02em; color: var(--auth-ink);
}
.auth-email-sub { margin: 2px 0 0; font-family: var(--auth-body); font-size: 13px; color: var(--auth-ink-soft); }

/* segmented login / register */
.auth-seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 5px; background: #EFF2EB;
  padding: 5px; border-radius: 14px; margin-top: 18px;
}
.auth-seg-btn {
  height: 40px; border-radius: 10px; border: none; cursor: pointer; background: transparent; color: #7c887e;
  font-family: var(--auth-head); font-weight: 700; font-size: 14px; transition: all .18s ease;
}
.auth-seg-btn.is-on { background: #fff; color: var(--auth-ink); box-shadow: 0 3px 9px rgba(31, 42, 36, .12); }

/* fields */
.auth-fields { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.auth-field-label {
  font-family: var(--auth-head); font-weight: 700; font-size: 12.5px; letter-spacing: .04em;
  text-transform: uppercase; color: #9aa6a0; margin-bottom: 8px; padding-left: 2px;
}
.auth-field-box {
  position: relative; display: flex; align-items: center; height: 56px;
  background: #F6F8F3; border: 1.5px solid #EAEDE5; border-radius: 15px; padding: 0 16px; gap: 11px;
}
.auth-ic-inline { display: flex; align-items: center; flex-shrink: 0; }
.auth-field-box input {
  flex: 1; border: none; outline: none; background: transparent;
  font-family: var(--auth-body); font-size: 16px; color: var(--auth-ink); font-weight: 500; min-width: 0;
}
.auth-eye { border: none; background: transparent; cursor: pointer; padding: 4px; display: flex; }

/* remember + forgot */
.auth-row-between { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; }
.auth-remember { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.auth-remember input { width: 20px; height: 20px; border-radius: 6px; accent-color: var(--auth-green-deep); margin: 0; }
.auth-remember span { font-family: var(--auth-body); font-size: 13.5px; color: var(--auth-ink-soft); font-weight: 600; }
.auth-forgot {
  border: none; background: transparent; cursor: pointer; font-family: var(--auth-head);
  font-weight: 700; font-size: 13px; color: var(--auth-green-700);
}

/* terms consent (register) */
.auth-terms { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; cursor: pointer; }
.auth-terms input { width: 20px; height: 20px; border-radius: 6px; accent-color: var(--auth-green-deep); margin: 2px 0 0; flex-shrink: 0; }
.auth-terms span { font-family: var(--auth-body); font-size: 13px; line-height: 1.5; color: var(--auth-ink-soft); }
.auth-terms a { color: var(--auth-green-700); font-weight: 600; text-decoration: none; }
.auth-terms.is-error input { outline: 2px solid #dc3545; outline-offset: 2px; }
.auth-terms.is-error span { color: #dc3545; }

/* primary CTA */
.auth-cta {
  width: 100%; height: 56px; margin-top: 18px; border-radius: 16px; border: none; cursor: pointer;
  background: var(--auth-accent); color: #fff; box-shadow: 0 14px 30px -10px rgba(108, 165, 10, .67);
  font-family: var(--auth-head); font-weight: 800; font-size: 16.5px;
}
.auth-cta:disabled { opacity: .6; cursor: default; }

/* divider */
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 20px 0 16px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: #E6EADF; }
.auth-divider span { font-family: var(--auth-body); font-size: 12.5px; color: #a6b0a7; font-weight: 600; }

/* social row */
.auth-social-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.auth-social {
  height: 52px; border-radius: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  gap: 9px; font-family: var(--auth-head); font-weight: 700; font-size: 14.5px;
}
.auth-social--dark { border: 1.5px solid #101411; background: #101411; color: #fff; }
.auth-social--light { border: 1.5px solid #E7E9E4; background: #fff; color: var(--auth-ink); }

/* status line (errors / progress) */
.auth-status { margin: 14px 2px 0; font-family: var(--auth-body); font-size: 13.5px; text-align: center; color: #dc3545; }
