/* ===================
   ALLONNIA — SAFF DISTRIBUTION LOCATIONS
   Ported from the original HTML-widget styles + the Elementor
   per-element CSS (post-3664.css) so the rebuilt module matches
   the previous design exactly.
   Region accent colors/icons are injected per-region by the
   shortcode (#saff-locations-region-css).
   =================== */

/* ---------- accordion ---------- */
.accordion-map {
  margin: 0;
  width: 100%;
  padding: 0;
  list-style-type: none;
}

.accordion-map a {
  width: 100%;
  display: block;
  cursor: pointer;
  color: #1D1E4E;
  font-family: Montserrat, sans-serif;
  font-size: 24px;
  font-style: normal;
  font-weight: 600;
  line-height: 22px;
  /* 2026 redesign: titles are title-case with normal tracking (was uppercase + 1.6px) */
  letter-spacing: normal;
  text-transform: none;
  user-select: none;
  text-decoration: none;
  border-bottom: 3px solid #F2F2F2;
  box-sizing: border-box;
  padding-bottom: 24px; /* 2026 redesign: 24px between title group and divider (was 8px) */
}
.accordion-map > li {
  margin: 0 0 24px; /* 2026 redesign: 24px between divider and next title group */
}

.accordion-map .location > a {
  position: relative;
  line-height: normal; /* live site: per-region rules override the 22px base */
}

/* Arrow icon — 2026 redesign chevron (8x14, #1D1E4E) embedded as the default;
   a region's "icon URL" field still overrides it if ever set */
.accordion-map .location > a:after {
  display: block;
  content: '';
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='14' viewBox='0 0 8 14' fill='none'%3E%3Cpath d='M1.00012 1.00037L6.65697 6.65723L1.00012 12.3141' stroke='%231D1E4E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  width: 8px;
  height: 14px;
  position: absolute;
  right: 0;
  top: 24px;
  transform: translateY(-50%) rotate(0deg);
  transition: all 0.2s ease-in-out;
}
.accordion-map .location > a.active:after {
  transform: translateY(-50%) rotate(90deg);
}

.accordion-map .distributor {
  font-family: Montserrat, sans-serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 144%;
  text-decoration: none;
}
/* 2026 redesign mobile typography */
@media (max-width: 767px) {
  .distributor { max-width: 225px; }
  .accordion-map a { font-size: 18px; }
  .accordion-map .distributor { font-size: 15px; }
}

/* Collapsible panel — JS animates max-height (replaces jQuery slideDown) */
.accordion-map-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease;
  box-sizing: border-box;
  font-size: 0; /* kills whitespace gaps between the inline-block links */
}
.accordion-map-content.open {
  padding-top: 18px;
}

.accordion-map .accordion-map-content a {
  display: inline-block !important;
  vertical-align: top !important;
  width: 50% !important;
  box-sizing: border-box;
  margin-bottom: 8px;
  /* the old stylesheet declared 10px !important AND 16px — 10px is what
     actually renders on the live site, so 10px is the faithful value */
  font-size: 10px !important;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #25295B;
  text-decoration: none;
  font-family: Montserrat, sans-serif;
  border-bottom: none !important;
  padding-bottom: 0;
}
@media (max-width: 404px) {
  .accordion-map .accordion-map-content a {
    font-size: 9px !important;
    letter-spacing: 0.8px;
    padding-right: 16px !important;
  }
}

/* ---------- popup ---------- */
.saff-popup-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  z-index: 99999997;
  display: flex;
  justify-content: center;
  align-items: center;
  -webkit-backdrop-filter: blur(24px); /* Safari first */
  backdrop-filter: blur(24px);
  background: rgba(0, 0, 0, 0.27);
  box-shadow: 0 4px 50px 0 rgba(0, 0, 0, 0.18);
}
.saff-popup-overlay[hidden] { display: none; }
.saff-popup-open { overflow: hidden; }

.saff-popup-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  width: 850px;
  max-width: calc(100vw - 32px);
  min-height: 458px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background-color: rgba(255, 255, 255, 0.75);
  border-radius: 24px;
  padding: 48px 72px;
  box-sizing: border-box;
}
@media (max-width: 767px) {
  .saff-popup-card {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    padding: 64px 24px 16px;
  }
}

.saff-popup-card h2 {
  margin: 0;
  font-family: var(--e-global-typography-secondary-font-family, Montserrat), sans-serif;
  font-size: var(--e-global-typography-secondary-font-size, 32px);
  font-weight: var(--e-global-typography-secondary-font-weight, 600);
  line-height: var(--e-global-typography-secondary-line-height, 1.2);
  color: var(--saff-popup-accent, #1D1E4E); /* region accent, set by JS */
}

.saff-popup-body {
  padding-right: 51px;
  color: #25295B;
}
@media (max-width: 767px) {
  .saff-popup-body { padding-right: 0; }
}

.saff-popup-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: none;
  color: #25295B;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* CTA — same design as the original .gated-button pill */
.saff-popup-cta[hidden] { display: none; }
.saff-popup-cta {
  background: transparent;
  border: none;
  color: #25295B;
  padding: 10px 1.5rem;
  display: inline-block;
  position: relative;
  z-index: 0;
  font-family: Montserrat, sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 30px;
  font-size: 16px;
  letter-spacing: 1.6px;
  text-align: center;
  transition: background-image 0.3s ease, color 0.3s ease;
}
.saff-popup-cta:before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  padding: 2.5px;
  border-radius: 30px;
  background: linear-gradient(to right, #25295B, #25295B);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.saff-popup-cta:hover {
  cursor: pointer;
  background-image: linear-gradient(to right, #9142FF, #45C2FA, #7CC800);
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
}
.saff-popup-cta:hover:before {
  background: linear-gradient(to right, #9142FF, #45C2FA, #7CC800);
}
