/*
 * Event ticket attendee form (B3): the dietary fieldset with its details boxes, the student fields
 * and the graduation month/year control. Enqueued on the ticket page and on Box Office's
 * ticket-edit page (lib/woocommerce/ticket-form.php), so rules are scoped by the form's own
 * classes, not the ticket page's body class. The ticket page's look (inputs, labels) comes from
 * ticket-page.css.
 */

.dtc-dietary-details[hidden],
.dtc-student-field[hidden],
.dtc-graduation__input[hidden] {
  display: none !important;
}

.dtc-dietary .dtc-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.dtc-dietary .dtc-fieldset legend {
  float: none;
  width: auto;
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  color: inherit;
  font-size: inherit;
  font-weight: 700;
  line-height: 1.4;
}

.dtc-dietary .ticket-field-option-label {
  display: block;
  margin: 0 0 6px;
  font-weight: 400;
}

/* A details box sits under its checkbox, indented to the option text. (Three classes: WooCommerce's
   `.woocommerce form .form-row` margin and padding would win otherwise.) */
.dtc-dietary .dtc-fieldset .dtc-dietary-details {
  margin: 2px 0 12px 26px;
  padding: 10px 12px;
  border-left: 3px solid #01aeb8;
  border-radius: 0 8px 8px 0;
  background: #f4fbfb;
}

.dtc-dietary .dtc-dietary-details label {
  display: block;
  margin: 0 0 4px;
  font-size: 14px;
}

.dtc-dietary .dtc-dietary-details input {
  width: 100%;
  max-width: 480px;
}

/* The type's examples under its box ("e.g. peanuts, shellfish"). */
.dtc-dietary .dtc-dietary-details .dtc-dietary-details__hint {
  display: block;
  margin: 4px 0 0;
  color: #5f6b6d;
  font-size: 13px;
  line-height: 1.4;
}

.dtc-graduation {
  display: flex;
  gap: 8px;
}

.dtc-graduation select {
  flex: 1 1 0;
  min-width: 0;
}

/* Ticket page: match its field styling. */
.dtc-ticket-page .dtc-dietary .dtc-fieldset legend {
  color: var(--dtc-heading);
  font-size: 14px;
}

.dtc-ticket-page .wc-box-office-ticket-fields-body .dtc-dietary .ticket-field-option-label {
  margin: 0 0 8px;
  color: var(--dtc-text);
  font-weight: 400;
}

.dtc-ticket-page .dtc-dietary .dtc-fieldset .dtc-dietary-details {
  border: 1px solid var(--dtc-border);
  border-left: 3px solid var(--dtc-primary);
  background: #fff;
}

.dtc-ticket-page .wc-box-office-ticket-fields-body .dtc-dietary .dtc-dietary-details label {
  margin: 0 0 4px;
  font-size: 13px;
}

.dtc-ticket-page .dtc-dietary .dtc-dietary-details input.input-text {
  max-width: none;
  min-height: 42px;
}

@media (max-width: 575px) {
  .dtc-dietary .dtc-fieldset .dtc-dietary-details {
    margin-left: 0;
  }
}
