/* ============================================================
   Optica Store Locator — front-end styles (self-contained)
   Accent colour is overridable per-instance via --osl-accent.
   ============================================================ */

/* Grid of cards */
.opt-store-finder {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.opt-store-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.opt-store-finder-card-bordered .opt-store-card,
.opt-store-finder-card-both .opt-store-card { border: 1px solid #e5e7eb; }
.opt-store-finder-card-shadow .opt-store-card,
.opt-store-finder-card-both .opt-store-card { box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06); }
.opt-store-finder-card-shadow .opt-store-card:hover,
.opt-store-finder-card-both .opt-store-card:hover,
.opt-store-finder-card-bordered .opt-store-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.10);
}
.opt-store-card__media { width: 100%; aspect-ratio: 4 / 3; background: #f9fafb; overflow: hidden; }
.opt-store-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.opt-store-card__media--empty { background: repeating-linear-gradient(45deg, #f3f4f6 0 8px, #e5e7eb 8px 16px); }

/* ============================================================
   Map layout — left list pane, right Google Map
   ============================================================ */
.elementor-widget-optica-store-finder:has(.opt-store-locator),
.elementor-widget-optica-store-finder:has(.opt-store-locator) > .elementor-widget-container,
.elementor-widget-shortcode:has(.opt-store-locator),
.elementor-widget-shortcode:has(.opt-store-locator) > .elementor-widget-container {
  width: 100% !important;
  flex: 1 1 auto !important;
}
.opt-store-locator {
  display: grid;
  grid-template-columns: var(--osl-list, minmax(300px, 420px)) minmax(0, 1fr);
  width: 100%;
  border: 1px solid #eef0f3;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}
.opt-store-locator__list {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
  border-right: 1px solid #eef0f3;
}
.opt-store-locator__map { width: 100%; height: 100%; background: #f9fafb; }

.opt-store-locator__toolbar {
  padding: 14px 16px 12px;
  border-bottom: 1px solid #eef0f3;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}
.opt-store-locator__search {
  display: block;
  width: 100%;
  height: 36px;
  padding: 0 16px;
  border: 1px solid #d9dde3;
  border-radius: 999px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  color: #1a2332;
  background: #fff;
}
.opt-store-locator__search:focus {
  outline: none;
  border-color: var(--osl-accent, #1B9CD8);
  box-shadow: 0 0 0 3px rgba(27, 156, 216, 0.12);
}
.opt-store-locator__search::placeholder { color: #8a929c; }
.opt-store-locator__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.opt-store-locator__chip {
  border: 1px solid #d9dde3 !important;
  background: #fff !important;
  color: #6b7280 !important;
  font-family: 'Montserrat', sans-serif !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 6px 14px !important;
  border-radius: 999px !important;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.opt-store-locator__chip:hover,
.opt-store-locator__chip:focus {
  border-color: var(--osl-accent, #1B9CD8) !important;
  color: var(--osl-accent, #1B9CD8) !important;
  background: #fff !important;
  transform: none !important;
}
.opt-store-locator__chip--active,
.opt-store-locator__chip--active:hover,
.opt-store-locator__chip--active:focus {
  background: var(--osl-accent, #1B9CD8) !important;
  border-color: var(--osl-accent, #1B9CD8) !important;
  color: #fff !important;
}
.opt-store-locator__count { font-size: 11.5px; font-weight: 500; color: #8a929c; }
.opt-store-locator__empty { padding: 24px 18px; font-size: 13px; color: #6b7280; text-align: center; }

.opt-store-locator__items {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1 1 auto;
  scrollbar-width: thin;
  scrollbar-color: #d9dde3 transparent;
}
.opt-store-locator__items::-webkit-scrollbar { width: 5px; }
.opt-store-locator__items::-webkit-scrollbar-track { background: transparent; }
.opt-store-locator__items::-webkit-scrollbar-thumb { background: #d9dde3; border-radius: 999px; }
.opt-store-row { border-bottom: 1px solid #eef0f3; }
.opt-store-row:last-child { border-bottom: 0; }
/* Hard reset against any theme/page-builder global <button> styling. */
.opt-store-locator .opt-store-row__select {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 14px 16px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-align: inherit;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-family: 'Montserrat', sans-serif !important;
  cursor: pointer;
  color: #1a2332 !important;
  transition: background 150ms ease;
}
.opt-store-locator .opt-store-row__select:hover,
.opt-store-locator .opt-store-row__select:focus {
  background: #f9fafb !important;
  color: #1a2332 !important;
  transform: none !important;
}
.opt-store-locator .opt-store-row--active .opt-store-row__select,
.opt-store-locator .opt-store-row--active .opt-store-row__select:hover,
.opt-store-locator .opt-store-row--active .opt-store-row__select:focus {
  background: rgba(27, 156, 216, 0.08) !important;
  color: #1a2332 !important;
}
.opt-store-row--active .opt-store-row__select::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--osl-accent, #1B9CD8);
}
.opt-store-row__pin {
  width: 18px; height: 18px;
  flex-shrink: 0;
  color: #8a929c;
  margin-top: 2px;
  transition: color 150ms ease;
}
.opt-store-row__select:hover .opt-store-row__pin,
.opt-store-row--active .opt-store-row__pin { color: var(--osl-accent, #1B9CD8); }
.opt-store-row__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
.opt-store-row__title { font-size: 13.5px; font-weight: 600; color: #1a2332; line-height: 1.35; }
.opt-store-row__address { font-size: 12px; line-height: 1.4; color: #6b7280; }
.opt-store-row__hours {
  font-size: 11.5px;
  line-height: 1.45;
  color: #8a929c;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.opt-store-row__links { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 5px; }
.opt-store-row__phone,
.opt-store-row__directions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--osl-accent, #1B9CD8);
  text-decoration: none;
  transition: color 150ms ease;
}
.opt-store-row__phone:hover,
.opt-store-row__directions:hover { color: #0E6BAD; text-decoration: none; }
.opt-store-row__phone svg,
.opt-store-row__directions svg { width: 13px; height: 13px; flex-shrink: 0; }
.opt-store-row__directions svg { transition: transform 150ms ease; }
.opt-store-row__directions:hover svg { transform: translateX(2px); }

@media (max-width: 768px) {
  .opt-store-locator {
    grid-template-columns: 1fr;
    grid-template-rows: 280px minmax(0, 1fr);
    height: 640px !important;
  }
  .opt-store-locator__list { order: 2; border-right: 0; border-top: 1px solid #eef0f3; min-height: 0; }
  .opt-store-locator__map { order: 1; }
  .opt-store-finder { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .opt-store-row__select,
  .opt-store-locator__chip,
  .opt-store-row__directions svg { transition-duration: 0.01ms !important; }
}

/* Card body */
.opt-store-card__body { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.opt-store-card__title { margin: 0; font-size: 17px; font-weight: 700; color: var(--osl-accent, #1B9CD8); line-height: 1.2; }
.opt-store-card__loc { font-size: 12px; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase; color: #6b7280; }
.opt-store-card__desc { margin: 0; font-size: 13px; line-height: 1.5; color: #4b5563; }
.opt-store-card__meta { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.opt-store-card__meta li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.4; }
.opt-store-card__meta-icon { flex-shrink: 0; width: 18px; text-align: center; line-height: 1.4; font-size: 13px; }
.opt-store-card__meta-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.opt-store-card__meta-label { font-size: 10px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: #8a929c; }
.opt-store-card__meta-value { font-size: 13px; color: #1a2332; line-height: 1.4; }
.opt-store-card__meta-value a { color: inherit; text-decoration: none; border-bottom: 1px dotted #8a929c; }
.opt-store-card__meta-value a:hover { color: var(--osl-accent, #1B9CD8); border-bottom-color: var(--osl-accent, #1B9CD8); }
.opt-store-card__map-link { margin-top: 4px; align-self: flex-start; font-size: 13px; font-weight: 700; color: var(--osl-accent, #1B9CD8); text-decoration: none; letter-spacing: 0.3px; }
.opt-store-card__map-link:hover { text-decoration: underline; }

.opt-widget-placeholder { padding: 18px; border: 1px dashed #d9dde3; border-radius: 10px; color: #6b7280; font-size: 13px; background: #fafbfc; }
