/**
 * Harko Age Verify — front styles
 */

#harko-age-gate {
  --harko-primary: #1a1a1a;
  --harko-text: #1a1a1a;
  --harko-text-secondary: #5c5c5c;
  --harko-card: #ffffff;
  --harko-overlay: #0a0a0a;
  --harko-overlay-opacity: 0.85;
  --harko-radius: 12px;
  --harko-card-max: 480px;
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  box-sizing: border-box;
}

html.harko-age-gate-pending #harko-age-gate,
#harko-age-gate.harko-age-gate--visible {
  display: flex;
}

html.harko-age-gate-verified #harko-age-gate {
  display: none !important;
}

.harko-age-gate__overlay {
  position: absolute;
  inset: 0;
  background-color: var(--harko-overlay);
  opacity: var(--harko-overlay-opacity);
}

.harko-age-gate--has-bg .harko-age-gate__overlay {
  background-image: var(--harko-bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 1;
}

.harko-age-gate--has-bg .harko-age-gate__overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--harko-overlay);
  opacity: var(--harko-overlay-opacity);
}

.harko-age-gate--hide-bg .harko-age-gate__overlay {
  opacity: 1;
}

.harko-age-gate__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--harko-card-max);
  max-height: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.harko-age-gate__card {
  background: var(--harko-card);
  color: var(--harko-text);
  border-radius: var(--harko-radius);
  padding: 2rem 1.5rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  text-align: center;
}

.harko-age-gate__logo {
  margin: 0 auto 1.25rem;
  max-width: 160px;
}

.harko-age-gate__logo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 80px;
  object-fit: contain;
  margin: 0 auto;
}

.harko-age-gate__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--harko-text-secondary);
  font-weight: 600;
}

.harko-age-gate__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  line-height: 1.25;
  font-weight: 700;
  color: var(--harko-text);
  outline: none;
}

.harko-age-gate__title:focus-visible {
  outline: 2px solid var(--harko-primary);
  outline-offset: 4px;
}

.harko-age-gate__text {
  margin: 0 0 1.5rem;
  font-size: 0.9875rem;
  line-height: 1.55;
  color: var(--harko-text-secondary);
}

.harko-age-gate__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.harko-age-gate__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.1rem;
  border-radius: calc(var(--harko-radius) * 0.66);
  border: 2px solid transparent;
  font-size: 0.9875rem;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
  font-family: inherit;
  text-decoration: none;
  box-sizing: border-box;
  width: 100%;
}

.harko-age-gate__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.harko-age-gate__btn:focus-visible {
  outline: 2px solid var(--harko-primary);
  outline-offset: 3px;
}

.harko-age-gate__btn--yes {
  background: var(--harko-primary);
  color: #fff;
  border-color: var(--harko-primary);
}

.harko-age-gate__btn--no {
  background: transparent;
  color: var(--harko-text);
  border-color: var(--harko-text-secondary);
}

.harko-age-gate__privacy {
  margin: 1.25rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--harko-text-secondary);
}

.harko-age-gate__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 560px) {
  .harko-age-gate__card {
    padding: 2.25rem 2rem;
  }

  .harko-age-gate__actions {
    flex-direction: row;
  }

  .harko-age-gate__btn {
    flex: 1 1 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .harko-age-gate__btn {
    transition: none;
  }
}
