/* Flight Tracker Styles */

.flight-controls {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.flight-controls input {
  flex: 1;
  min-width: 200px;
  padding: 12px 16px;
  border: 1px solid var(--gray-medium);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
}

.flight-controls input:focus {
  outline: none;
  border-color: var(--orange);
}

.flight-controls select {
  padding: 12px 16px;
  border: 1px solid var(--gray-medium);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: var(--white);
  cursor: pointer;
}

.flight-controls select:focus {
  outline: none;
  border-color: var(--orange);
}

.flight-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.stat-card {
  background: var(--white);
  padding: 15px 25px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  min-width: 120px;
}

.stat-card .stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue-dark);
}

.stat-card .stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--gray-dark);
  margin-top: 5px;
}

.stat-ok {
  color: var(--orange);
}

.stat-error {
  color: #ef4444;
}

#map {
  height: 500px;
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 25px;
}

.flight-panel {
  position: fixed;
  top: 100px;
  right: 20px;
  width: 300px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  z-index: 1000;
}

.flight-panel.hidden {
  display: none;
}

.flight-panel h3 {
  margin-bottom: 15px;
  color: var(--blue-dark);
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray-dark);
  transition: color var(--transition);
}

.close-btn:hover {
  color: var(--blue-dark);
}

.flight-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-medium);
}

.info-row:last-child {
  border-bottom: none;
}

.info-row span:first-child {
  color: var(--gray-dark);
  font-size: 0.9rem;
}

.info-row span:last-child {
  font-weight: 600;
  color: var(--blue-dark);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
}

.search-results.hidden {
  display: none;
}

.search-result-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--gray-medium);
  transition: background var(--transition);
}

.search-result-item:hover {
  background: var(--gray-light);
}

.search-result-item:last-child {
  border-bottom: none;
}

.result-callsign {
  font-weight: 600;
  color: var(--blue-dark);
}

.result-country {
  font-size: 0.85rem;
  color: var(--gray-dark);
}

.api-info {
  text-align: center;
  padding-top: 20px;
  color: var(--gray-dark);
  font-size: 0.9rem;
}

.api-info a {
  color: var(--orange);
  text-decoration: none;
}

.api-info a:hover {
  text-decoration: underline;
}

/* Aircraft marker */
.aircraft-marker {
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aircraft-marker.selected {
  font-size: 24px;
}

/* Leaflet popup override */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius);
}

.leaflet-popup-content {
  margin: 12px 16px;
}

/* Responsive */
@media (max-width: 768px) {
  .flight-controls {
    flex-direction: column;
  }
  
  .flight-controls input,
  .flight-controls select,
  .flight-controls .btn {
    width: 100%;
  }
  
  .flight-stats {
    flex-direction: column;
  }
  
  .stat-card {
    width: 100%;
  }
  
  #map {
    height: 350px;
  }
  
  .flight-panel {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 50vh;
    overflow-y: auto;
  }
}