/* Custom Form Plugin Styles */

/* Success and Error Messages */
.aegf-success {
  background: #d4edda;
  color: #155724;
  padding: 12px 20px;
  margin-bottom: 20px;
  border: 1px solid #c3e6cb;
  border-radius: 4px;
  font-weight: 500;
}

.aegf-error {
  background: #f8d7da;
  color: #721c24;
  padding: 12px 20px;
  margin-bottom: 20px;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  font-weight: 500;
}

/* Inline Error Messages */
.inline-error {
  color: #dc3545;
  font-size: 14px;
  margin-top: 5px;
  padding: 5px 10px;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  display: none;
}

/* Error field styling */
.error-field {
  border-color: #dc3545 !important;
  background-color: #fff8f8 !important;
}

.error-field:focus {
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

/* Email check status */
.email-check-status {
  margin-top: 5px;
  font-size: 14px;
  padding: 5px 10px;
  border-radius: 4px;
  display: none;
}

.email-check-status .checking {
  color: #6c757d;
  font-style: italic;
}

.email-check-status .available {
  color: #28a745;
  font-weight: 500;
}

.email-check-status .error {
  color: #dc3545;
  font-weight: 500;
}

/* Personal Info Groups - Enhanced styling */
.personal-info-group {
  position: relative;
  padding-bottom: 10px;
}

.personal-info-group .form-label {
  display: flex;
  align-items: center;
}

.personal-info-group .form-label .required {
  color: #dc3545;
  font-weight: bold;
  margin-left: 5px;
}

/* Form Container */
.aegf-form {
  max-width: 1200px;
  margin: 0 auto;
  font-family: "Inter", Sans-serif;
}

/* Form Sections */
.form-section {
  margin-bottom: 40px;
  padding: 25px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
}

.form-heading {
  color: #404040;
  font-family: "Poppins", Sans-serif;
  font-size: 28px;
  margin-top: 0;
  margin-bottom: 25px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--e-global-color-accent);
}

/* Form Groups */
.form-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 25px;
  padding: 20px;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.form-group:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-label {
  font-weight: 600 !important;
  color: #404040;
  font-size: 16px;
}

.form-info {
  display: inline;
  color: var(--e-global-color-accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 15px;
  transition: color 0.2s ease;
}

.form-info:hover {
  color: var(--e-global-color-accent);
  text-decoration: underline;
}

/* Checkbox Groups */
.checkbox-group {
  display: flex;
  align-items: center;
  padding: 8px 0;
}

.checkbox-group input[type="checkbox"] {
  margin-right: 12px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--e-global-color-accent);
}

.consent-checkbox-group {
  align-items: flex-start;
}
.consent-checkbox-group input[type="checkbox"] {
  margin-top: 4px;
}

.checkbox-label {
  cursor: pointer;
  font-size: 15px;
  font-weight: 400 !important;
  color: #404040;
  flex: 1;
  margin: 0 !important;
}

/* Form Controls */
input[type="text"],
input[type="email"],
select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ced4da;
  border-radius: 5px !important;
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus {
  outline: none;
  border-color: var(--e-global-color-accent) !important;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.select-group {
  width: 100%;
  position: relative;
}

.select-group select {
  appearance: none;
  background: white
    url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23333" viewBox="0 0 256 256"><path d="M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"></path></svg>')
    no-repeat right 15px center;
  background-size: 16px;
  padding-right: 40px;
}

/* Required field indicator */
.required {
  color: #e74c3c;
}

.form-para-info {
  color: #6c757d;
  font-size: 13px;
  margin-top: 5px;
  margin-bottom: 10px;
  font-style: italic;
}

/* Submit Button */
.submit-button {
  background: var(--e-global-color-accent);
  color: white;
  border: none;
  padding: 16px 40px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 40px auto 20px;
}

.submit-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 68, 27, 0.3);
}

.submit-button:active:not(:disabled) {
  transform: translateY(0);
}

.submit-button:disabled {
  background: #6c757d;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
  .aegf-form {
    padding: 10px;
  }

  .form-section {
    padding: 15px;
  }

  .form-heading {
    font-size: 19px;
  }

  .form-group {
    padding: 15px;
  }

  .personal-info-group {
    padding-bottom: 15px;
  }

  .submit-button {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .form-heading {
    font-size: 17px;
  }

  .form-label {
    font-size: 15px;
  }

  .checkbox-label {
    font-size: 14px;
  }

  .inline-error {
    font-size: 13px;
  }
}
