/* Modern Forms CSS for Diet Sense */

/* Form Container Styling */
.modern-form-container {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 40px;
  margin-bottom: 30px;
}

.form-header {
  text-align: center;
  margin-bottom: 30px;
}

.form-header h2 {
  color: #6dafb2;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 15px;
}

.form-header p {
  color: #666;
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto;
}

.form-section {
  border-left: 4px solid #6dafb2;
  padding-left: 20px;
  margin-bottom: 30px;
  position: relative;
}

.form-section h3 {
  color: #6dafb2;
  font-size: 20px;
  margin-bottom: 20px;
  display: inline-block;
  position: relative;
}

.form-section h3:after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: #6dafb2;
}

/* Modern Form Controls */
.modern-form-control {
  position: relative;
  margin-bottom: 20px;
}

.modern-form-control input, 
.modern-form-control select, 
.modern-form-control textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  transition: all 0.3s;
  font-size: 16px;
  background-color: #f9f9f9;
}

.modern-form-control input:focus, 
.modern-form-control select:focus, 
.modern-form-control textarea:focus {
  border-color: #6dafb2;
  box-shadow: 0 0 0 3px rgba(109, 175, 178, 0.2);
  background-color: #fff;
  outline: none;
}

.modern-form-control label {
  position: absolute;
  left: 15px;
  top: 12px;
  color: #999;
  pointer-events: none;
  transition: all 0.3s ease;
  background-color: transparent;
  padding: 0 5px;
  font-size: 16px;
}

.modern-form-control input:focus ~ label,
.modern-form-control input:not(:placeholder-shown) ~ label,
.modern-form-control select:focus ~ label,
.modern-form-control select:not(:placeholder-shown) ~ label,
.modern-form-control textarea:focus ~ label,
.modern-form-control textarea:not(:placeholder-shown) ~ label {
  top: -10px;
  left: 10px;
  font-size: 12px;
  color: #6dafb2;
  background-color: #fff;
}

.modern-form-control input::placeholder,
.modern-form-control select::placeholder,
.modern-form-control textarea::placeholder {
  color: transparent;
}

/* Button Styling */
.modern-btn {
  background-color: #6dafb2;
  color: white;
  border: none;
  padding: 15px 40px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 10px rgba(109, 175, 178, 0.3);
  position: relative;
  overflow: hidden;
}

.modern-btn:hover {
  background-color: #53999c;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(109, 175, 178, 0.4);
}

.modern-btn:active {
  transform: translateY(0);
}

.btn-container {
  text-align: center;
  margin-top: 30px;
  position: relative;
}

/* Loading Spinner and Submit States */
.submit-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 30px;
}

/* Hidden class to toggle visibility */
.hidden {
  display: none !important;
}

.submit-state.hidden {
  display: none;
}

.loader-container {
  position: relative;
  width: 60px;
  height: 60px;
  margin-bottom: 15px;
}

.loader {
  border: 4px solid rgba(109, 175, 178, 0.2);
  border-radius: 50%;
  border-top: 4px solid #6dafb2;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  position: absolute;
  top: 0;
  left: 50%;
  margin-left: -25px;
}

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

.success-checkmark {
  width: 60px;
  height: 60px;
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-checkmark .check-icon {
  width: 60px;
  height: 60px;
  position: relative;
  border-radius: 50%;
  background-color: #e7f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-checkmark .check-icon i {
  color: #6dafb2;
  font-size: 30px;
}

.success-text {
  color: #53999c;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 10px;
}

.success-message {
  color: #666;
  font-size: 14px;
  text-align: center;
  max-width: 300px;
  margin: 0 auto;
}

.submit-state .reset-btn {
  margin-top: 20px;
  padding: 10px 25px;
  background-color: transparent;
  color: #6dafb2;
  border: 2px solid #6dafb2;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.submit-state .reset-btn:hover {
  background-color: #6dafb2;
  color: #fff;
}

/* Alert Styling */
.modern-alert {
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.modern-alert.success {
  background-color: #e7f5f5;
  border-left: 4px solid #6dafb2;
  color: #3a7a7d;
}

.modern-alert.danger {
  background-color: #ffeeee;
  border-left: 4px solid #ff5555;
  color: #cc4444;
}

.modern-alert h4 {
  margin-top: 0;
  font-weight: 600;
  margin-bottom: 10px;
}

.modern-alert p {
  margin-bottom: 0;
}

/* Form Group & Row Spacing */
.form-row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -10px;
  margin-left: -10px;
}

.form-col {
  flex: 0 0 100%;
  max-width: 100%;
  padding-right: 10px;
  padding-left: 10px;
}

@media (min-width: 768px) {
  .form-col-half {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

/* Card Section */
.info-card {
  background-color: #f8f8f8;
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s;
}

.info-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
}

.info-card h3 {
  color: #6dafb2;
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 12px;
}

.info-card h3:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: #6dafb2;
}

.info-card p {
  color: #666;
  margin-bottom: 0;
}

.info-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #e7f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.info-icon i {
  color: #6dafb2;
  font-size: 24px;
}

/* Map section */
.map-container {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  height: 400px;
}

#map, #map2 {
  border-radius: 12px;
}

/* Form progress indicator */
.form-progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  position: relative;
}

.form-progress:before {
  content: '';
  position: absolute;
  top: 25px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #ddd;
  z-index: 0;
}

.progress-step {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 33.333%;
}

.step-number {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  color: #666;
  font-weight: 600;
  border: 2px solid #ddd;
  transition: all 0.3s;
}

.progress-step.active .step-number {
  background-color: #6dafb2;
  color: white;
  border-color: #6dafb2;
  box-shadow: 0 0 0 5px rgba(109, 175, 178, 0.2);
}

.progress-step.completed .step-number {
  background-color: #6dafb2;
  color: white;
  border-color: #6dafb2;
}

.step-label {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.progress-step.active .step-label {
  color: #6dafb2;
  font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .modern-form-container {
    padding: 25px 15px;
  }
  
  .form-progress {
    flex-wrap: wrap;
  }
  
  .progress-step {
    width: 100%;
    margin-bottom: 15px;
  }
  
  .form-progress:before {
    display: none;
  }
  
  .info-card {
    margin-bottom: 20px;
  }
}
