/* StockDivar v760 stability fixes: theme, drawers, real map, and footer contrast. */

.site-theme-toggle {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 14px;
  color: var(--text, #1f2937);
  background: var(--surface, #fff);
}

.listing-map {
  overflow: hidden;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 20px;
  background: var(--surface, #fff);
}

.listing-map[hidden],
.map-unavailable[hidden],
.category-drawer-item[hidden],
.product-category-item[hidden] {
  display: none !important;
}

.listing-map iframe {
  display: block;
  width: 100%;
  height: 360px;
  border: 0;
  background: #e9edf2;
}

.listing-map-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
}

.listing-map-meta strong,
.listing-map-meta small { display: block; }
.listing-map-meta small { color: var(--muted, #6b7280); }
.listing-map-link { flex: 0 0 auto; }

.map-unavailable {
  min-height: 190px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border: 1px dashed var(--line-strong, #d1d5db);
  border-radius: 20px;
  background: var(--surface, #fff);
}

.map-unavailable > span { font-size: 40px; }
.map-unavailable strong,
.map-unavailable small { display: block; }
.map-unavailable small { color: var(--muted, #6b7280); }
.map-unavailable a { color: #a71928; font-weight: 900; }

.site-footer .owner-line {
  color: #fff !important;
}

.site-footer .owner-line strong {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.16) !important;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  font-size: 15px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

.panel-footer strong {
  color: inherit;
  font-weight: 900;
}

html[data-theme="dark"] .listing-map,
html[data-theme="dark"] .listing-map-meta,
html[data-theme="dark"] .map-unavailable,
body.dark-mode .listing-map,
body.dark-mode .listing-map-meta,
body.dark-mode .map-unavailable {
  color: #f8fafc;
  background: #111827;
  border-color: #334155;
}

html[data-theme="dark"] .site-theme-toggle,
body.dark-mode .site-theme-toggle {
  color: #f8fafc;
  background: #172031;
  border-color: #334155;
}

@media (max-width: 680px) {
  .site-theme-toggle .theme-text { display: none; }
  .listing-map iframe { height: 300px; }
  .listing-map-meta { align-items: stretch; flex-direction: column; }
  .listing-map-link { width: 100%; }
  .map-unavailable { grid-template-columns: auto 1fr; }
  .map-unavailable a { grid-column: 1 / -1; }
}
