/* ============================================================
   InstaSteam Store Locator – frontend styles
   ============================================================ */

/* ── Find Nearby button ──────────────────────────────────── */
.isp-find-nearby-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #ffffff;
  color: #2F9ED0;
  border: 2px solid #2F9ED0;
  border-radius: 6px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
  vertical-align: middle;
  margin-top: 10px;
}
.isp-find-nearby-btn:hover,
.isp-find-nearby-btn:focus-visible {
  background: #2F9ED0;
  color: #ffffff;
  outline: none;
}
.isp-find-nearby-btn svg { flex-shrink: 0; }

/* ── Shop page bar ───────────────────────────────────────── */
.isp-shop-bar {
  text-align: center;
  padding: 14px 0 6px;
}
.isp-shop-bar .isp-find-nearby-btn {
  margin-top: 0;
}

/* ── Homepage callout (injected via Elementor HTML widget) ── */
.isp-home-callout {
  text-align: center;
  padding: 16px 0 8px;
}
.isp-home-callout-text {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 10px;
}
.isp-home-callout .isp-find-nearby-btn {
  margin-top: 0;
}

/* ── Modal overlay ───────────────────────────────────────── */
#isp-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 99998;
  opacity: 0;
  transition: opacity 0.2s;
}
#isp-overlay.isp-visible {
  display: block;
  opacity: 1;
}

/* ── Modal dialog ────────────────────────────────────────── */
#isp-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  width: min(640px, 95vw);
  max-height: 90vh;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
  z-index: 99999;
  overflow: hidden;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}
#isp-modal.isp-visible {
  display: flex;
  opacity: 1;
  transform: translate(-50%, -50%);
}

#isp-modal-inner {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 26px 26px 0;
  height: 100%;
}

/* Close button */
#isp-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #888;
  padding: 2px 8px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
#isp-modal-close:hover { color: #111; background: #f0f0f0; }

/* Title */
#isp-modal-title {
  font-size: 21px;
  font-weight: 700;
  color: #111111;
  margin: 0 44px 18px 0;
  line-height: 1.3;
}

/* ── Search bar ──────────────────────────────────────────── */
#isp-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 0 14px;
  margin-bottom: 16px;
  background: #fafafa;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
}
#isp-search-wrap:focus-within {
  border-color: #2F9ED0;
  background: #ffffff;
}
#isp-search-wrap > svg { flex-shrink: 0; margin-right: 10px; }

#isp-address-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 13px 0;
  font-size: 15px;
  color: #111;
  outline: none;
  min-width: 0;
  font-family: inherit;
}
#isp-address-input::placeholder { color: #aaa; }

/* Autocomplete dropdown */
#isp-suggestions {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #dde0e3;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.13);
  list-style: none;
  margin: 0;
  padding: 5px 0;
  z-index: 100000;
  max-height: 230px;
  overflow-y: auto;
}
#isp-suggestions li {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  color: #222;
  border-radius: 5px;
  margin: 0 4px;
  transition: background 0.1s;
}
#isp-suggestions li:hover,
#isp-suggestions li[aria-selected="true"] {
  background: #EAF5FC;
  color: #2F9ED0;
}

/* ── Map ─────────────────────────────────────────────────── */
#isp-map {
  display: none;
  height: 260px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  margin-bottom: 14px;
  border: 1px solid #e8e8e8;
}

/* Custom markers */
.isp-pin-wrap { background: transparent !important; border: none !important; }
.isp-pin {
  width: 28px;
  height: 28px;
  background: #2F9ED0;
  color: #ffffff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}
.isp-pin > * { transform: rotate(45deg); }

.isp-you-icon { background: transparent !important; border: none !important; }
.isp-you-dot {
  width: 14px;
  height: 14px;
  background: #e84545;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* Popup */
.isp-popup { font-size: 13px; line-height: 1.7; min-width: 160px; }
.isp-popup strong { display: block; font-size: 14px; color: #111; margin-bottom: 2px; }
.isp-popup a { color: #2F9ED0; text-decoration: none; }
.isp-popup a:hover { text-decoration: underline; }
.isp-popup em { color: #999; font-size: 12px; }

/* ── Results panel ───────────────────────────────────────── */
#isp-results {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 16px;
  min-height: 60px;
}

.isp-loading { color: #999; text-align: center; padding: 24px 0; font-size: 15px; }
.isp-error   { color: #c00; text-align: center; padding: 24px 0; font-size: 15px; }

.isp-no-results {
  color: #555;
  text-align: center;
  padding: 22px 18px;
  font-size: 14px;
  line-height: 1.7;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  background: #fafafa;
  margin: 0;
}

/* Results list */
.isp-results-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.isp-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  border-bottom: 1px solid #f2f2f2;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.12s;
}
.isp-result-item:hover,
.isp-result-item:focus-visible {
  background: #EAF5FC;
  outline: none;
}
.isp-result-num {
  width: 26px;
  height: 26px;
  background: #2F9ED0;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.isp-result-info { flex: 1; min-width: 0; }
.isp-result-info strong {
  display: block;
  font-size: 14px;
  color: #111;
  margin-bottom: 2px;
}
.isp-result-info span {
  display: block;
  font-size: 13px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.isp-result-info a { color: #2F9ED0; text-decoration: none; }
.isp-result-info a:hover { text-decoration: underline; }
.isp-result-dist {
  font-size: 13px;
  font-weight: 600;
  color: #555;
  text-align: right;
  flex-shrink: 0;
  line-height: 1.4;
}
.isp-result-dist small { font-weight: 400; color: #999; }

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 600px) {
  #isp-modal {
    width: 100%;
    height: 100%;
    max-height: 100dvh;
    top: 0;
    left: 0;
    transform: none !important;
    border-radius: 0;
  }
  #isp-modal-inner { padding: 20px 16px 0; }
  #isp-modal-title { font-size: 18px; }
  #isp-map { height: 200px; }
  .isp-find-nearby-btn { font-size: 14px; padding: 9px 16px; }
}
