/* Gau Woo Download — Modal "Login Required" */

.gw-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
}

.gw-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.gw-modal {
  max-width: 48rem;
  width: 90%;
  background: white;
  border-radius: 1.2rem;
  padding: 3.2rem 2.4rem;
  text-align: center;
  position: relative;
  font-family: inherit;
}

.gw-modal__close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: transparent;
  border: none;
  font-size: 2.4rem;
  cursor: pointer;
  color: #6b7280;
}

.gw-modal__title {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 1.2rem;
}

.gw-modal__message {
  font-size: 1.5rem;
  color: #6b7280;
  margin: 0 0 2.4rem;
}

.gw-modal__actions {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.gw-modal__btn {
  display: inline-block;
  padding: 1.2rem 2.4rem;
  font-size: 1.5rem;
  font-weight: 600;
  border-radius: 0.6rem;
  text-decoration: none;
  transition: 0.2s ease-in-out;
  border: none;
  cursor: pointer;
}

.gw-modal__btn--primary {
  background: #dc2626;
  color: white;
}

.gw-modal__btn--primary:hover {
  background: #9c1b1b;
}

.gw-modal__btn--secondary {
  background: white;
  color: #1e293b;
  border: 0.1rem solid #d1d5db;
}

.gw-modal__btn--secondary:hover {
  border-color: #dc2626;
  color: #dc2626;
}

/* ===========================================================
 * Register Modal — form popup
 * =========================================================== */
.gw-modal--form {
  max-width: 52rem;
  max-height: 90vh;
  overflow-y: auto;
  text-align: left;
  padding: 2.4rem;
}

.gw-modal--form .gw-modal__title {
  margin-bottom: 0.8rem;
  font-size: 2rem;
  text-align: left;
}

.gw-modal--form .gw-modal__message {
  text-align: left;
  font-size: 1.3rem;
  margin-bottom: 1.6rem;
}

.gw-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.gw-form__row {
  display: grid;
  gap: 1rem;
}

.gw-form__row--2col {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 540px) {
  .gw-form__row--2col {
    grid-template-columns: 1fr;
  }
}

.gw-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.gw-field label {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e293b;
}

.gw-field input[type="text"],
.gw-field input[type="email"],
.gw-field input[type="tel"],
.gw-field input[type="password"] {
  width: 100%;
  padding: 1rem 1.2rem;
  font-size: 1.4rem;
  border: 0.1rem solid #d1d5db;
  border-radius: 0.5rem;
  background: white;
  box-sizing: border-box;
  transition: border-color 0.2s ease-in-out;
}

.gw-field input:focus {
  outline: none;
  border-color: #dc2626;
}

.gw-field__hint {
  font-size: 1.1rem;
  color: #6b7280;
}

.gw-field__error {
  min-height: 1.4rem;
  font-size: 1.2rem;
  color: #dc2626;
}

.gw-req {
  color: #dc2626;
}

.gw-field--check {
  flex-direction: column;
  margin-top: 0.4rem;
}

.gw-check {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.8rem;
  cursor: pointer;
  font-weight: normal !important;
  font-size: 1.3rem;
  line-height: 1.5;
}

.gw-check input[type="checkbox"] {
  width: 1.8rem;
  height: 1.8rem;
  min-width: 1.8rem;
  margin: 0.2rem 0 0 0;
  padding: 0;
  background: white;
  border: 0.2rem solid #dc2626;
  border-radius: 0.4rem;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  transition: 0.2s ease-in-out;
}

.gw-check input[type="checkbox"]:checked {
  background: #dc2626;
  border-color: #dc2626;
}

.gw-check input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: 45%;
  left: 50%;
  width: 0.45rem;
  height: 0.9rem;
  border: solid white;
  border-width: 0 0.2rem 0.2rem 0;
  transform: translate(-50%, -55%) rotate(45deg);
}

.gw-check a {
  color: #dc2626;
  font-weight: 700;
}

.gw-form-message {
  min-height: 1.6rem;
  font-size: 1.3rem;
  color: #dc2626;
  text-align: center;
  font-weight: 600;
}

.gw-modal--form .gw-modal__actions {
  margin-top: 0.8rem;
  justify-content: center;
}

.gw-modal--form .gw-modal__btn--primary {
  min-width: 16rem;
  font-size: 1.5rem;
}

.gw-modal--form .gw-modal__btn--primary:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* Success state sau khi submit */
.gw-register-success {
  text-align: center;
  padding: 2rem 0.4rem;
}

.gw-register-success__icon {
  width: 6rem;
  height: 6rem;
  margin: 0 auto 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #16a34a;
  color: white;
  font-size: 3.2rem;
  font-weight: bold;
  border-radius: 50%;
}

.gw-register-success h3 {
  color: #16a34a;
  margin: 0 0 1.2rem;
  font-size: 1.8rem;
}

.gw-register-success p {
  margin: 0 0 0.8rem;
  font-size: 1.4rem;
  color: #1e293b;
}

.gw-register-success__note {
  font-size: 1.2rem !important;
  color: #6b7280 !important;
}
