/*
CHANGE LOG
File: /frontend/css/styles.css
Document Type: CSS Stylesheet
Purpose: Styles for GPS flood perimeter mapper interface
Blueprint: N/A
Route: N/A
Dependencies: None
Version History:
  2025-06-27 v5.0 - Simplified styles, larger buttons, better mobile support
  2025-06-27 v4.0 - Added tooltips and animations
*/

/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow: hidden;
}

/* Map */
#map {
  height: 100vh;
  width: 100vw;
}

/* Controls */
#controls {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.95);
  padding: 8px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  flex-wrap: wrap;
  max-width: 90vw;
}

#controls button {
  padding: 6px 10px;
  border: none;
  border-radius: 8px;
  background: #007cba;
  color: white;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  height: 32px;
  white-space: nowrap;
}

#controls button:hover {
  background: #005a8a;
  transform: scale(1.05);
}

#controls button:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

#controls button.active {
  background: #ff4444;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(255, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0); }
}

/* Status */
#status {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  max-width: 80vw;
  text-align: center;
}

/* Stats */
#stats {
  position: fixed;
  top: 140px;
  right: 15px;
  z-index: 999;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 10px;
  border-radius: 10px;
  font-size: 12px;
  min-width: 100px;
}

#stats div {
  margin: 5px 0;
  display: flex;
  justify-content: space-between;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 15px;
  min-width: 300px;
  max-width: 90vw;
}

.modal-content h3 {
  margin-bottom: 15px;
}

.modal-content input {
  width: 100%;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  margin-bottom: 15px;
}

.modal-content button {
  padding: 10px 20px;
  margin: 0 5px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.modal-content button:first-of-type {
  background: #007cba;
  color: white;
}

.modal-content button:last-of-type {
  background: #ddd;
  color: #333;
}

/* Utilities */
.hidden { display: none; }

.gps-excellent { color: #4CAF50; font-weight: bold; }
.gps-good { color: #4CAF50; }
.gps-medium { color: #FF9800; }
.gps-poor { color: #F44336; }

/* Instructions */
#instructions {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3000;
  background: white;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
}

#instructions h3 {
  margin: 0 0 15px 0;
  color: #007cba;
  text-align: center;
}

#instructions ol {
  margin: 15px 0;
  padding-left: 20px;
}

#instructions li {
  margin: 10px 0;
  line-height: 1.4;
}

#instructions button {
  background: #007cba;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  margin-top: 15px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

#instructions.hidden {
  display: none;
}

/* Mobile */
@media (max-width: 480px) {
  #controls {
    gap: 8px;
    padding: 8px;
  }
  
  #controls button {
    width: 45px;
    height: 45px;
    font-size: 16px;
  }
  
  #status {
    font-size: 12px;
    padding: 8px 16px;
  }
}
