.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 22, 18, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  font-family: 'Nunito', system-ui, sans-serif;
}

.auth-card {
  background: #fffdf6;
  padding: 36px 40px;
  border: 4px solid #2b1e16;
  border-radius: 32px;
  box-shadow: 0 6px 0 #2b1e16, 0 14px 28px rgba(43, 30, 22, 0.25);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 340px;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  /* Stop wheel events at the card edges from bubbling out to whatever
     is behind the modal (would scroll the landing page). */
  overscroll-behavior: contain;
  color: #3b2a1f;
}

.auth-title {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 26px;
  text-align: center;
  margin: 0;
}

.auth-sub {
  font-size: 14px;
  color: #6b4f3f;
  text-align: center;
  margin: 0 0 4px;
  font-weight: 600;
  line-height: 1.4;
}

.auth-link {
  color: #2b6cb0;
  font-weight: 700;
  text-decoration: underline;
}

.auth-btn {
  width: 100%;
  font-family: inherit;
  cursor: pointer;
}

.auth-btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-field span {
  font-weight: 800;
  font-size: 13px;
  color: #6b4f3f;
}

.auth-field input,
.auth-field textarea {
  padding: 10px 14px;
  border: 2.5px solid #2b1e16;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
  background: white;
  color: #3b2a1f;
  resize: vertical;
}

.auth-field input:focus,
.auth-field textarea:focus {
  outline: none;
  border-color: #f47a92;
}

/* ── Custom dropdown ─────────────────────────────────────────────────
   Native <select> can't be styled past its closed state — the open
   menu is OS-chrome and clashes with the plush look. Build our own
   listbox with a hidden input that carries the value for FormData. */

.auth-dropdown {
  position: relative;
}

.auth-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: 2.5px solid #2b1e16;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 600;
  background: white;
  color: #3b2a1f;
  cursor: pointer;
  text-align: start;
  box-sizing: border-box;
}

.auth-dropdown-trigger:focus {
  outline: none;
  border-color: #f47a92;
}

.auth-dropdown-label[data-empty] {
  color: #9a8576;
  font-weight: 600;
}

.auth-dropdown-chevron {
  width: 12px;
  height: 8px;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.auth-dropdown-trigger[aria-expanded="true"] .auth-dropdown-chevron {
  transform: rotate(180deg);
}

.auth-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-start: 0;
  inset-inline-end: 0;
  background: #fffdf6;
  border: 2.5px solid #2b1e16;
  border-radius: 14px;
  box-shadow: 0 4px 0 #2b1e16, 0 12px 22px rgba(43, 30, 22, 0.22);
  list-style: none;
  margin: 0;
  padding: 6px;
  z-index: 20;
  max-height: 260px;
  overflow-y: auto;
}

.auth-dropdown-option {
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 700;
  color: #3b2a1f;
  cursor: pointer;
  user-select: none;
}

.auth-dropdown-option:hover,
.auth-dropdown-option.is-active {
  background: #ffe9ec;
}

.auth-dropdown-option[aria-selected="true"] {
  background: #f47a92;
  color: white;
}

/* The conditional "Other → tell us your role" wrapper uses the HTML
   `hidden` attribute. Flex containers ignore `hidden` unless we force
   `display: none`, otherwise the empty wrapper still claims a row. */
.auth-field[hidden] {
  display: none;
}

.auth-error {
  color: #c0392b;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  background: #fff0f0;
  border: 2px solid #c0392b;
  border-radius: 10px;
  padding: 8px 12px;
}

.auth-cancel {
  background: transparent;
  border: none;
  color: #6b4f3f;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  padding: 8px;
  font-family: inherit;
  text-align: center;
}

.auth-cancel:hover {
  color: #2b1e16;
  text-decoration: underline;
}
