:root {
  --wei-button-bg: #cc1939;
  --wei-button-text: #000000;
  --wei-button-border: #cc1939;
  --wei-button-hover-bg: #ffffff;
  --wei-button-hover-text: #cc1939;
}

.wei-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.wei-modal.is-open {
  display: flex;
}

.wei-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.wei-modal__content {
  position: relative;
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  max-width: 480px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.wei-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  border: none;
  font-size: 1.1rem;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  cursor: pointer;
  line-height: 1;
}

.wei-modal__body {
  display: none;
}

.wei-modal__body.is-active {
  display: block;
}

#wei-form {
  display: grid;
  gap: 1rem;
}

#wei-form label {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  font-size: 0.9rem;
  color: #222;
}

#wei-form input {
  margin-top: 0.25rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
}

.wei-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  border: 2px solid var(--wei-button-border, #cc1939);
  background: var(--wei-button-bg, #cc1939);
  color: var(--wei-button-text, #000);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  margin-bottom: 0.5rem;
}

.wei-button--wide {
  width: 100%;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

#wei-form .wei-button--wide {
  justify-self: center;
}

.wei-button:hover {
  background: var(--wei-button-hover-bg, #fff);
  color: var(--wei-button-hover-text, #cc1939);
  border-color: var(--wei-button-border, #cc1939);
}

.wei-modal__qr {
  width: 220px;
  height: 220px;
  object-fit: contain;
  margin: 1rem auto 2rem;
  display: block;
}

.wei-modal__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  padding-top: 0.5rem;
}

.is-hidden {
  display: none !important;
}

.wei-modal__message {
  margin-bottom: 1rem;
  color: #b91c1c;
  font-weight: 600;
  display: none;
}

.wei-modal__message.is-visible {
  display: block;
}

.wei-modal-trigger {
  cursor: pointer;
}
