/* ==========================================================================
   DSI Tyres - Interactive Dealer Map Styles
   ========================================================================== */

.dealer_map_section {
  position: relative;
}

.color{
  color: #c9c1b2;
}

/* Filter Bar */
.dealer_filter_bar {
  background: #ffffff;
  transition: box-shadow 0.25s ease;
}

.dealer_filter_bar:focus-within {
  box-shadow: 0 8px 24px rgba(227, 6, 19, 0.08) !important;
  border-color: rgba(227, 6, 19, 0.3) !important;
}

/* Map Wrapper */
.map_wrapper {
  background: #f4f6f8;
  height: 620px;
  max-height: 80vh;
}

#dsiMap {
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Count Badge */
.map_count_badge {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 500;
  background: rgba(23, 23, 23, 0.85);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

/* ==========================================================================
   Custom Marker Pin Styles (Sleek DSI Red Marker)
   ========================================================================== */

.dsi_marker_pin {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e30613; /* DSI Tyre Red */
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 10px;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.dsi_marker_pin::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #e30613;
}

.dsi_marker_pin:hover,
.dsi_marker_pin.active {
  transform: scale(1.25) translateY(-3px);
  box-shadow: 0 4px 12px rgba(227, 6, 19, 0.5);
  z-index: 9999 !important;
}

/* ==========================================================================
   Leaflet Tooltip (Sleek Mini Hover Badge)
   ========================================================================== */

.dsi_mini_tooltip {
  background: #111827 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 6px !important;
  padding: 4px 10px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}

.dsi_mini_tooltip::before {
  border-top-color: #111827 !important;
}

/* ==========================================================================
   Leaflet Popup / Popover Card
   ========================================================================== */

.leaflet-popup-content-wrapper {
  padding: 0 !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16) !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  line-height: 1.4 !important;
  width: 280px !important;
}

.leaflet-popup-tip-container {
  margin-top: -1px;
}

/* Custom Popover Content Body */
.dealer_popover_card {
  font-family: inherit;
  background: #ffffff;
}

.dealer_popover_header {
  background: linear-gradient(135deg, #1f1f1f 0%, #0d0d0d 100%);
  color: #ffffff;
  padding: 14px 16px;
  position: relative;
}

.dealer_popover_title {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
  line-height: 1.3;
}

.dealer_popover_body {
  padding: 14px 16px;
  font-size: 12.5px;
  color: #4b5563;
}

.dealer_popover_item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.dealer_popover_item:last-child {
  margin-bottom: 0;
}

.dealer_popover_item i {
  color: #A67100;
  font-size: 13px;
  margin-top: 2px;
  flex-shrink: 0;
}

.dealer_popover_actions {
  padding: 10px 16px 14px;
  background: #fafafa;
  border-top: 1px solid #f0f0f0;
  display: flex;
  gap: 8px;
}

.dealer_popover_actions .btn {
  font-size: 12px;
  padding: 6px 12px;
  font-weight: 600;
  border-radius: 8px;
  flex: 1;
}

.btn_dealer_call {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  color: #1f1f1f !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn_dealer_call:hover {
  background: #ededed;
  color: #000;
}

.btn_dealer_directions {
  background: #A67100;
  border: 1px solid #A67100;
  color: #ffffff !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn_dealer_directions:hover {
  background: #151515;
  border-color: #151515;
  color: #ffffff;
}

/* Close button tweak */
.leaflet-container a.leaflet-popup-close-button {
  top: 8px !important;
  right: 10px !important;
  color: #ffffff !important;
  font-size: 18px !important;
  width: 20px !important;
  height: 20px !important;
  padding: 0 !important;
}

.leaflet-container a.leaflet-popup-close-button:hover {
  color: #e30613 !important;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  /* Disable tooltip on tablets and mobile screens */
  .dsi_mini_tooltip,
  .leaflet-tooltip-pane {
    display: none !important;
    visibility: hidden !important;
  }
}

@media (max-width: 768px) {
  .map_wrapper {
    height: 480px;
  }
  .dealer_popover_content {
    width: 250px !important;
  }
}

