/* Auth modal + soft gate CTA */

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(8, 6, 6, 0.72);
  backdrop-filter: blur(8px);
}

@media (min-width: 640px) {
  .auth-modal {
    align-items: center;
    padding: 1rem;
  }
}

.auth-modal.is-open {
  display: flex;
}

.auth-modal__card {
  width: min(420px, 100%);
  max-height: min(92dvh, 720px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #171313;
  border: 1px solid rgba(237, 235, 221, 0.12);
  border-radius: 16px 16px 0 0;
  padding: 1.35rem 1.25rem calc(1.2rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

@media (min-width: 640px) {
  .auth-modal__card {
    border-radius: 16px;
    padding: 1.35rem 1.25rem 1.2rem;
  }
}

.auth-modal__brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.auth-modal__brand .logo__mark {
  width: 2rem;
  height: 2rem;
  font-size: 0.95rem;
}

.auth-modal__title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.auth-modal__lead {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.auth-modal__tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.auth-modal__tab {
  flex: 1;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 0.75rem;
  background: rgba(237, 235, 221, 0.08);
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
}

.auth-modal__tab.is-active {
  background: rgba(204, 20, 25, 0.22);
  color: #fff;
}

.auth-form label {
  display: block;
  margin-bottom: 0.7rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.auth-form input,
.auth-form select {
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(237, 235, 221, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
}

.auth-form__check {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  margin: 0.85rem 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.auth-form__check input {
  width: auto;
  margin-top: 0.2rem;
}

.auth-form__actions {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.5rem;
}

.auth-form__status {
  min-height: 1.2em;
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--accent);
}

.auth-modal__close {
  position: absolute;
  top: 0.7rem;
  right: 0.85rem;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
}

.auth-modal__card {
  position: relative;
}

.auth-gate {
  margin: 1.25rem 0 0;
  padding: 1.1rem 1.15rem;
  border-radius: 12px;
  border: 1px solid rgba(204, 20, 25, 0.35);
  background: linear-gradient(135deg, rgba(204, 20, 25, 0.16), rgba(30, 24, 24, 0.9));
  display: none;
}

.auth-gate.is-visible {
  display: block;
}

.auth-gate h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.auth-gate p {
  margin: 0 0 0.85rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.auth-gate__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.auth-toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%) translateY(120%);
  z-index: 90;
  width: min(440px, calc(100% - 1.5rem));
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.auth-toast.is-open {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.auth-toast__card {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 2.2rem 0.95rem 1.1rem;
  border-radius: 14px;
  background: #1c1717;
  border: 1px solid rgba(90, 180, 110, 0.45);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.auth-toast__text {
  margin: 0;
  flex: 1 1 180px;
  font-size: 0.95rem;
  line-height: 1.35;
}

.auth-toast__close {
  position: absolute;
  top: 0.35rem;
  right: 0.5rem;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
}

.btn--sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
}
