/* Frontend styles for Google Map component */

.tm-block-google-map {
  --tm-map-margin-top: 0px;
  --tm-map-margin-bottom: 20px;
  --tm-map-height: 400px;
  
  margin-top: var(--tm-map-margin-top);
  margin-bottom: var(--tm-map-margin-bottom);
}

.tm-block-google-map__container {
  position: relative;
  width: 100%;
  margin-bottom: 20px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tm-block-google-map__map {
  width: 100%;
  height: var(--tm-map-height);
  background: #e0e0e0;
  border-radius: 8px;
}

/* Info section below map */
.tm-block-google-map__info {
  padding: 20px;
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 8px 8px;
}

.tm-block-google-map__info-title {
  margin: 0 0 16px 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #222;
}

.tm-block-google-map__info-content {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.tm-block-google-map__info-item {
  margin: 0;
  padding: 8px 0;
  font-size: 14px;
  color: #555;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tm-block-google-map__info-item i {
  color: #0073aa;
  font-size: 16px;
  min-width: 20px;
}

.tm-block-google-map__info-item a {
  color: #0073aa;
  text-decoration: none;
  word-break: break-word;
}

.tm-block-google-map__info-item a:hover {
  text-decoration: underline;
}

.tm-block-google-map__info-hours {
  grid-column: 1 / -1;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

.tm-block-google-map__info-hours-title {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: #222;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tm-block-google-map__info-hours-title i {
  color: #0073aa;
}

.tm-block-google-map__info-hours-list {
  margin: 0;
  padding: 8px 12px;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 12px;
  color: #555;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Info window dentro del mapa */
.tm-map-info-window {
  padding: 0;
  font-size: 13px;
}

.tm-map-info-window h4 {
  margin-bottom: 8px;
  color: #222;
}

.tm-map-info-window p {
  margin: 4px 0;
  color: #555;
  font-size: 12px;
}

.tm-map-info-window a {
  color: #0073aa;
  text-decoration: none;
}

.tm-map-info-window a:hover {
  text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
  .tm-block-google-map {
    --tm-map-height: 300px;
  }

  .tm-block-google-map__info {
    padding: 16px;
  }

  .tm-block-google-map__info-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
  }

  .tm-block-google-map__info-content {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tm-block-google-map__info-hours {
    grid-column: 1;
    margin-top: 8px;
    padding-top: 8px;
  }

  .tm-block-google-map__info-item {
    font-size: 13px;
    padding: 6px 0;
  }

  .tm-block-google-map__info-hours-list {
    font-size: 11px;
    padding: 8px;
  }
}

@media (max-width: 480px) {
  .tm-block-google-map {
    --tm-map-height: 250px;
  }

  .tm-block-google-map__info-title {
    font-size: 1.1rem;
    margin-bottom: 12px;
  }

  .tm-block-google-map__info {
    padding: 12px;
  }

  .tm-block-google-map__info-item {
    font-size: 12px;
  }

  .tm-block-google-map__info-item i {
    font-size: 14px;
  }
}

/* Animaciones */
.tm-block-google-map__map {
  animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Estado de carga (fallback) */
.tm-block-google-map__map[data-loading="true"] {
  background-image: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
