/* Members-only sheet + toast, both built by /js/auth.js.
   Tokens come from app.css; every var() has a fallback so pages without it work. */

/* ── Members-only sheet (<dialog>) ───────────────────────────── */

.boq-sheet {
  width: 100%;
  max-width: 28rem;
  margin: auto auto 0;
  padding: 0;
  border: 1px solid var(--border-default, rgba(255, 255, 255, 0.14));
  border-bottom: 0;
  border-radius: var(--radius-lg, 16px) var(--radius-lg, 16px) 0 0;
  background: #4a5d4f;
  color: var(--text-default, rgba(247, 249, 249, 0.9));
  box-shadow: var(--shadow-3, 0 12px 32px rgba(0, 0, 0, 0.22));
  font-family: var(--font-sans, system-ui, sans-serif);
}

.boq-sheet::backdrop {
  background: rgba(20, 28, 22, 0.6);
}

.boq-sheet[open] {
  animation: boq-sheet-in var(--dur-base, 200ms) var(--ease-out, ease-out);
}

@keyframes boq-sheet-in {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@media (min-width: 640px) {
  .boq-sheet {
    margin: auto;
    border-bottom: 1px solid var(--border-default, rgba(255, 255, 255, 0.14));
    border-radius: var(--radius-lg, 16px);
  }
}

.boq-sheet-body {
  position: relative;
  padding: var(--space-6, 1.5rem) var(--space-5, 1.25rem) calc(var(--space-5, 1.25rem) + env(safe-area-inset-bottom, 0px));
  text-align: center;
}

@media (min-width: 640px) {
  .boq-sheet-body {
    padding: var(--space-8, 2rem) var(--space-6, 1.5rem) var(--space-6, 1.5rem);
  }
}

.boq-sheet-close {
  position: absolute;
  top: var(--space-2, 0.5rem);
  right: var(--space-2, 0.5rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--radius-pill, 999px);
  background: transparent;
  color: var(--text-subtle, rgba(247, 249, 249, 0.68));
  font-size: 1.125rem;
  cursor: pointer;
}

.boq-sheet-close:hover {
  background: var(--surface-2, rgba(255, 255, 255, 0.1));
  color: var(--text-strong, #fff);
}

.boq-sheet-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: var(--space-3, 0.75rem);
  border-radius: var(--radius-pill, 999px);
  background: rgba(255, 192, 81, 0.16);
  color: var(--yellow-light, #FFC051);
  font-size: 1.25rem;
}

.boq-sheet-title {
  margin: 0 0 var(--space-2, 0.5rem);
  font-size: var(--text-xl, 1.375rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.005em;
  text-transform: none; /* the theme uppercases h2 */
  color: var(--text-strong, #fff);
}

.boq-sheet-text {
  margin: 0 auto;
  max-width: 24rem;
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.5;
  color: var(--text-default, rgba(247, 249, 249, 0.9));
}

.boq-sheet-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3, 0.75rem);
  margin-top: var(--space-6, 1.5rem);
}

.boq-sheet-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.625rem var(--space-5, 1.25rem);
  border: 1px solid transparent;
  border-radius: var(--radius-md, 12px);
  font-size: var(--text-base, 1rem);
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
}

.boq-sheet-btn--primary {
  background: var(--yellow-light, #FFC051);
  border-color: var(--yellow-light, #FFC051);
  color: #2e3a31;
}

.boq-sheet-btn--primary:hover {
  background: #ffcc70;
  border-color: #ffcc70;
  color: #2e3a31;
}

.boq-sheet-btn--secondary {
  background: var(--surface-2, rgba(255, 255, 255, 0.1));
  border-color: var(--border-default, rgba(255, 255, 255, 0.14));
  color: var(--text-strong, #fff);
}

.boq-sheet-btn--secondary:hover {
  background: var(--surface-3, rgba(255, 255, 255, 0.14));
  border-color: var(--border-strong, rgba(255, 255, 255, 0.24));
  color: var(--text-strong, #fff);
}

.boq-sheet-btn:focus-visible,
.boq-sheet-close:focus-visible,
.boq-toast-close:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring, 0 0 0 2px #576C5C, 0 0 0 4px #FFC051);
}

/* ── Toast ───────────────────────────────────────────────────── */

.boq-toast {
  position: fixed;
  z-index: 1000;
  left: 50%;
  bottom: calc(var(--shell-tabbar-h, 64px) + env(safe-area-inset-bottom, 0px) + var(--space-3, 0.75rem));
  display: flex;
  align-items: center;
  gap: var(--space-3, 0.75rem);
  width: max-content;
  max-width: calc(100vw - 2rem);
  padding: var(--space-2, 0.5rem) var(--space-2, 0.5rem) var(--space-2, 0.5rem) var(--space-4, 1rem);
  border: 1px solid var(--border-default, rgba(255, 255, 255, 0.14));
  border-radius: var(--radius-md, 12px);
  background: #2e3a31;
  color: var(--text-strong, #fff);
  box-shadow: var(--shadow-3, 0 12px 32px rgba(0, 0, 0, 0.22));
  font-family: var(--font-sans, system-ui, sans-serif);
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity var(--dur-base, 200ms) var(--ease-out, ease-out),
              transform var(--dur-base, 200ms) var(--ease-out, ease-out);
}

@media (min-width: 768px) {
  .boq-toast {
    bottom: var(--space-6, 1.5rem);
    left: calc(50% + var(--shell-nav-offset, 0px) / 2);
  }
}

.boq-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  .boq-toast,
  .boq-sheet[open] {
    transition: none;
    animation: none;
  }
}

.boq-toast-icon {
  color: var(--yellow-light, #FFC051);
}

.boq-toast-text {
  margin: 0;
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.4;
}

.boq-toast-close {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: var(--radius-sm, 8px);
  background: transparent;
  color: var(--text-subtle, rgba(247, 249, 249, 0.68));
  cursor: pointer;
}

.boq-toast-close:hover {
  background: var(--surface-2, rgba(255, 255, 255, 0.1));
  color: var(--text-strong, #fff);
}
