/* Pharmacies ticker styling with proper dark/light mode support */

.epragma-pharmacies-text {
  /* Default styling for light mode */
  color: #000;
  font-weight: 500;
}

.epragma-pharmacies-today-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  animation: epragma-pharmacies-today-blink 1.2s ease-in-out infinite;
}

@keyframes epragma-pharmacies-today-blink {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
    text-shadow: none;
  }
  50% {
    opacity: 0.55;
    transform: scale(1.05);
    text-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
  }
}

.epragma-pharmacies-entry {
  display: block;
}

.epragma-pharmacies-entry-separator {
  margin: 0 0.75rem;
  color: rgba(0, 0, 0, 0.55);
}

.epragma-pharmacies-phone-icon {
  margin-right: 0.25rem;
}

.epragma-pharmacies-phone-number {
  font-weight: 600;
}

.epragma-pharmacies-phone-link {
  text-decoration: none;
  color: inherit;
}

.epragma-pharmacies-map-icon {
  font-size: 1.1rem;
  display: inline-flex;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.epragma-pharmacies-map {
  min-height: 420px;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.epragma-pharmacies-table td,
.epragma-pharmacies-table th {
  vertical-align: middle;
}

.pharmacy-marker-highlight {
  animation: pharmacy-marker-pulse 1.5s ease-in-out 2;
}

@keyframes pharmacy-marker-pulse {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(59, 130, 246, 0));
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.8));
  }
}

/* Dark mode styling using the Tailwind dark mode class applied at the html/body level */
html.dark-mode .epragma-pharmacies-text,
body.dark-mode .epragma-pharmacies-text,
.dark-mode .epragma-pharmacies-text,
[data-theme="dark"] .epragma-pharmacies-text {
  color: #fff;
}

/* If you're using Tailwind's dark class on html element */
html.tw-dark .epragma-pharmacies-text {
  color: #fff;
}

/* Map popup styles */
.leaflet-popup-content {
  margin: 12px 16px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e0 #f7fafc;
}

.leaflet-popup-content::-webkit-scrollbar {
  width: 6px;
}

.leaflet-popup-content::-webkit-scrollbar-track {
  background: #f7fafc;
  border-radius: 3px;
}

.leaflet-popup-content::-webkit-scrollbar-thumb {
  background-color: #cbd5e0;
  border-radius: 3px;
}

.leaflet-popup-content-wrapper {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.leaflet-popup-content p {
  margin: 4px 0;
  line-height: 1.4;
}

.pharmacies-marker-schedule {
  margin: 8px 0 0 0;
  padding-left: 16px;
}

.pharmacies-marker-schedule li {
  margin: 4px 0;
  font-size: 0.9em;
  color: #4a5568;
}

.leaflet-popup-content a {
  color: #3182ce;
  text-decoration: none;
}

.leaflet-popup-content a:hover {
  text-decoration: underline;
}

/* Phone number styles */
.pharmacy-phones {
  margin-top: 8px;
}

.pharmacy-phone-item {
  display: flex;
  align-items: center;
  margin: 6px 0;
  line-height: 1.3;
}

.pharmacy-phone-icon {
  margin-right: 8px;
  flex-shrink: 0;
  opacity: 0.8;
}

.pharmacy-phone-link {
  color: #3182ce;
  text-decoration: none;
  display: inline-block;
  vertical-align: middle;
}

.pharmacy-phone-link:hover {
  text-decoration: underline;
  color: #2c5282;
}

/* Dark mode adjustments */
.leaflet-popup-content-wrapper {
  background-color: #fff;
}

.leaflet-popup-content-wrapper.dark {
  background-color: #2d3748;
}

.leaflet-popup-content-wrapper.dark .pharmacy-phone-link {
  color: #90cdf4;
}

.leaflet-popup-content-wrapper.dark .pharmacy-phone-link:hover {
  color: #63b3ed;
}
