/* satellite-allsky.css - Circular display, canvas overlays, compass styling */

.allsky-section {
  margin-bottom: var(--spacing-lg);
}

.allsky-display-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.5) 0%, rgba(30, 41, 59, 0.8) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: var(--spacing-lg);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

/* AllSky Container */
.allsky-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 20px auto;
}

.allsky-image-wrapper {
  position: relative;
  width: 600px;
  height: 600px;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #64b5f6;
  box-shadow: 
    0 0 30px rgba(37, 99, 235, 0.3),
    inset 0 0 30px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  background: radial-gradient(circle, #001122 0%, #000000 100%);
}

.allsky-image-wrapper:hover {
  border-color: #2196f3;
  box-shadow: 
    0 0 40px rgba(37, 99, 235, 0.5),
    inset 0 0 30px rgba(0, 0, 0, 0.5);
  transform: scale(1.02);
}

.allsky-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  filter: brightness(0.8) contrast(1.1);
  transition: filter 0.3s ease;
}

.allsky-image-wrapper:hover .allsky-image {
  filter: brightness(0.9) contrast(1.2);
}

/* Error Overlay - styled to match the camera offline message */
.allsky-error-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, #001122 0%, #000000 100%);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 5;
  border-radius: 50%;
}

.allsky-error-overlay > div:first-child {
  font-size: 3rem;
  margin-bottom: 10px;
}

.allsky-error-overlay > div:nth-child(3) {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 5px;
  color: #ff9800;
}

.allsky-display {
  position: relative;
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-color);
  box-shadow: 
    0 0 30px rgba(37, 99, 235, 0.3),
    inset 0 0 30px rgba(0, 0, 0, 0.5);
  transition: all var(--transition-fast);
}

.allsky-display:hover {
  border-color: var(--primary-color);
  box-shadow: 
    0 0 40px rgba(37, 99, 235, 0.5),
    inset 0 0 30px rgba(0, 0, 0, 0.5);
  transform: scale(1.02);
}

.allsky-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  pointer-events: none;
}

.satellite-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  z-index: 10;
  pointer-events: auto;
}

/* Compass overlay */
.compass-overlay {
  position: absolute;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  border-radius: 50%;
  z-index: 5;
  pointer-events: none;
}

.compass-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  height: 90%;
  border-radius: 50%;
  border: 1px solid rgba(37, 99, 235, 0.3);
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.allsky-display:hover .compass-ring {
  opacity: 1;
}

.compass-directions {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 15;
}

.compass-directions .direction {
  position: absolute;
  color: #4caf50;
  font-size: 20px;
  font-weight: bold;
  text-shadow: 
    0 0 10px rgba(76, 175, 80, 0.8),
    0 0 20px rgba(76, 175, 80, 0.5),
    2px 2px 4px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

.direction-marker {
  position: absolute;
  transform-origin: center;
  color: var(--primary-color);
  font-size: 0.875rem;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
  pointer-events: none;
}

.direction-marker.north {
  top: -8%;
  left: 50%;
  transform: translateX(-50%);
}

.direction-marker.east {
  top: 50%;
  right: -8%;
  transform: translateY(-50%);
}

.direction-marker.south {
  bottom: -8%;
  left: 50%;
  transform: translateX(-50%);
}

.direction-marker.west {
  top: 50%;
  left: -8%;
  transform: translateY(-50%);
}

/* AllSky Status Bar */
.allsky-status {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-top: 20px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(100, 181, 246, 0.2);
}

.allsky-status > div {
  color: #b0bec5;
  font-size: 0.9rem;
}

.satellite-count {
  color: #64b5f6;
  font-weight: 600;
}

.location-info {
  color: #fff;
}

.compass-confidence {
  color: #4caf50;
}

/* Elevation circles */
.elevation-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px dashed rgba(6, 182, 212, 0.2);
  pointer-events: none;
}

.elevation-30 {
  width: 60%;
  height: 60%;
}

.elevation-60 {
  width: 30%;
  height: 30%;
}

.elevation-label {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--secondary-color);
  font-size: 0.625rem;
  font-weight: 500;
  opacity: 0.6;
}

/* Satellite markers */
.satellite-marker {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-color);
  border: 2px solid white;
  box-shadow: 
    0 0 10px rgba(16, 185, 129, 0.8),
    0 2px 4px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 15;
  transform: translate(-50%, -50%);
}

.satellite-marker:hover,
.satellite-marker.selected {
  width: 16px;
  height: 16px;
  background: var(--warning-color);
  box-shadow: 
    0 0 20px rgba(245, 158, 11, 1),
    0 4px 8px rgba(0, 0, 0, 0.4);
  z-index: 20;
}

.satellite-marker.iss {
  background: var(--error-color);
  animation: pulse-iss 2s infinite;
}

@keyframes pulse-iss {
  0%, 100% { 
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
  }
  50% { 
    box-shadow: 0 0 25px rgba(239, 68, 68, 1);
  }
}

/* Satellite paths */
.satellite-path {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 8;
}

.path-line {
  stroke: var(--secondary-color);
  stroke-width: 2;
  fill: none;
  opacity: 0.6;
  stroke-dasharray: 5, 5;
  animation: dash-move 10s linear infinite;
}

.path-line.selected {
  stroke: var(--warning-color);
  stroke-width: 3;
  opacity: 0.9;
  animation: dash-move-selected 5s linear infinite;
}

@keyframes dash-move {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 50; }
}

@keyframes dash-move-selected {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 25; }
}

/* Satellite labels */
.satellite-label {
  position: absolute;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-primary);
  padding: var(--spacing-sm);
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  z-index: 25;
  transform: translate(-50%, -100%);
  margin-top: -8px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.satellite-marker:hover + .satellite-label,
.satellite-marker.selected + .satellite-label {
  opacity: 1;
}

.satellite-label::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--border-color);
}

/* Info panel */
.allsky-info {
  position: absolute;
  top: var(--spacing-md);
  left: var(--spacing-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--spacing-sm);
  font-size: 0.75rem;
  color: var(--text-secondary);
  backdrop-filter: blur(10px);
  z-index: 30;
  min-width: 150px;
}

.allsky-info-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--spacing-sm);
}

.allsky-info-item:last-child {
  margin-bottom: 0;
}

.info-label {
  color: var(--text-muted);
}

.info-value {
  color: var(--text-primary);
  font-weight: 500;
}

/* Zoom controls */
.zoom-controls {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  z-index: 30;
}

.zoom-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 1rem;
  font-weight: bold;
  backdrop-filter: blur(10px);
}

.zoom-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--border-active);
  transform: scale(1.1);
}

/* Loading state */
.allsky-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
  z-index: 40;
}

.allsky-loading .spinner {
  width: 2rem;
  height: 2rem;
  border-width: 2px;
}

/* Error state */
.allsky-error {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--error-color);
  z-index: 40;
}

/* Responsive design */
@media (max-width: 768px) {
  .allsky-display-container {
    padding: var(--spacing-md);
  }
  
  .allsky-container {
    max-width: 100%;
  }
  
  .allsky-image-wrapper {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    max-width: 400px;
  }
  
  .allsky-display {
    max-width: 350px;
  }
  
  .allsky-info {
    position: relative;
    margin-top: var(--spacing-md);
    margin-left: 0;
    width: 100%;
  }
  
  .allsky-status {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  
  .zoom-controls {
    position: relative;
    flex-direction: row;
    justify-content: center;
    margin-top: var(--spacing-md);
    right: auto;
    top: auto;
  }
}

@media (max-width: 480px) {
  .allsky-image-wrapper {
    max-width: 300px;
  }
  
  .allsky-display {
    max-width: 280px;
  }
  
  .satellite-marker {
    width: 10px;
    height: 10px;
  }
  
  .satellite-marker:hover,
  .satellite-marker.selected {
    width: 14px;
    height: 14px;
  }
  
  .satellite-label {
    font-size: 0.6875rem;
  }
  
  .compass-directions .direction {
    font-size: 16px;
  }
}
