/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.modal {
  background: white;
  border-radius: 20px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-60px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  background: linear-gradient(135deg, #1a237e, #3f51b5);
  color: white;
  padding: 25px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.8rem;
  font-weight: 700;
}

.close-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.modal-content {
  padding: 30px;
  overflow-y: auto;
  max-height: 60vh;
}

/* Form Styles */
.form-group {
  margin-bottom: 25px;
}

.form-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #1a237e;
  font-size: 1.1rem;
}

.select-container {
  position: relative;
}

.form-select {
  width: 100%;
  padding: 15px;
  border: 2px solid #d1d9e6;
  border-radius: 10px;
  font-size: 1rem;
  background-color: white;
  color: #333;
  appearance: none;
  cursor: pointer;
  transition: all 0.3s;
}

.form-select:focus {
  outline: none;
  border-color: #3f51b5;
  box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.2);
}

.select-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #5a6c7d;
  pointer-events: none;
}

/* Loading State */
.loading {
  text-align: center;
  padding: 15px;
  color: #5a6c7d;
  font-style: italic;
}

.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3f51b5;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Action Buttons */
.modal-actions {
  display: flex;
  justify-content: space-between;
  padding: 20px 30px;
  border-top: 1px solid #eaeaea;
  background: #f8fafc;
}

.btn {
  padding: 14px 30px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}

.btn-cancel {
  background: #e2e8f0;
  color: #5a6c7d;
}

.btn-cancel:hover {
  background: #cbd5e0;
}

.btn-submit {
  background: linear-gradient(135deg, #1a237e, #3f51b5);
  color: white;
}

.btn-submit:hover {
  background: linear-gradient(135deg, #151f6b, #303f9f);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(63, 81, 181, 0.3);
}

.btn-submit:disabled {
  background: #a0aec0;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2.2rem;
  }

  .modal-content {
    padding: 20px;
  }

  .modal-header {
    padding: 20px;
  }

  .modal-actions {
    flex-direction: column;
    gap: 15px;
  }

  .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
  }

  .location-cards {
    flex-direction: column;
    align-items: center;
  }

  .location-card {
    width: 100%;
    max-width: 300px;
  }
}

/* Instructions */
.instructions {
  background: #f0f7ff;
  border-radius: 10px;
  padding: 20px;
  margin-top: 30px;
  border-left: 5px solid #3f51b5;
}

.instructions h3 {
  color: #1a237e;
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.instructions ol {
  padding-left: 20px;
  color: #5a6c7d;
}

.instructions li {
  margin-bottom: 8px;
  line-height: 1.5;
}

/* Error Message */
.error-message {
  color: #e53935;
  background: #ffebee;
  padding: 10px 15px;
  border-radius: 8px;
  margin-top: 10px;
  border-left: 4px solid #e53935;
  display: none;
}