/* Glassmorphic Interactive Range Map Widget Styles */

.range-map-card {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 380px;
  background: rgba(15, 23, 42, 0.85); /* Sleek dark-mode glass background */
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  padding: 16px;
  color: #ffffff;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.range-map-card.shown {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.range-map-card.pinned {
  border-color: rgba(76, 175, 80, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(76, 175, 80, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.rm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

.rm-title {
  font-weight: 700;
  font-size: 15px;
  color: #ffffff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.rm-title i {
  color: #4CAF50;
  font-size: 16px;
}

.rm-close {
  background: transparent !important;
  border: none !important;
  color: rgba(255, 255, 255, 0.6) !important;
  font-size: 22px !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
  transition: color 0.2s, transform 0.2s !important;
  width: auto !important;
  height: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.rm-close:hover {
  color: #ef4444 !important;
  transform: scale(1.1);
}

.rm-selector-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rm-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 700;
  margin-bottom: 2px;
}

.rm-select {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.rm-select:hover, .rm-select:focus {
  border-color: #4CAF50;
  background: rgba(30, 41, 59, 0.9);
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.rm-select option {
  background: #1e293b;
  color: #ffffff;
}

.rm-map-container {
  height: 240px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

#range-map-leaflet {
  width: 100%;
  height: 100%;
  background: #0f172a;
}

/* Info pill inside map */
.rm-info-pill {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  margin-top: 4px;
}

.rm-info-pill strong {
  color: #4CAF50;
}

/* Custom interactive styling for specs table Range row */
.range-interactive-row {
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  position: relative;
}

.range-interactive-row:hover {
  background: rgba(76, 175, 80, 0.06) !important;
}

.range-interactive-row td {
  position: relative;
}

.range-interactive-row td:first-child::after {
  content: " \f4a4"; /* Bootstrap-icons map symbol code */
  font-family: "bootstrap-icons" !important;
  color: #4CAF50;
  font-size: 12px;
  margin-left: 6px;
  opacity: 0.7;
}

.range-interactive-row td:nth-child(2) {
  color: #4CAF50 !important;
  font-weight: 700;
  text-decoration: underline dotted;
  transition: color 0.2s;
}

.range-interactive-row:hover td:nth-child(2) {
  color: #388e3c !important;
}

/* Custom leaflet glowing pulse animation */
.leaflet-popup-content-wrapper {
  background: rgba(15, 23, 42, 0.95) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
}

.leaflet-popup-tip {
  background: rgba(15, 23, 42, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Mobile responsive fixes */
@media (max-width: 576px) {
  .range-map-card {
    width: calc(100% - 32px);
    left: 16px;
    bottom: 16px;
    right: 16px;
  }
}
