/* General Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
  padding: 20px;
}

/* Form Container */
#formio {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Form Labels */
.formio-component label {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
  display: block;
}

/* Form Inputs and Selects */
.formio-component input[type="text"],
.formio-component input[type="email"],
.formio-component input[type="number"],
.formio-component select {
  width: 100%;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.formio-component input:focus,
.formio-component select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Choices.js Styling for Select Components */
.choices__inner {
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  padding: 2px;
}

.choices__list--single {
  padding: 4px 8px;
  font-size: 16px;
}

.choices__list--dropdown {
  border: 1px solid #d1d5db;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.choices__item--selectable {
  padding: 8px 12px;
  font-size: 14px;
}

.choices__item--selectable:hover {
  background: #f1f5f9;
}

/* Checkbox and Terms Section */
#tcCheckbox {
  margin-right: 8px;
  vertical-align: middle;
}

#tcCheckbox + label {
  font-size: 14px;
  color: #4b5563;
}

#tcLink {
  color: #3b82f6;
  text-decoration: underline;
  transition: color 0.2s;
}

#tcLink:hover {
  color: #2563eb;
}

#tcLink.disabled {
  color: #9ca3af;
  cursor: not-allowed;
  text-decoration: none;
}

/* Terms Dialog */
#termsDialog {
  z-index: 1000;
}

#termsContent {
  max-height: 80vh;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
}

#termsText {
  font-size: 14px;
  line-height: 1.8;
  color: #374151;
}

#closeTerms {
  margin-top: 16px;
  padding: 8px 16px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

#closeTerms:hover {
  background: #2563eb;
}

#closeTerms:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Submit Button */
#submitBtn {
  display: block;
  width: 100%;
  max-width: 200px;
  margin: 24px auto 0;
  padding: 12px 24px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

#submitBtn:hover {
  background: #2563eb;
}

#submitBtn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

#submitBtn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Error Messages */
.formio-errors .formio-error-wrapper {
  color: #dc2626;
  font-size: 14px;
  margin-top: 4px;
}

/* Responsive Design */
@media (max-width: 600px) {
  #formio {
    padding: 16px;
  }

  #termsContent {
    max-width: 90%;
  }

  #submitBtn {
    max-width: 100%;
  }
}