/* gate */
.agegate--xinphep {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* body lock */
.body--no-scroll {
  overflow: hidden;
}

/* dialog */
.agx-dialog {
  width: min(1320px, 100%);
  max-width: 1320px;
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--rnt-base);
  color: var(--rnt-text);
  border-radius: var(--rnt-radius-lg);
  box-shadow: var(--shadow-strong);
  outline: none;
}

/* header */
.agx-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 32px 0;
}

.agx-logo {
  display: block;
  max-width: 140px;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* body */
.agx-body {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 28px 32px 24px;
  text-align: center;
}

.agx-eyebrow {
  margin: 0 0 12px;
  font-family: var(--rnt-font-extra);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rnt-accent);
}

.agx-title {
  margin: 0 0 14px;
  font-family: var(--rnt-font);
  font-size: 30px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--rnt-text);
}

.agx-desc {
  margin: 0 auto 28px;
  max-width: 580px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--rnt-text);
  opacity: 0.82;
}

/* form */
.agx-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.agx-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.agx-label {
  font-size: 11px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rnt-text);
}

.agx-input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--rnt-radius-md);
  background: var(--rnt-base);
  color: var(--rnt-text);
  font-family: var(--rnt-font);
  font-size: 14px;
  line-height: 1.4;
  transition:
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    transform var(--transition-fast);
  appearance: none;
  -webkit-appearance: none;
}

.agx-input::placeholder {
  color: var(--rnt-text);
  opacity: 0.42;
}

.agx-input:hover {
  border-color: rgba(0, 0, 0, 0.22);
}

.agx-input:focus {
  border-color: var(--rnt-accent);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.04);
  outline: none;
}

.agx-input[type="date"] {
  padding-right: 12px;
}

/* checks */
.agx-checks {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.agx-check {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 13px;
  line-height: 1.65;
  color: var(--rnt-text);
}

.agx-check input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--rnt-accent);
}

/* actions */
.agx-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.agx-btn {
  min-height: 52px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--rnt-font);
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background var(--transition-normal),
    color var(--transition-normal),
    border-color var(--transition-normal),
    transform var(--transition-fast),
    box-shadow var(--transition-normal);
}

.agx-btn:hover {
  transform: translateY(-1px);
}

.agx-btn:active {
  transform: translateY(0);
}

.agx-btn--primary {
  background: var(--rnt-text);
  color: var(--rnt-base);
  box-shadow: var(--shadow-soft);
}

.agx-btn--primary:hover {
  background: var(--rnt-hover);
  color: var(--primary-color);
}

.agx-btn--secondary {
  background: transparent;
  color: var(--rnt-text);
  border-color: rgba(0, 0, 0, 0.14);
}

.agx-btn--secondary:hover {
  border-color: rgba(0, 0, 0, 0.26);
  background: rgba(0, 0, 0, 0.03);
}

/* error */
.agx-error {
  min-height: 20px;
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #b42318;
  text-align: center;
}

/* footer */
.agx-footer {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 0 32px 32px;
  text-align: center;
}

.agx-warning {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.7;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rnt-text);
}

.agx-legal {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--rnt-text);
  opacity: 0.8;
}

.agx-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.agx-links a {
  position: relative;
  font-size: 12px;
  line-height: 1.5;
  color: var(--rnt-text);
  text-decoration: none;
  transition: color var(--transition-normal), opacity var(--transition-normal);
}

.agx-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: currentColor;
  opacity: 0.28;
  transition: opacity var(--transition-normal);
}

.agx-links a:hover {
  color: var(--rnt-hover);
}

.agx-links a:hover::after {
  opacity: 0.6;
}

/* mobile */
@media (max-width: 991.98px) {
  .agegate--xinphep {
    padding: 20px 0;
  }

  .agx-dialog {
    width: 90vw;
    max-height: calc(100vh - 40px);
    border-radius: var(--rnt-radius-lg);
  }

  .agx-header {
    padding: 24px 20px 0;
  }

  .agx-logo {
    max-width: 112px;
  }

  .agx-body {
    width: 100%;
    padding: 24px 20px 20px;
  }

  .agx-title {
    font-size: 24px;
  }

  .agx-desc {
    margin-bottom: 24px;
    font-size: 13px;
  }

  .agx-actions {
    grid-template-columns: 1fr;
  }

  .agx-footer {
    width: 100%;
    padding: 0 20px 24px;
  }
}

/* small mobile */
@media (max-width: 479.98px) {
  .agegate--xinphep {
    padding: 16px 0;
  }

  .agx-dialog {
    width: 90vw;
    max-height: calc(100vh - 32px);
  }

  .agx-header {
    padding: 20px 16px 0;
  }

  .agx-body {
    padding: 20px 16px 18px;
  }

  .agx-title {
    font-size: 21px;
  }

  .agx-desc,
  .agx-legal,
  .agx-check {
    font-size: 12px;
  }

  .agx-input,
  .agx-btn {
    min-height: 48px;
  }

  .agx-footer {
    padding: 0 16px 20px;
  }

  .agx-links {
    gap: 12px 16px;
  }
}