/* Theme 2.0 — remaining public pages (market, faq, contact, legal, 2FA). See theme.css for tokens. */

/* Contact page: toast-style success/error banner (site.css hardcodes a white box) */
.notification {
  background-color: var(--color-surface) !important;
  border: 1px solid var(--color-border);
  color: var(--color-ink) !important;
}
.notification.success { border-color: var(--color-success); }
.notification.success .notification-icon,
.notification.success i { color: var(--color-success); }
.notification.error { border-color: var(--color-danger); }
.notification.error .notification-icon,
.notification.error i { color: var(--color-danger); }

/* ============ Full-screen mobile navigation ============
   site.css's legacy .navbar-collapse rule renders a hardcoded-white,
   rounded dropdown box under the navbar — never themed, never full
   screen. Below the navbar's own collapse breakpoint (992px) this
   replaces that with a proper full-viewport, theme-aware overlay.
   Bootstrap's collapse plugin still owns open/close and aria-expanded;
   only the .show/.collapsing presentation changes here. */
@media (max-width: 991.98px) {
  .navbar-toggler {
    position: relative;
    z-index: 1060;
    background: var(--color-surface-2);
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-ink);
    font-size: 18px;
  }
  .navbar-toggler:hover { background: var(--color-surface-3); }
  .navbar-brand { position: relative; z-index: 1060; }

  .navbar-collapse {
    background: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    margin-top: 0;
    max-height: none;
    overflow: visible;
  }

  .navbar-collapse.collapsing,
  .navbar-collapse.show {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    inset: 0;
    z-index: 1050;
    width: 100vw;
    height: 100vh;
    background: var(--color-bg-elevated);
    padding: calc(88px + env(safe-area-inset-top, 0px)) 28px calc(32px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
  }
  .navbar-collapse.collapsing {
    transition: none;
    height: 100vh;
  }
  .navbar-collapse.show {
    animation: publicMobileMenuIn var(--duration-base, 240ms) var(--ease-out-quart, ease) both;
  }
  @media (prefers-reduced-motion: reduce) {
    .navbar-collapse.show { animation: none; }
  }
  @keyframes publicMobileMenuIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  body.public-menu-open { overflow: hidden; }

  /* Primary links: centered, symmetric, large tap targets */
  .navbar-collapse .navbar-nav.me-auto {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 2px;
    margin: 0 !important;
    text-align: center;
  }
  .navbar-collapse .navbar-nav.me-auto .nav-link {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--color-ink) !important;
    padding: 16px 0 !important;
    border-radius: var(--radius-sm);
    transition: color var(--duration-fast, 150ms) var(--ease-out-quart, ease);
  }
  .navbar-collapse .navbar-nav.me-auto .nav-link:hover { color: var(--color-primary) !important; }
  .navbar-collapse .navbar-nav.me-auto .nav-link.active {
    color: var(--color-primary) !important;
    background: none !important;
  }
  .navbar-collapse .navbar-nav.me-auto .nav-link.active::after { display: none; }

  /* Utility row: theme + language centered together; auth actions
     (which are full-width .btn elements) stack on their own row below. */
  .navbar-collapse .navbar-nav.ms-auto {
    margin: 0 !important;
    padding-top: 24px !important;
    border-top: 1px solid var(--color-border) !important;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 14px;
    width: 100%;
  }
  .navbar-collapse .navbar-nav.ms-auto .nav-item {
    margin: 0 !important;
    width: auto;
  }
  .navbar-collapse .navbar-nav.ms-auto .nav-item:has(.btn) {
    width: 100%;
  }
  .navbar-collapse .navbar-nav.ms-auto .btn {
    width: 100%;
    margin: 0 !important;
    padding: 13px 0;
    font-size: 16px;
  }
  .navbar-collapse .theme-toggle-btn,
  .navbar-collapse .language-switcher .nav-link {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-full);
    background: var(--color-surface-2);
    color: var(--color-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
  }
  .navbar-collapse .language-switcher .dropdown-menu {
    position: absolute;
    inset: auto 0 auto auto;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    padding: 6px;
    margin-top: 8px !important;
  }
  .navbar-collapse .language-switcher .dropdown-item {
    color: var(--color-ink-secondary);
    border-radius: var(--radius-sm);
  }
  .navbar-collapse .language-switcher .dropdown-item:hover,
  .navbar-collapse .language-switcher .dropdown-item.active {
    background: var(--color-surface-3);
    color: var(--color-ink);
  }
  .navbar-collapse .user-dropdown .nav-link {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-full);
    background: var(--color-surface-2);
    color: var(--color-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
  }
}
