/* ══════════════════════════════════════════
   Adeuxpas Map – WordPress Plugin Styles
   Kid-friendly daycare map design
   ══════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --adp-pink:    #FF4B8B;
  --adp-pink-lt: #FFD6E8;
  --adp-blue:    #4B9EFF;
  --adp-blue-lt: #D6EAFF;
  --adp-yellow:  #FFD74B;
  --adp-yel-lt:  #FFF8D6;
  --adp-green:   #5CC96E;
  --adp-grn-lt:  #D6F5DC;
  --adp-purple:  #9B59B6;
  --adp-orange:  #FF8C42;
  --adp-teal:    #1ABC9C;
  --adp-bg:      #F9F6FF;
  --adp-white:   #FFFFFF;
  --adp-text:    #3A3A5C;
  --adp-text-lt: #7A7A9A;
  --adp-radius:  20px;
  --adp-shadow:  0 8px 30px rgba(60,60,120,.10);
  --adp-shadow-card: 0 4px 16px rgba(60,60,120,.08);
  --adp-font-main: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  --adp-font-alt:  'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Wrapper ── */
.adeuxpas-map-wrapper {
  font-family: var(--adp-font-main);
  color: var(--adp-text);
  background: var(--adp-bg);
  padding: 2rem;
  border-radius: var(--adp-radius);
  box-sizing: border-box;
  scroll-behavior: auto;
  overflow-anchor: none;
}

.adeuxpas-map-wrapper *,
.adeuxpas-map-wrapper *::before,
.adeuxpas-map-wrapper *::after {
  box-sizing: border-box;
}

/* ── Main Section Layout ── */
.adeuxpas-creches-section {
  position: relative;
  display: flex;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  align-items: flex-start;
}

/* ── Left Panel ── */
.adeuxpas-left-panel {
  width: 320px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.adeuxpas-section-title {
  font-family: var(--adp-font-alt);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 0.35rem 0;
  color: var(--adp-text);
}

.adeuxpas-pink {
  color: var(--adp-pink);
}

.adeuxpas-section-subtitle {
  font-size: 0.95rem;
  color: var(--adp-text-lt);
  margin: 0 0 1.2rem 0;
}

/* ── City Filter ── */
.adeuxpas-city-filter {
  width: 100%;
  padding: 0.6rem 2.5rem 0.6rem 1rem;
  border-radius: 50px;
  border: 2px solid var(--adp-pink-lt);
  font-family: var(--adp-font-main);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--adp-text);
  background: var(--adp-white);
  cursor: pointer;
  outline: none;
  margin-bottom: 1.1rem;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23FF4B8B' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

.adeuxpas-city-filter:focus {
  border-color: var(--adp-pink);
}

/* ── Location List ── */
.adeuxpas-location-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.adeuxpas-location-list::-webkit-scrollbar {
  width: 5px;
}

.adeuxpas-location-list::-webkit-scrollbar-track {
  background: var(--adp-pink-lt);
  border-radius: 10px;
}

.adeuxpas-location-list::-webkit-scrollbar-thumb {
  background: var(--adp-pink);
  border-radius: 10px;
}

/* ── Location Card ── */
.adeuxpas-loc-card {
  background: var(--adp-white);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  box-shadow: var(--adp-shadow-card);
  border: 2px solid transparent;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.adeuxpas-loc-card:hover {
  transform: translateX(4px);
  box-shadow: 0 6px 20px rgba(60,60,120,.13);
}

.adeuxpas-loc-card.active {
  border-color: var(--adp-pink);
  background: var(--adp-pink-lt);
}

.adeuxpas-loc-pin {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(0,0,0,.12);
}

.adeuxpas-loc-pin svg {
  width: 20px;
  height: 24px;
}

.adeuxpas-loc-info {
  flex: 1;
  min-width: 0;
}

.adeuxpas-loc-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--adp-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.adeuxpas-loc-address {
  font-size: 0.78rem;
  color: var(--adp-text-lt);
  line-height: 1.3;
  margin-top: 0.15rem;
}

.adeuxpas-loc-gmaps {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--adp-blue);
  background: var(--adp-blue-lt);
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
  margin-top: 0.4rem;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}

.adeuxpas-loc-gmaps:hover {
  background: var(--adp-blue);
  color: var(--adp-white);
}

.adeuxpas-loc-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--adp-blue);
  background: var(--adp-blue-lt);
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
  margin-top: 0.4rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
}

.adeuxpas-loc-btn:hover {
  background: var(--adp-blue);
  color: var(--adp-white);
}

/* ── Right Panel ── */
.adeuxpas-right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

/* ── Map Container ── */
.adeuxpas-map {
  width: 100%;
  height: 520px;
  border-radius: var(--adp-radius);
  box-shadow: var(--adp-shadow);
  overflow: hidden;
  background: linear-gradient(135deg, #D6EAFF 0%, #FFD6E8 100%);
}

/* Mapbox overrides */
.adeuxpas-map .mapboxgl-canvas {
  border-radius: var(--adp-radius);
}

.adeuxpas-map .mapboxgl-ctrl-group {
  border-radius: 12px !important;
  box-shadow: var(--adp-shadow-card) !important;
  overflow: hidden;
}

.adeuxpas-map .mapboxgl-ctrl-group button {
  width: 36px !important;
  height: 36px !important;
}

/* ── Custom Popup ── */
.adeuxpas-popup .mapboxgl-popup-content {
  padding: 0;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(60,60,120,.18);
  overflow: hidden;
  min-width: 220px;
}

.adeuxpas-popup .mapboxgl-popup-close-button {
  font-size: 20px;
  color: var(--adp-text-lt);
  padding: 8px 12px;
  right: 0;
  top: 0;
}

.adeuxpas-popup .mapboxgl-popup-close-button:hover {
  color: var(--adp-pink);
  background: transparent;
}

.adeuxpas-popup .mapboxgl-popup-tip {
  border-top-color: var(--adp-white);
}

.adeuxpas-popup-content {
  font-family: var(--adp-font-main);
  padding: 1rem 1.2rem;
}

.adeuxpas-popup-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.adeuxpas-popup-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.adeuxpas-popup-icon svg {
  width: 16px;
  height: 20px;
}

.adeuxpas-popup-title {
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
  color: var(--adp-text);
}

.adeuxpas-popup-address {
  font-size: 0.82rem;
  color: var(--adp-text-lt);
  line-height: 1.4;
  margin: 0 0 0.8rem 0;
}

.adeuxpas-popup-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--adp-pink);
  color: var(--adp-white);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  border-radius: 50px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 4px 12px rgba(255,75,139,.3);
}

.adeuxpas-popup-btn:hover {
  background: #e03478;
  transform: translateY(-1px);
  color: var(--adp-white);
}

/* ── Map Legend ── */
.adeuxpas-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
  background: var(--adp-white);
  border-radius: 50px;
  padding: 0.65rem 1.2rem;
  box-shadow: var(--adp-shadow-card);
}

.adeuxpas-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.25rem 0.55rem;
  border-radius: 50px;
  transition: background 0.2s;
  color: var(--adp-text);
}

.adeuxpas-legend-item:hover {
  background: var(--adp-pink-lt);
}

.adeuxpas-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Map Fallback ── */
.adeuxpas-map-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: linear-gradient(135deg, #FFD6E8, #D6EAFF);
  border-radius: var(--adp-radius);
  gap: 1rem;
  font-family: var(--adp-font-main);
  text-align: center;
  padding: 2rem;
}

.adeuxpas-map-fallback-icon {
  font-size: 3rem;
}

.adeuxpas-map-fallback h3 {
  color: var(--adp-pink);
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0;
}

.adeuxpas-map-fallback p {
  color: var(--adp-text-lt);
  font-size: 0.9rem;
  max-width: 320px;
  margin: 0;
}

/* ── Empty State ── */
.adeuxpas-empty-state {
  color: var(--adp-text-lt);
  font-size: 0.9rem;
  padding: 0.5rem;
  text-align: center;
}

/* ══════════════════════════════════════════
   RESPONSIVE STYLES
   ══════════════════════════════════════════ */

@media (max-width: 1024px) {
  .adeuxpas-creches-section {
    flex-direction: column;
  }
  
  .adeuxpas-left-panel {
    width: 100%;
  }
  
  .adeuxpas-location-list {
    max-height: 280px;
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .adeuxpas-loc-card {
    width: calc(50% - 0.35rem);
  }
  
  .adeuxpas-map {
    height: 420px;
  }
}

@media (max-width: 640px) {
  .adeuxpas-map-wrapper {
    padding: 1rem;
  }
  
  .adeuxpas-section-title {
    font-size: 1.8rem;
  }
  
  .adeuxpas-loc-card {
    width: 100%;
  }
  
  .adeuxpas-map {
    height: 320px;
  }
  
  .adeuxpas-map-legend {
    border-radius: var(--adp-radius);
    justify-content: center;
  }
}

/* ══════════════════════════════════════════
   CUSTOM MARKER STYLES
   ══════════════════════════════════════════ */

.adeuxpas-marker {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.adeuxpas-marker:hover {
  transform: scale(1.15);
}

.adeuxpas-marker.active {
  transform: scale(1.2);
  z-index: 10 !important;
}

/* Marker bounce animation */
@keyframes adeuxpas-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(-12px);
  }
  50% {
    transform: translateY(-6px);
  }
  75% {
    transform: translateY(-10px);
  }
}

.adeuxpas-marker.bouncing {
  animation: adeuxpas-bounce 0.6s ease-out;
}

/* ══════════════════════════════════════════
   CLUSTER STYLES
   ══════════════════════════════════════════ */

.adeuxpas-cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-family: var(--adp-font-alt);
  font-weight: 800;
  color: var(--adp-white);
  box-shadow: 0 4px 12px rgba(255,75,139,.4);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.adeuxpas-cluster:hover {
  transform: scale(1.1);
}

.adeuxpas-cluster-small {
  width: 40px;
  height: 40px;
  font-size: 0.9rem;
  background: var(--adp-pink);
}

.adeuxpas-cluster-medium {
  width: 50px;
  height: 50px;
  font-size: 1rem;
  background: var(--adp-purple);
}

.adeuxpas-cluster-large {
  width: 60px;
  height: 60px;
  font-size: 1.1rem;
  background: var(--adp-orange);
}
