/* ============================================================
   ORISIRISI ECOSYSTEM: Auth Modal Styles
   Shared across all 3 sites.
   ============================================================ */

body.no-scroll { overflow: hidden; }

/* ── Modal overlay ──────────────────────────────────────────── */
.auth-modal {
  position: fixed; inset: 0; z-index: 99990;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 1.5rem 1rem;
  overflow-y: auto;
}
.auth-modal[hidden] { display: none; }

.auth-modal__backdrop {
  position: fixed; inset: 0;
  background: rgba(12, 5, 0, 0.65);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

/* ── Card ───────────────────────────────────────────────────── */
.auth-modal__card {
  position: relative; z-index: 1;
  background: #FFFFFF;
  border-radius: 24px;
  padding: 0 0 2rem;
  width: 100%; max-width: 460px;
  margin: auto;
  box-shadow:
    0 2px 4px rgba(15,6,0,.04),
    0 8px 24px rgba(15,6,0,.10),
    0 32px 80px rgba(15,6,0,.22);
  animation: authCardIn .3s cubic-bezier(.22,.61,.36,1) both;
  overflow: hidden;
}

@keyframes authCardIn {
  from { opacity: 0; transform: translateY(28px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

/* Orange gradient accent stripe at top */
.auth-modal__card::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, #F7941D 0%, #e8a030 35%, #D4A017 65%, #F7941D 100%);
}

/* ── Close button ───────────────────────────────────────────── */
.auth-modal__close {
  position: absolute; top: 1rem; right: 1rem;
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: #f5f0ea; cursor: pointer;
  color: #7A5A38;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s, transform .15s;
  z-index: 2;
}
.auth-modal__close:hover { background: #e8d8c4; color: #2A1008; transform: scale(1.1); }

/* ── Tabs ───────────────────────────────────────────────────── */
.auth-modal__tabs {
  display: flex;
  padding: 1.5rem 2rem 0;
  border-bottom: 1.5px solid #f0e6d8;
  margin-bottom: 1.75rem;
}

.auth-tab {
  flex: 1; padding: .65rem .5rem;
  border: none; background: transparent; cursor: pointer;
  font-size: .875rem; font-weight: 600;
  color: #b89a78;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1.5px;
  transition: color .18s, border-color .18s;
  letter-spacing: .01em;
  font-family: inherit;
}
.auth-tab.active { color: #2D1B0E; border-bottom-color: #2D1B0E; }
.auth-tab:hover:not(.active) { color: #F7941D; }

/* ── Alert bar ──────────────────────────────────────────────── */
.auth-alert {
  border-radius: 10px; padding: .7rem 1rem;
  font-size: .85rem; margin: 0 2rem 1.25rem;
  line-height: 1.45;
}
.auth-alert[hidden] { display: none; }
.auth-alert--error   { background: #fff5f5; color: #c0392b; border: 1px solid #fccaca; }
.auth-alert--success { background: #f0fff4; color: #276749; border: 1px solid #b7e4c7; }

/* ── Form ───────────────────────────────────────────────────── */
.auth-form { display: flex; flex-direction: column; gap: 0; padding: 0 2rem; }
.auth-form[hidden] { display: none; }

/* ── Form head ──────────────────────────────────────────────── */
.auth-form__head { margin-bottom: 1.5rem; }
.auth-form__title {
  font-size: 1.4rem; font-weight: 800; color: #1A0A00;
  margin: 0 0 .3rem; letter-spacing: -.02em;
  font-family: inherit; line-height: 1.2;
}
.auth-form__subtitle { font-size: .85rem; color: #8B6B48; margin: 0; line-height: 1.4; }

/* ── Field ──────────────────────────────────────────────────── */
.auth-field { margin-bottom: .85rem; }

.auth-field__label {
  display: block;
  font-size: .72rem; font-weight: 700; color: #4A2A10;
  letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: .4rem;
  font-family: inherit;
}
.auth-field__label-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .4rem;
}
.auth-field__label-row .auth-field__label { margin-bottom: 0; }

/* Side-by-side phone + city row on sign-up */
.auth-field--half-row { display: flex; gap: .65rem; }
.auth-field__half { flex: 1; min-width: 0; }

.auth-field__wrap {
  display: flex; align-items: center;
  border: 1.5px solid #e8d4b8;
  border-radius: 12px;
  background: #FFFFFF;
  height: 48px;
  transition: border-color .2s, box-shadow .2s, background .2s;
  overflow: hidden;
}
.auth-field__wrap:focus-within {
  border-color: #F7941D;
  box-shadow: 0 0 0 3px rgba(247,148,29,.16);
  background: #fff;
}

.auth-field__icon {
  flex-shrink: 0;
  margin: 0 0 0 14px;
  color: #c8a070;
  display: block;
}

.auth-field__wrap input {
  flex: 1; min-width: 0;
  padding: 0 .8rem;
  border: none; background: transparent; outline: none;
  font-size: .9rem; color: #1A0A00;
  height: 100%; font-family: inherit;
}
.auth-field__wrap input::placeholder { color: #cca878; }

/* ── Password toggle ────────────────────────────────────────── */
.auth-pass-toggle {
  flex-shrink: 0;
  padding: 0 13px 0 4px;
  background: none; border: none; cursor: pointer;
  color: #c8a070;
  display: flex; align-items: center;
  height: 100%;
  transition: color .15s;
}
.auth-pass-toggle:hover { color: #7a5a38; }
.auth-pass-toggle .eye-hide          { display: none; }
.auth-pass-toggle.pass-visible .eye-show { display: none; }
.auth-pass-toggle.pass-visible .eye-hide { display: block; }

/* ── Submit button ──────────────────────────────────────────── */
.auth-submit {
  width: 100%; height: 50px;
  border: none; border-radius: 50px; cursor: pointer;
  font-size: .95rem; font-weight: 700;
  background: #2D1B0E;
  color: #fff; letter-spacing: .02em;
  box-shadow: none;
  transition: background .2s, transform .14s, box-shadow .2s;
  margin-top: .5rem; font-family: inherit;
}
.auth-submit:hover  { background: #5C3520; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(45,27,14,.28); }
.auth-submit:active { transform: translateY(0); box-shadow: none; }
.auth-submit:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Divider ────────────────────────────────────────────────── */
.auth-divider {
  display: flex; align-items: center; gap: .6rem;
  margin: .9rem 0;
  font-size: .72rem; font-weight: 700; color: #cca878;
  letter-spacing: .06em; text-transform: uppercase;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: #f0e0cc;
}

/* ── Google OAuth button ────────────────────────────────────── */
.auth-google {
  display: flex; align-items: center; justify-content: center; gap: .65rem;
  width: 100%; height: 48px;
  border: 1.5px solid #2D1B0E; border-radius: 50px;
  background: #fff; cursor: pointer;
  font-size: .9rem; font-weight: 600; color: #2A1008;
  transition: background .18s, border-color .18s, box-shadow .18s, transform .14s;
  font-family: inherit;
}
.auth-google:hover {
  background: #fdf8f5; border-color: #2D1B0E;
  box-shadow: 0 4px 16px rgba(45,27,14,.12);
  transform: translateY(-1px);
}
.auth-google:active { transform: translateY(0); }

/* ── Guest / link buttons ───────────────────────────────────── */
.auth-guest { text-align: center; margin-top: .5rem; }

.auth-link {
  background: none; border: none; cursor: pointer;
  font-size: .85rem; color: #E07B00; text-decoration: underline;
  padding: 0; text-align: center; font-family: inherit;
}
.auth-link:hover { color: #b85e00; }

.auth-link--sm { font-size: .8rem; color: #a08060; text-decoration: none; }
.auth-link--sm:hover { color: #7a5a38; text-decoration: underline; }

.auth-link--xs {
  font-size: .75rem; font-weight: 600;
  color: #E07B00; text-decoration: none; white-space: nowrap;
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: inherit;
}
.auth-link--xs:hover { color: #b85e00; text-decoration: underline; }

.auth-link--back {
  display: block; text-align: center;
  margin-top: .65rem;
  background: none; border: none; cursor: pointer;
  font-size: .85rem; color: #a08060; font-family: inherit;
  text-decoration: none;
}
.auth-link--back:hover { color: #7a5a38; text-decoration: underline; }

/* ── Optional label ─────────────────────────────────────────── */
.auth-optional {
  font-weight: 400; color: #cca878; font-size: .72rem;
  letter-spacing: 0; text-transform: none;
}

/* ── Success state ──────────────────────────────────────────── */
.auth-success { text-align: center; }
.auth-success[hidden] { display: none; }

.auth-success__header {
  background: linear-gradient(135deg, #3A1800 0%, #1C0800 100%);
  padding: 2.25rem 2rem 1.75rem;
  display: flex; flex-direction: column; align-items: center; gap: .75rem;
}
.auth-success__icon-ring {
  width: 68px; height: 68px; border-radius: 50%;
  border: 1.5px solid rgba(255,200,122,.3);
  background: rgba(200,120,0,.22);
  color: #FFC87A;
  display: flex; align-items: center; justify-content: center;
}
.auth-success__eyebrow {
  margin: 0;
  font-size: 10px; font-weight: 700;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: rgba(255,255,255,.5);
}
.auth-success__body { padding: 1.75rem 2rem 0; }
.auth-success__title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.45rem; font-weight: 700;
  color: #1A0A00; margin: 0 0 .65rem; line-height: 1.25;
}
.auth-success__msg { font-size: .9rem; color: #6A4820; line-height: 1.65; margin: 0; }
.auth-success__foot {
  margin: 1.5rem 2rem 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid #f0e6d8;
}
.auth-success__back {
  background: none; border: none; cursor: pointer;
  font-size: .875rem; color: #a08060;
  font-family: inherit; padding: 0;
  transition: color .15s;
}
.auth-success__back:hover { color: #2D1B0E; text-decoration: underline; }

/* ── Dual Sign In / Register buttons (signed-out nav state) ─── */
.auth-nav__signed-out { display: flex; align-items: center; gap: .4rem; }

/* ── Navbar auth area ───────────────────────────────────────── */
.auth-nav__signin,
.auth-nav__register {
  font-size: .85rem; font-weight: 600;
  padding: .45rem 1.1rem;
  border-radius: 50px;
  border: 1.5px solid #2D1B0E;
  color: #2D1B0E;
  cursor: pointer; background: transparent;
  box-shadow: none;
  transition: background .22s ease, color .22s ease, border-color .22s ease,
              transform .18s ease, box-shadow .22s ease;
}
.auth-nav__signin:hover {
  background: #2D1B0E;
  border-color: #2D1B0E;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(45,27,14,0.22);
}
.auth-nav__register:hover {
  background: #2D1B0E;
  border-color: #2D1B0E;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(45,27,14,0.22);
}
.auth-nav__signin:active,
.auth-nav__register:active {
  transform: translateY(0) scale(0.97);
  box-shadow: none;
}

.auth-nav__user { position: relative; }

.auth-nav__avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #F7941D, #E07B00);
  border: none; cursor: pointer; color: #fff;
  font-size: .9rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.auth-nav__dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: #fff; border-radius: 12px; min-width: 180px;
  box-shadow: 0 8px 32px rgba(20,8,0,.14);
  padding: .5rem;
  display: flex; flex-direction: column; gap: 2px;
}
.auth-nav__dropdown[hidden] { display: none; }

.auth-nav__name {
  font-size: .8rem; font-weight: 700; color: #4A2A10;
  padding: .5rem .65rem .25rem; display: block;
  border-bottom: 1px solid #f0e6d8; margin-bottom: .25rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.auth-nav__dropdown a,
.auth-nav__dropdown button {
  display: block; width: 100%;
  padding: .55rem .65rem; border-radius: 8px;
  font-size: .875rem; color: #4A2A10;
  text-decoration: none; background: none; border: none;
  cursor: pointer; text-align: left;
  transition: background .15s;
}
.auth-nav__dropdown a:hover,
.auth-nav__dropdown button:hover { background: #fff3e6; }

/* ── Mobile nav auth slot ───────────────────────────────────── */
.auth-nav__signin.btn--sm { font-size: .82rem; }
.mobile-nav__cta [data-auth-nav] { display: block; margin-top: .65rem; }
.mobile-nav__cta .auth-nav__signed-out { flex-direction: column; gap: .5rem; }
.mobile-nav__cta .auth-nav__signed-out button { width: 100%; justify-content: center; }
.mobile-nav__cta .auth-nav__signin,
.mobile-nav__cta .auth-nav__register { width: 100%; display: flex; align-items: center; justify-content: center; }
.mobile-nav__cta .auth-nav__user { justify-content: flex-start; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-modal { padding: .75rem .75rem 1.5rem; }
  .auth-modal__tabs { padding: 1.25rem 1.5rem 0; }
  .auth-form { padding: 0 1.5rem; }
  .auth-alert { margin: 0 1.5rem 1.1rem; }
  .auth-modal__card { padding-bottom: 1.5rem; }
  .auth-field--half-row { flex-direction: column; gap: .85rem; }
  .auth-form__title { font-size: 1.25rem; }
}
