/* Terms & Privacy modals — matches ABM site palette and typography */

.footer-legal {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 16px 0 0;
}

.footer-legal__btn {
  background: none;
  border: none;
  padding: 4px 6px;
  font-family: "Barlow", sans-serif;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.footer-legal__btn:hover,
.footer-legal__btn:focus-visible {
  color: #1aada3;
  outline: none;
}

.footer-legal__sep {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.85rem;
  user-select: none;
}

body.abm-legal-modal-open {
  overflow: hidden;
}

.abm-legal-modal {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: none;
  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));
}

.abm-legal-modal.abm-legal-modal--open {
  display: flex;
}

.abm-legal-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 30, 51, 0.72);
  backdrop-filter: blur(4px);
}

.abm-legal-modal__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(640px, 100%);
  max-height: min(85vh, 720px);
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 24px 64px rgba(9, 30, 51, 0.35);
  border: 1px solid rgba(26, 173, 163, 0.25);
  overflow: hidden;
  animation: abm-legal-modal-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes abm-legal-modal-in {
  from {
    opacity: 0;
    transform: translate3d(0, 20px, 0) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.abm-legal-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: #0d2a45;
  border-bottom: 3px solid #1aada3;
}

.abm-legal-modal__title {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.3;
}

.abm-legal-modal__close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  background: transparent;
  color: #ffffff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.abm-legal-modal__close:hover,
.abm-legal-modal__close:focus-visible {
  background: #1aada3;
  border-color: #1aada3;
  color: #0d2a45;
  outline: none;
}

.abm-legal-modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px 28px;
  font-family: "Barlow", sans-serif;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #333333;
  -webkit-overflow-scrolling: touch;
}

.abm-legal-modal__body p {
  margin: 0 0 14px;
}

.abm-legal-modal__body p:last-child {
  margin-bottom: 0;
}

.abm-legal-modal__body h3 {
  margin: 22px 0 10px;
  font-family: "Montserrat", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0d2a45;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.abm-legal-modal__body h3:first-child {
  margin-top: 0;
}

.abm-legal-modal__body a {
  color: #1aada3;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.abm-legal-modal__body a:hover {
  color: #0d2a45;
}

.abm-legal-modal__updated {
  margin-bottom: 18px !important;
  font-size: 0.85rem;
  color: rgba(13, 42, 69, 0.65);
}

@media (max-width: 480px) {
  .abm-legal-modal__header {
    padding: 16px 18px;
  }

  .abm-legal-modal__title {
    font-size: 1rem;
  }

  .abm-legal-modal__body {
    padding: 18px 18px 22px;
    font-size: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .abm-legal-modal__panel {
    animation: none;
  }
}
