/* Custom Theme Styles for the form Feedback Form */

.feedback-theme .umbraco-forms-navigation {
  background-color: #f0ede6;
}

.feedback-theme .umbraco-forms-page {
  background-color: #f0ede6;
  border: none;
  padding: 40px;
}

.feedback-theme .umbraco-forms-fieldset {
  background-color: #f0ede6;
  border: none;
}

.feedback-theme .umbraco-forms-field input[type="text"],
.feedback-theme .umbraco-forms-field input[type="email"],
.feedback-theme .umbraco-forms-field input[type="tel"],
.feedback-theme .umbraco-forms-field input[type="number"],
.feedback-theme .umbraco-forms-field textarea,
.feedback-theme .umbraco-forms-field select {
  background-color: #fbfcfb;
  border: 1px solid #ccc;
  padding: 4px 6px;
  color: #333 !important;
}

.feedback-theme .umbraco-forms-field input[type="text"]:focus,
.feedback-theme .umbraco-forms-field input[type="email"]:focus,
.feedback-theme .umbraco-forms-field input[type="tel"]:focus,
.feedback-theme .umbraco-forms-field input[type="number"]:focus,
.feedback-theme .umbraco-forms-field textarea:focus,
.feedback-theme .umbraco-forms-field select:focus {
  background-color: #fbfcfb;
  outline: none;
  border-color: #285133;
}

.umbraco-forms-form {
  padding: 0;
}

.feedback-theme .form-introduction {
  background-color: #f0ede6;
}

.feedback-theme .form-introduction h3 {
  color: #285133 !important;
  font-size: 18px;
  font-weight: 600;
  margin-top: 0;
}

.feedback-theme .umbraco-forms-label {
  color: #333;
  font-weight: 700;
}

.feedback-theme .btn.primary {
  background-color: #ed7122;
  border-color: #ed7122;
  color: #000000;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: inline-block;
  visibility: visible;
  opacity: 1;
}

.feedback-theme .btn.primary:hover {
  background-color: #ed7122;
  border-color: #ed7122;
}

/* Submit message after form submits */
.feedback-theme .umbraco-forms-submitmessage {
  background-color: #f0ede6 !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
  text-align: center !important;
  min-height: 100px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

@media (min-width: 1024px) {
  .feedback-theme .umbraco-forms-submitmessage {
    font-size: 1.25rem !important;
    min-height: 100px !important;
  }
}

/* Force validation errors to display below field on new line */
.feedback-theme .umbraco-forms-field .field-validation-error,
.feedback-theme .umbraco-forms-field .umbraco-forms-validation-message {
  display: block !important;
  width: 100% !important;
  clear: both !important;
  margin-top: 0.5rem !important;
  margin-left: 0 !important;
  padding-left: 0 !important;
  color: #ba1a1a !important;
  font-size: 0.875rem !important;
}

/* Ensure fieldset legend appears above content, not floating beside it */
.feedback-theme .umbraco-forms-legend {
  display: block;
  width: 100% !important;
  float: none !important;
  clear: both !important;
  font-weight: 700;
  color: #333;
  margin-bottom: 0.5rem;
}

/* Specifically for radio button fields */
.feedback-theme .umbraco-forms-field.radiobuttonlist {
  display: block !important;
}

.feedback-theme .umbraco-forms-field.radiobuttonlist .field-validation-error,
.feedback-theme
  .umbraco-forms-field.radiobuttonlist
  .umbraco-forms-validation-message {
  display: block !important;
  width: 100% !important;
  margin-top: 0.75rem !important;
}

/* Radio button list container — override default float: left */
.feedback-theme .radiobuttonlist {
  display: block !important;
  float: none !important;
}

/* choosealternative: tooltip ABOVE via order: -1 */
.feedback-theme
  .umbraco-forms-field.choosealternative
  .umbraco-forms-field-wrapper {
  display: flex;
  flex-direction: column;
}

.feedback-theme .umbraco-forms-field.choosealternative .umbraco-forms-tooltip {
  order: -1;
  font-weight: 600;
  color: #333;
}

.feedback-theme .umbraco-forms-field.dataconsent .umbraco-forms-field-wrapper {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 0 0.5rem;
  margin-top: 1.5rem;
}

.feedback-theme .umbraco-forms-field.dataconsent input[type="checkbox"] {
  grid-column: 1;
  grid-row: 1;
  margin-top: 3px;
  width: auto;
}

.feedback-theme .umbraco-forms-field.dataconsent label {
  grid-column: 2;
  grid-row: 1;
}

.feedback-theme .umbraco-forms-field.dataconsent .umbraco-forms-tooltip {
  grid-column: 1 / -1;
  grid-row: 2;
  margin-top: 0.5rem;
}

/* Each radio button option */
.feedback-theme .radiobuttonlist > div {
  display: block;
  margin-bottom: 0.25rem;
}

/* Radio button inputs */
.feedback-theme input[type="radio"] {
  margin-right: 10px;
  cursor: pointer;
  display: inline-block;
  vertical-align: middle;
}

/* Radio button labels */
.feedback-theme .radiobuttonlist label {
  display: inline;
  vertical-align: middle;
}

/* Checkbox styling */
.feedback-theme .umbraco-forms-field input[type="checkbox"] {
  display: inline-block;
  margin-top: 15px;
  cursor: pointer;
}

/* Checkbox field layout */
.feedback-theme .umbraco-forms-field.checkbox {
  display: flex;
  flex-direction: column;
}

.feedback-theme .umbraco-forms-field.checkbox label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.feedback-theme .umbraco-forms-field.dataconsent .umbraco-forms-tooltip {
  font-weight: 350;
  font-size: 0.9rem;
}

.feedback-theme .umbraco-forms-field-wrapper span {
  font-size: 1rem;
  font-weight: 600;
}

.feedback-theme .umbraco-forms-indicator {
  color: #dc2626 !important;
}

.feedback-theme .umbraco-forms-field.dataconsent > div > label::after {
  content: " *";
  color: #dc2626;
}

/* ── Mobile styles ── */
@media (max-width: 768px) {
  .feedback-theme .umbraco-forms-page {
    padding: 10px;
    width: 90%;
    margin: 0 auto;
  }

  .feedback-theme .form-introduction {
    padding: 10px;
  }

  .feedback-theme p,
  .feedback-theme .umbraco-forms-field p,
  .feedback-theme .umbraco-forms-field-wrapper p {
    font-size: 1rem;
  }

  .feedback-theme .umbraco-forms-field {
    margin-bottom: 0.6rem;
  }

  .feedback-theme .radiobuttonlist label {
    font-size: 0.85rem;
  }

  .feedback-theme .umbraco-forms-field-wrapper label {
    font-size: 1rem;
  }

  .feedback-theme .umbraco-forms-field input[type="text"],
  .feedback-theme .umbraco-forms-field input[type="email"],
  .feedback-theme .umbraco-forms-field input[type="tel"],
  .feedback-theme .umbraco-forms-field input[type="number"],
  .feedback-theme .umbraco-forms-field select {
    padding: 6px 10px;
    font-size: 0.875rem;
  }

  .feedback-theme .umbraco-forms-field textarea {
    height: 100px;
    padding: 6px 10px;
    font-size: 0.875rem;
  }

  .feedback-theme .radiobuttonlist > div {
    margin-bottom: 0.3rem;
  }
}
