/* DELEGATIONS MAP component (Home + Delegations page)
   Extracted from components.css (CWV optimization): page-specific styles
   moved out of the global async "default" bundle. Loaded via the 'home' group and the Delegations template */

/* ========================================================================
   Delegations Map
   ======================================================================== */

.sc-delegations-map {
  padding: var(--sc-section-space) 0;
  background: #f8f9fa;
}

.sc-delegations-header {
  text-align: center;
  margin-bottom: 48px;
}

.sc-section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-brand);
  margin: 0 0 16px 0;
}

.sc-section-description {
  font-size: 1.125rem;
  color: #6b7280;
  margin: 0;
}

.sc-delegations-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 1024px) {
  .sc-delegations-layout {
    grid-template-columns: 1fr;
  }
}

/* Google Map Container */
.sc-delegations-map-container {
  position: sticky;
  top: 100px;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.sc-google-map {
  width: 100%;
  height: 500px;
  min-height: 400px;
  /* El contenedor del mapa nunca debe bloquear el scroll vertical de la página */
  touch-action: pan-y;
}

/* Placeholder ligero (sin WebGL, sin listeners bloqueantes) que se muestra
   hasta que el usuario pulsa para cargar el mapa real de Google Maps. */
.sc-map-placeholder {
  width: 100%;
  height: 500px;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  color: var(--color-ink);
  background: linear-gradient(135deg, #eef2f7 0%, #dbe4ee 100%);
  transition: filter 0.15s ease;
}

.sc-map-placeholder:hover {
  filter: brightness(0.97);
}

.sc-map-placeholder__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

@media (max-width: 1024px) {
  .sc-delegations-map-container {
    position: relative;
    top: 0;
  }

  .sc-google-map,
  .sc-map-placeholder {
    height: 400px;
  }
}

/* Delegations List */
.sc-delegations-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sc-delegation-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  gap: 20px;
  transition: all 0.3s ease;
}

.sc-delegation-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.sc-delegation-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--color-brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.sc-delegation-icon svg {
  width: 24px;
  height: 24px;
}

.sc-delegation-info {
  flex: 1;
}

.sc-delegation-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-ink);
  margin: 0 0 12px 0;
}

.sc-delegation-address,
.sc-delegation-contact {
  font-size: 0.9375rem;
  color: #6b7280;
  margin: 0 0 8px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.sc-delegation-address svg,
.sc-delegation-contact svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #9ca3af;
}

.sc-delegation-contact a {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s ease;
}

.sc-delegation-contact a:hover {
  color: var(--color-ink);
}

.sc-delegation-schedule {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: #6b7280;
  margin: 12px 0;
}

.sc-delegation-schedule svg {
  flex-shrink: 0;
  color: #9ca3af;
}

.sc-delegation-directions-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--color-ink);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 12px;
}

.sc-delegation-directions-btn:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--color-ink-rgb), 0.3);
}

.sc-delegation-directions-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.sc-delegation-directions-btn:hover svg {
  transform: translateX(4px);
}

/* Responsive */
@media (max-width: 768px) {
  .sc-delegations-map {
    padding: 48px 0;
  }

  .sc-section-title {
    font-size: 1.5rem;
  }

  .sc-delegation-card {
    flex-direction: column;
    text-align: center;
  }

  .sc-delegation-icon {
    margin: 0 auto;
  }

  .sc-delegation-address,
  .sc-delegation-contact,
  .sc-delegation-schedule {
    justify-content: center;
  }

  .sc-delegation-directions-btn {
    width: 100%;
  }
}

