/* AxessPharma — Shop Locator : bouton vertical sticky + modal responsive.
   Chargé par Modules\ShopLocator\ShopLocator quand la feature est ON (hors dashboard).
   Branding AxessPharma : cyan #006E96, cyan dark #005471, texte #353535, bordure #EDEDED.
*/

/* ===== Bouton vertical sticky (tranche droite) ===== */
.ax-shop-locator-btn {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 9985;
  background: linear-gradient(180deg, #006E96 0%, #005471 100%);
  color: #fff;
  border: 0;
  border-radius: 12px 0 0 12px;
  padding: 18px 12px;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: "Lato", sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  box-shadow: -4px 4px 16px rgba(0, 84, 113, 0.28);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}
.ax-shop-locator-btn:hover {
  padding-right: 16px;
  box-shadow: -6px 6px 22px rgba(0, 84, 113, 0.42);
}
.ax-shop-locator-btn:active { transform: translateY(-50%) scale(0.97); }
.ax-shop-locator-btn__label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-transform: uppercase;
}
.ax-shop-locator-btn > * { pointer-events: none; }

/* Décale légèrement sur mobile pour ne pas chevaucher la bottom nav */
@media (max-width: 760px) {
  .ax-shop-locator-btn {
    top: auto;
    bottom: 140px;
    transform: none;
    padding: 14px 10px;
    font-size: 0.72rem;
    border-radius: 10px 0 0 10px;
  }
  .ax-shop-locator-btn:active { transform: scale(0.96); }
  .ax-shop-locator-btn:hover { padding-right: 14px; }
}

/* ===== Modal ===== */
.ax-shop-locator-modal[hidden] { display: none; }
.ax-shop-locator-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ax-sl-fade 0.22s ease-out;
}
.ax-shop-locator-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 20, 33, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.ax-shop-locator-modal__panel {
  position: relative;
  background: #fff;
  width: min(1100px, calc(100vw - 48px));
  max-height: min(820px, calc(100vh - 48px));
  height: 80vh;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  animation: ax-sl-pop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ax-shop-locator-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px;
  border-bottom: 1px solid #EDEDED;
  flex-shrink: 0;
}
.ax-shop-locator-modal__eyebrow {
  display: block;
  font-family: "Lato", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: #006E96;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.ax-shop-locator-modal__head h2 {
  margin: 0;
  font-family: "Lato", sans-serif;
  font-size: 1.4rem;
  color: #353535;
  font-weight: 700;
}
.ax-shop-locator-modal__close {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #FAFAFA;
  border: 1px solid #EDEDED;
  color: #353535;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.ax-shop-locator-modal__close:hover { background: #006E96; color: #fff; border-color: #006E96; }
.ax-shop-locator-modal__close > * { pointer-events: none; }
.ax-shop-locator-modal__body {
  flex: 1;
  overflow: hidden;
  position: relative;
  min-height: 0;
}
.ax-shop-locator-modal__body .ax-map-wrap,
.ax-shop-locator-modal__body .ax-map-layout {
  height: 100% !important;
  min-height: 100%;
}
.ax-shop-locator-modal__body .ax-map {
  height: 100% !important;
  min-height: 100%;
}

/* Mobile : plein écran + carte dominante */
@media (max-width: 760px) {
  .ax-shop-locator-modal__panel {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  .ax-shop-locator-modal__head {
    padding: 12px 16px;
    padding-top: calc(12px + env(safe-area-inset-top));
  }
  .ax-shop-locator-modal__head h2 { font-size: 1.05rem; }
  .ax-shop-locator-modal__eyebrow { font-size: 0.66rem; }
  /* Force la carte à occuper ~60% du modal mobile, sidebar 40% scrollable */
  .ax-shop-locator-modal__body .ax-map-wrap {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: 60% 40% !important;
    height: 100% !important;
    border-radius: 0 !important;
    border: 0 !important;
  }
  .ax-shop-locator-modal__body .ax-map {
    height: 100% !important;
    min-height: 0 !important;
  }
  .ax-shop-locator-modal__body .ax-map-sidebar {
    max-height: none !important;
    height: 100% !important;
    overflow-y: auto;
  }
}

body.ax-sl-lock { overflow: hidden !important; }

@keyframes ax-sl-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ax-sl-pop { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
