/* Additions specific to the web app shell (accounts gate, auth modal) -
   layered on top of the shared PMH styles.css branding, never overriding it. */

.web-top-nav {
  justify-content: space-between;
  padding: 12px 20px;
}

.account-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-email {
  color: var(--muted);
  font-size: 0.85rem;
}

.account-badge {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(79, 163, 255, 0.12);
}

.gate-message {
  max-width: 560px;
  margin: 8px auto 28px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.gate-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.gate-btn {
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.gate-btn:hover {
  border-color: var(--accent);
}

.gate-btn-primary {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
}

.gate-btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.nav-signin-btn {
  padding: 6px 16px;
  font-size: 0.85rem;
}

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

/* `[hidden]` is equal-specificity with the class rule above, and author
   styles always beat the UA stylesheet's own `[hidden]{display:none}` -
   without this, the modal's explicit `display: flex` would win and it
   would render even while hidden. */
.auth-modal-backdrop[hidden] {
  display: none;
}

.auth-modal {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 32px 28px 24px;
}

.auth-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.auth-modal h2 {
  margin: 0 0 20px;
  font-size: 1.2rem;
  text-align: center;
}

.auth-label {
  display: block;
  margin: 14px 0 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.auth-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
}

.auth-input:focus {
  outline: none;
  border-color: var(--accent);
}

.auth-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin: 12px 0 0;
}

.auth-submit-btn {
  width: 100%;
  margin-top: 20px;
}

.auth-switch {
  text-align: center;
  margin: 16px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.auth-switch-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
  font-size: 0.85rem;
}

@media (max-width: 480px) {
  .web-top-nav {
    padding: 10px 14px;
  }

  .account-status {
    gap: 8px;
  }

  .account-email {
    display: none; /* keep the nav from wrapping on narrow phones - the badge/sign-out is enough */
  }
}
