/* ============================================================
   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, border-color 0.18s, transform 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;
  transform: scale(1.05);
  outline: none;
}
.isp-find-nearby-btn svg { flex-shrink: 0; }

/* ── Product page – primary (solid blue, white text, inline with Add to Cart) */
form.cart:not(.grouped_form) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
form.cart:not(.grouped_form) .quantity { margin-right: 0; }
form.cart .isp-find-nearby-btn {
  background: #2F9ED0;
  color: #ffffff;
  border-color: #2F9ED0;
  margin-top: 0;
  margin-left: 0;
}
form.cart .isp-find-nearby-btn:hover,
form.cart .isp-find-nearby-btn:focus-visible {
  background: #1c85b8;
  border-color: #1c85b8;
  color: #ffffff;
  transform: scale(1.05);
}

/* ── 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: left;
  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; position: relative; }
.isp-pin-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: #000000;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.32);
}
.isp-pin-img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  object-fit: cover;
}
.isp-pin-num {
  position: absolute;
  right: -4px;
  bottom: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  background: #2F9ED0;
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.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 — card-based, one store per card */
.isp-results-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.isp-result-card {
  border: 1px solid #eceff1;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  background: #ffffff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.isp-result-card:hover,
.isp-result-card:focus-visible {
  border-color: #2F9ED0;
  box-shadow: 0 4px 14px rgba(47, 158, 208, 0.14);
  outline: none;
}
.isp-result-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.isp-result-num {
  width: 24px;
  height: 24px;
  background: #2F9ED0;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.isp-result-name-block { flex: 1; min-width: 0; }
.isp-result-name-block strong {
  display: block;
  font-size: 14.5px;
  color: #111;
  margin-bottom: 2px;
}
.isp-result-addr {
  display: block;
  font-size: 12.5px;
  color: #666;
  line-height: 1.4;
}
.isp-result-dist-pill {
  flex-shrink: 0;
  background: #EAF5FC;
  color: #2F9ED0;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.isp-result-phone {
  margin: 6px 0 0 34px;
  font-size: 12.5px;
}
.isp-result-phone a { color: #2F9ED0; text-decoration: none; }
.isp-result-phone a:hover { text-decoration: underline; }
.isp-result-website {
  margin: 6px 0 0 34px;
  font-size: 12.5px;
}
.isp-result-website a { color: #2F9ED0; text-decoration: none; }
.isp-result-website a:hover { text-decoration: underline; }
.isp-result-indent { margin-left: 34px; }

/* Stock section */
.isp-stock-section { margin: 8px 0 0 34px; }
.isp-stock-summary {
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 6px;
}
.isp-stock-summary.isp-stock-yes  { color: #15803d; }
.isp-stock-summary.isp-stock-no   { color: #b91c1c; }
.isp-stock-summary.isp-stock-call { color: #888; }
.isp-stock-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.isp-stock-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.isp-stock-chip.isp-stock-instock { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.isp-stock-chip.isp-stock-out     { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.isp-stock-chip.isp-stock-unknown { background: #f5f5f5; color: #666;    border-color: #e5e5e5; }
.isp-stock-freshness {
  font-size: 10.5px;
  color: #999;
  margin-top: 6px;
}

/* ── Filter bar ──────────────────────────────────────────── */
#isp-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0 12px;
  flex-shrink: 0;
}
#isp-filter-bar > svg {
  flex-shrink: 0;
  color: #2F9ED0;
}
#isp-filter-bar label {
  font-size: 13px;
  font-weight: 600;
  color: #555;
  white-space: nowrap;
}
#isp-product-filter {
  flex: 1;
  padding: 6px 10px;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  background: #fafafa;
  cursor: pointer;
  min-width: 0;
}
#isp-product-filter:focus {
  outline: 2px solid #2F9ED0;
  border-color: #2F9ED0;
}

/* ── Coming soon badge ───────────────────────────────────── */
.isp-coming-soon {
  display: inline-block;
  margin-top: 5px;
  background: #fdf3e0;
  color: #b8860b;
  border: 1px solid #f0d9a6;
  border-radius: 3px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* ── 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; }
}

/* ============================================================
   Dedicated Store Locator page — [isp_locator_page]
   Reuses every .isp-result-card / .isp-stock-* / .isp-pin-* /
   .isp-popup / .isp-coming-soon / .isp-no-results class above
   (rendered by the same JS engine as the modal) — only the page's
   own layout chrome is defined here.

   Full-bleed layout (matches the Cellini Luggage reference): a
   fixed-width sidebar (search, filter, results list) on the left,
   with the map filling every remaining pixel out to the true
   right edge of the browser — no page-level max-width, no gap.
   ============================================================ */
.isp-page-locator {
  max-width: none;
  margin: 0;
  padding: 0;
}

.isp-page-header {
  text-align: center;
  padding: 32px 24px 22px;
}
.isp-page-title {
  font-size: 32px;
  font-weight: 800;
  color: #111111;
  margin: 0 0 8px;
  line-height: 1.2;
}
.isp-page-subtitle {
  font-size: 15px;
  color: #666666;
  margin: 0;
}

.isp-page-body {
  display: flex;
  align-items: stretch;
}

#isp-page-sidebar {
  flex: 0 0 380px;
  width: 380px;
  min-width: 0;
  padding: 0 20px 40px 24px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

#isp-page-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 0 14px;
  background: #fafafa;
  flex-shrink: 0;
  margin-bottom: 10px;
  transition: border-color 0.15s, background 0.15s;
}
#isp-page-search-wrap:focus-within {
  border-color: #2F9ED0;
  background: #ffffff;
}
#isp-page-search-wrap > svg { flex-shrink: 0; margin-right: 10px; }
#isp-page-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-page-address-input::placeholder { color: #aaa; }

#isp-page-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: 1000;
  max-height: 260px;
  overflow-y: auto;
}
#isp-page-suggestions li {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  color: #222;
  border-radius: 5px;
  margin: 0 4px;
  transition: background 0.1s;
}
#isp-page-suggestions li:hover,
#isp-page-suggestions li[aria-selected="true"] {
  background: #EAF5FC;
  color: #2F9ED0;
}

#isp-page-filter-bar {
  display: none;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-bottom: 12px;
}
#isp-page-filter-bar > svg { flex-shrink: 0; color: #2F9ED0; }
#isp-page-filter-bar label {
  font-size: 13px;
  font-weight: 600;
  color: #555;
  white-space: nowrap;
}
#isp-page-product-filter {
  flex: 1;
  padding: 10px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 13.5px;
  font-family: inherit;
  background: #fafafa;
  cursor: pointer;
  min-width: 0;
}
#isp-page-product-filter:focus {
  outline: none;
  border-color: #2F9ED0;
  background: #ffffff;
}

.isp-page-status {
  color: #999;
  font-size: 12.5px;
  line-height: 1.5;
  margin: 0 0 14px;
  flex-shrink: 0;
}

#isp-page-results {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
  padding-bottom: 16px;
  min-height: 0;
}
#isp-page-results .isp-result-card { background: #ffffff; }

#isp-page-map {
  flex: 1 1 auto;
  min-width: 0;
  height: 78vh;
  min-height: 560px;
  background: #f4f4f4;
}

@media (max-width: 900px) {
  .isp-page-body {
    flex-direction: column;
  }
  #isp-page-sidebar {
    flex: none;
    width: 100%;
    padding: 0 20px 24px;
    max-height: none;
  }
  #isp-page-results {
    max-height: 50vh;
    flex: none;
  }
  #isp-page-map { flex: none; width: 100%; height: 360px; order: -1; }
}

@media (max-width: 600px) {
  .isp-page-header { padding: 24px 16px 16px; }
  .isp-page-title { font-size: 24px; }
  #isp-page-sidebar { padding: 0 16px 20px; }
  #isp-page-map { height: 280px; }
}
