/* ============================================
   SISTEMA DE VALIDAÇÃO GPS - CLIENTE CSS
   ============================================ */

/* Container do endereço com GPS */
.endereco-gps-container {
  position: relative;
}

/* Indicador de validação GPS */
.gps-validation-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
}

.gps-status-icon {
  font-size: 14px;
}

.gps-status-text {
  flex: 1;
  color: #6c757d;
}

/* Estados do indicador */
.gps-validation-indicator.status-typing {
  background: #e3f2fd;
  border-color: #bbdefb;
}

.gps-validation-indicator.status-loading {
  background: #fff3e0;
  border-color: #ffcc02;
  animation: pulse 1.5s ease-in-out infinite alternate;
}

.gps-validation-indicator.status-valid {
  background: #e8f5e8;
  border-color: #4caf50;
  color: #2e7d32;
}

.gps-validation-indicator.status-invalid {
  background: #ffebee;
  border-color: #f44336;
  color: #c62828;
}

.gps-validation-indicator.status-error {
  background: #fff3e0;
  border-color: #ff9800;
  color: #f57c00;
}

/* Modal de alternativas GPS */
.gps-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  box-sizing: border-box;
}

.gps-modal {
  background: white;
  border-radius: 12px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gps-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e9ecef;
}

.gps-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #495057;
}

.gps-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6c757d;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.gps-modal-close:hover {
  background: #f8f9fa;
  color: #495057;
}

.gps-modal-content {
  padding: 24px;
}

.gps-modal-content p {
  margin: 0 0 20px 0;
  color: #6c757d;
  line-height: 1.5;
}

/* Alternativas */
.gps-alternatives {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.gps-alternative {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.gps-alternative:hover {
  background: #e9ecef;
  border-color: #dee2e6;
}

.alternative-icon {
  font-size: 24px;
  min-width: 40px;
  text-align: center;
}

.alternative-content h4 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 600;
  color: #495057;
}

.alternative-content p {
  margin: 0;
  font-size: 14px;
  color: #6c757d;
}

/* Ações do modal */
.gps-modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.gps-btn {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  min-width: 140px;
}

.gps-btn-primary {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
}

.gps-btn-primary:hover {
  background: linear-gradient(135deg, #0056b3, #004085);
  transform: translateY(-1px);
}

.gps-btn-secondary {
  background: #f8f9fa;
  color: #495057;
  border: 1px solid #dee2e6;
}

.gps-btn-secondary:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

/* Aviso de validação */
.gps-validation-warning {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 16px;
  animation: slideDown 0.3s ease-out;
}

.warning-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.warning-icon {
  font-size: 16px;
  color: #f39c12;
}

.warning-text {
  color: #856404;
  font-size: 14px;
  font-weight: 500;
}

/* Melhorias no input de endereço */
.endereco-gps-container input[name="endereco"] {
  transition: all 0.3s ease;
}

.endereco-gps-container input[name="endereco"]:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.endereco-gps-container.status-valid input[name="endereco"] {
  border-color: #28a745;
}

.endereco-gps-container.status-invalid input[name="endereco"] {
  border-color: #dc3545;
}

/* Animações */
@keyframes pulse {
  0% { opacity: 1; }
  100% { opacity: 0.7; }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsividade */
@media (max-width: 768px) {
  .gps-modal {
    margin: 0;
    max-height: 100vh;
    border-radius: 0;
  }
  
  .gps-modal-actions {
    flex-direction: column;
  }
  
  .gps-btn {
    min-width: auto;
  }
  
  .gps-alternatives {
    gap: 12px;
  }
  
  .gps-alternative {
    padding: 12px;
  }
  
  .alternative-icon {
    font-size: 20px;
    min-width: 32px;
  }
}

@media (max-width: 480px) {
  .gps-modal-overlay {
    padding: 0;
  }
  
  .gps-modal-header {
    padding: 16px 20px;
  }
  
  .gps-modal-content {
    padding: 20px;
  }
  
  .gps-validation-indicator {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  .gps-status-icon {
    font-size: 12px;
  }
}
