/* ============================================================
   marine-styles.css — Stat cards, buoy panel, wind barbs
   Dark glass theme matching Weather Compass main app.
   ============================================================ */

/* ---- Stat cards row ---- */
.marine-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 0 12px;
  margin-bottom: 14px;
}
@media (max-width: 600px) {
  .marine-stat-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.marine-stat-card {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 14px 12px;
  text-align: center;
  color: var(--ink, #e2e8f0);
}
.marine-stat-card .stat-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.55;
  margin-bottom: 4px;
}
.marine-stat-card .stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}
.marine-stat-card .stat-unit {
  display: block;
  font-size: 0.7rem;
  opacity: 0.5;
  margin-top: 2px;
}

/* ---- Buoy data panel ---- */
.buoy-panel {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 16px;
  margin: 0 12px 14px;
  color: var(--ink, #e2e8f0);
}
.buoy-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.buoy-panel-head h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}
.buoy-panel-head .buoy-count {
  font-size: 0.75rem;
  opacity: 0.5;
}
.buoy-panel-status {
  font-size: 0.82rem;
  opacity: 0.6;
  text-align: center;
  padding: 18px 0;
}

.buoy-list {
  max-height: 420px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.buoy-list::-webkit-scrollbar {
  width: 4px;
}
.buoy-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
}

.buoy-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  transition: background 0.15s;
}
.buoy-item:hover {
  background: rgba(255,255,255,0.08);
}
.buoy-item:last-child {
  margin-bottom: 0;
}

.buoy-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.buoy-id {
  font-weight: 700;
  font-size: 0.9rem;
  color: #60a5fa;
}
.buoy-dist {
  font-size: 0.72rem;
  opacity: 0.5;
}

.buoy-readings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px 10px;
}
@media (max-width: 420px) {
  .buoy-readings {
    grid-template-columns: repeat(2, 1fr);
  }
}

.buoy-reading {
  font-size: 0.78rem;
}
.buoy-reading .br-label {
  opacity: 0.5;
  margin-right: 4px;
}
.buoy-reading .br-val {
  font-weight: 600;
}

/* ---- Wind barb marker on map ---- */
.wind-barb-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
.wind-barb-icon svg {
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

/* ---- Buoy marker on map ---- */
.buoy-marker-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
.buoy-marker-icon .buoy-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #60a5fa;
  border: 2px solid rgba(255,255,255,0.9);
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* ---- Leaflet popup overrides for dark theme ---- */
.leaflet-popup-content-wrapper {
  background: rgba(15,23,42,0.92) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #e2e8f0 !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
}
.leaflet-popup-tip {
  background: rgba(15,23,42,0.92) !important;
}
.leaflet-popup-content {
  margin: 10px 14px !important;
  font-size: 0.82rem !important;
  line-height: 1.5 !important;
}
.leaflet-popup-content strong {
  color: #60a5fa;
}

/* ---- Map layer toggle ---- */
.map-layer-toggle {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  padding: 0 4px;
}
.map-layer-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: var(--ink, #e2e8f0);
  font-size: 0.72rem;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.map-layer-btn:hover {
  background: rgba(255,255,255,0.12);
}
.map-layer-btn.active {
  background: rgba(96,165,250,0.2);
  border-color: #60a5fa;
  color: #93c5fd;
}
