/* Mobile wallet modal close button: keep it visible below the fixed site header. */
@media (max-width: 820px) {
  html body #walletModal {
    z-index: 2147483600 !important;
  }

  html body #walletModal .modal-dialog,
  html body #walletModal .modal-content {
    overflow: visible !important;
  }

  html body #walletModal .modal-close {
    display: flex !important;
    position: fixed !important;
    top: 74px !important;
    right: 12px !important;
    left: auto !important;
    bottom: auto !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid rgba(255,255,255,.35) !important;
    border-radius: 50% !important;
    background: #111a2c !important;
    box-shadow: 0 6px 18px rgba(0,0,0,.45) !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    cursor: pointer !important;
    z-index: 2147483647 !important;
  }

  html body #walletModal .modal-close svg {
    display: block !important;
    width: 16px !important;
    height: 16px !important;
    fill: #fff !important;
    opacity: 1 !important;
    pointer-events: none !important;
  }

  /* Fallback X in case the SVG sprite is not loaded. */
  html body #walletModal .modal-close::after {
    content: "×";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font: 700 27px/1 Arial, sans-serif;
    pointer-events: none;
  }

  html body #walletModal .modal-close svg + * { pointer-events: none !important; }
}

@media (max-width: 420px) {
  html body #walletModal .modal-close {
    top: 72px !important;
    right: 8px !important;
  }
}
