/* ============================================================================
   SATELLITE POPUP MODERN STYLES
   ============================================================================ */

/* Popup Container */
.satellite-popup-modern {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  width: 360px;
  padding: 0;
  color: #1f2937;
  background: #ffffff;
}

/* Header Section */
.popup-header {
  padding: 18px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.popup-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.popup-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  letter-spacing: -0.02em;
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-left: 12px;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9);
  animation: pulse-status 2s ease-in-out infinite;
}

@keyframes pulse-status {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.popup-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Assignment Badges */
.assignment-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid;
}

.assignment-badge.assigned {
  background-color: #d1fae5;
  color: #065f46;
  border-color: #6ee7b7;
}

.assignment-badge.available {
  background-color: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}

/* Section Styling */
.popup-section {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.popup-section:last-of-type {
  border-bottom: none;
}

.popup-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  margin-bottom: 12px;
}

/* Assignment Info */
.assignment-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.assignment-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.assignment-label {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  min-width: 100px;
}

.assignment-value {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  background-color: #f9fafb;
  padding: 6px 12px;
  border-radius: 6px;
  flex: 1;
  border: 1px solid #e5e7eb;
}

.no-assignment {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  background-color: #fefce8;
  border-radius: 8px;
  border: 1px dashed #facc15;
  color: #854d0e;
  font-size: 13px;
  font-weight: 500;
}

/* Telemetry Grid */
.telemetry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.telemetry-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: #f9fafb;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.telemetry-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
}

.telemetry-value {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.01em;
}

/* Location Info */
.location-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f9fafb;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.location-coords {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  font-family: 'Monaco', 'Courier New', monospace;
  letter-spacing: -0.02em;
}

.coord-label {
  font-weight: 700;
  color: #6b7280;
}

.coord-separator {
  margin: 0 8px;
  color: #9ca3af;
}

.location-time {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

/* Action Buttons */
.popup-actions {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  background-color: #ffffff;
  border-top: 1px solid #e5e7eb;
}

.popup-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.popup-btn-primary {
  background-color: #3b82f6;
  color: white;
  box-shadow: 0 1px 3px rgba(59, 130, 246, 0.3);
}

.popup-btn-primary:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.popup-btn-secondary {
  background-color: #f3f4f6;
  color: #4b5563;
  border: 1px solid #d1d5db;
}

.popup-btn-secondary:hover {
  background-color: #e5e7eb;
  border-color: #9ca3af;
}

/* Mapbox Popup Customization */
.mapboxgl-popup {
  max-width: none !important;
}

.mapboxgl-popup-content {
  padding: 0 !important;
  border-radius: 12px !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 0 1px rgba(0, 0, 0, 0.1) !important;
  overflow: visible !important;
  background: #ffffff !important;
  max-width: none !important;
}

.mapboxgl-popup-close-button {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  width: 28px !important;
  height: 28px !important;
  font-size: 20px !important;
  color: #6b7280 !important;
  padding: 0 !important;
  background-color: #f3f4f6 !important;
  border-radius: 50% !important;
  margin: 0 !important;
  transition: all 0.15s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 1000 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.mapboxgl-popup-close-button:hover {
  background-color: #e5e7eb !important;
  color: #111827 !important;
  transform: scale(1.05) !important;
}

.mapboxgl-popup-tip {
  border-top-color: #ffffff !important;
  border-bottom-color: #ffffff !important;
}

/* Availability Badge on Marker */
.availability-badge {
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

/* Node Marker Hover Effect */
.node-marker {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.node-marker:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}
