/**
 * Age fence overlay – below aa_cookiebanner Bootstrap modal (z-index 1055).
 */
.aa-agefence {
  position: fixed;
  inset: 0;
  z-index: 1040;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
}

.aa-agefence[hidden] {
  display: none !important;
}

html.aa-agefence-open,
body.aa-agefence-open {
  overflow: hidden !important;
  overscroll-behavior: none;
  height: 100%;
}

body.aa-agefence-open {
  position: fixed;
  width: 100%;
  touch-action: none;
}

.aa-agefence__inner {
  width: 100%;
  max-width: 28rem;
  margin: auto;
  text-align: center;
}

.aa-agefence__logo {
  margin-bottom: 2rem;
}

.aa-agefence__logo img {
  display: inline-block;
  max-width: 14rem;
  width: auto;
  height: auto;
  max-height: 5rem;
  object-fit: contain;
}

.aa-agefence__content {
  margin-bottom: 1.5rem;
}

.aa-agefence__content > :last-child {
  margin-bottom: 0;
}

.aa-agefence__fieldset {
  min-width: 0;
}

.aa-agefence__fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.aa-agefence__field .form-select {
  width: 100%;
}

.aa-agefence__error {
  margin-bottom: 1rem;
  color: var(--bs-danger);
  font-size: 0.875rem;
}

.aa-agefence__error[hidden] {
  display: none !important;
}

.aa-agefence__submit {
  width: 100%;
  margin-bottom: 1.5rem;
}

.aa-agefence__actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.aa-agefence__btn {
  flex: 1 1 0;
  min-width: 0;
}

.aa-agefence__footer {
  font-size: 0.8125rem;
  opacity: 0.85;
}

.aa-agefence__footer > :last-child {
  margin-bottom: 0;
}

@media (max-width: 575.98px) {
  .aa-agefence {
    padding: 1rem;
    align-items: flex-start;
  }

  .aa-agefence__fields {
    grid-template-columns: 1fr;
  }

  .aa-agefence__logo {
    margin-bottom: 1.5rem;
  }
}
