/* Shared wallet controls for the public site header. */
#walletConnectBtn,
#logoutConfirmation {
  --wallet-header-font: Outfit, system-ui, sans-serif;
  --wallet-header-accent: #ffe600;
  --wallet-header-accent-end: #ffaa00;
  --wallet-header-radius: 5px;
}
#walletSigningReminder {
  position: fixed;
  z-index: 1080;
  top: calc(var(--marquee-height, 45px) + 88px);
  right: clamp(1rem, 4vw, 3rem);
  width: min(24rem, calc(100vw - 2rem));
  margin: 0;
  color: #f5f6fc;
  font: 500 1rem/1.45 Outfit, system-ui, sans-serif;
  pointer-events: none;
}
#walletSigningReminder:not(:empty) {
  padding: .85rem 1rem;
  border: 1px solid #4e5b70;
  border-left: 3px solid #ffcf31;
  border-radius: .7rem;
  background: #1a2333;
  box-shadow: 0 .5rem 2rem #0a102366;
}
#walletConnectBtn:has(> button.topConnectButton) {
  padding: 0;
  background: transparent;
  cursor: default;
}
#walletConnectBtn > button.topConnectButton {
  justify-content: center;
  gap: .3rem;
  font-family: var(--wallet-header-font);
  border: 0;
  border-radius: var(--wallet-header-radius);
  min-height: 36px;
  padding: 9px 13px;
  color: #493a13;
  background: linear-gradient(135deg, var(--wallet-header-accent), var(--wallet-header-accent-end));
  white-space: nowrap;
}
#walletConnectBtn > button.topConnectButton:not(:disabled) { cursor: pointer; }
#walletConnectBtn > button.topConnectButton:hover:not(:disabled) { background: var(--wallet-header-accent); }
#walletConnectBtn > button.topConnectButton:disabled {
  background: #626c79;
  color: #fff;
  cursor: wait;
}
#walletConnectBtn > button.topConnectButton:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
@media (max-width: 600px) {
  nav:has(#walletConnectBtn) { padding-inline: .75rem; }
  nav:has(#walletConnectBtn) .nav-wrapper {
    gap: .45rem;
    padding-inline: 0;
  }
  nav:has(#walletConnectBtn) .nav-logo { min-width: 0; }
  nav:has(#walletConnectBtn) .nav-logo a {
    display: flex;
    padding-inline: 0;
  }
  nav:has(#walletConnectBtn) .navLogo {
    width: clamp(104px, 37vw, 155px);
    max-width: 100%;
    height: auto;
    margin: 0;
  }
  nav:has(#walletConnectBtn) .menu-toggle { padding-inline: 4px; }
  nav:has(#walletConnectBtn) .nav-lang-switcher { margin-right: 0; }
  nav:has(#walletConnectBtn) .nav-login-buttons { flex-shrink: 0; }
  #walletConnectBtn { margin-right: 0; }
  #walletConnectBtn > button.topConnectButton {
    min-height: 40px;
    max-inline-size: 7.5rem;
    padding-inline: .45rem;
    font-size: clamp(.65rem, 2.8vw, .8rem);
    line-height: 1.15;
    white-space: normal;
  }
}

@media (max-width: 600px) {
  #walletConnectBtn:has(> .loading-spinner) {
    display: inline-grid;
    place-items: center;
    box-sizing: border-box;
    flex: 0 0 44px;
    inline-size: 44px;
    min-inline-size: 44px;
    block-size: 44px;
    min-block-size: 44px;
    padding: 0;
  }

  #walletConnectBtn > .loading-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    line-height: 1;
    white-space: nowrap;
  }

  #walletConnectBtn > .loading-spinner::before {
    content: "";
    box-sizing: border-box;
    inline-size: 18px;
    block-size: 18px;
    border: 2px solid rgba(32, 26, 15, .32);
    border-top-color: #201a0f;
    border-radius: 50%;
    animation: navSigningSpin .8s linear infinite;
  }
}

@keyframes navSigningSpin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  #walletConnectBtn > .loading-spinner::before { animation: none; }
}

  #logoutConfirmation {
    box-sizing: border-box;
    width: min(28rem, calc(100% - 2rem));
    max-width: none;
    margin: auto;
    padding: 1.5rem;
    border: 1px solid #48546a;
    border-radius: .875rem;
    background: #191e2e;
    color: #f4f6fb;
  }
  #logoutConfirmation::backdrop { background: rgb(7 12 22 / 75%); }
  #logoutConfirmation h2 { margin: 0 0 1.25rem; font-size: 1.125rem; line-height: 1.5; color: inherit; }
  #logoutConfirmation form { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .75rem; margin: 0; }
  #logoutConfirmation button {
    min-width: 5.5rem;
    min-height: 44px;
    padding: .5rem 1rem;
    border: 1px solid #8997ad;
    border-radius: .5rem;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
  }
  #logoutConfirmation button[value="yes"] { background: #ffd326; border-color: #ffd326; color: #191e2e; }
  #logoutConfirmation button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
