/*******************************************************************************
Allergy Form Styles - Unified Checklist
*******************************************************************************/

/* Unified checklist container */
#unified-checklist {
  max-width: 800px;
  margin: 0 auto;
}

/* Allergy item rows - unified style for all items */
.allergy-item-row {
  border: 1px solid rgba(80, 33, 17, 0.3);
  border-radius: 8px;
  background-color: rgba(239, 231, 208, 0.6);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  transition: all 0.2s ease;
}

.allergy-item-row:hover {
  background-color: rgba(239, 231, 208, 0.8);
  border-color: rgba(80, 33, 17, 0.5);
}

.allergy-item-row.item-selected {
  border-color: #502111;
  border-width: 2px;
  background-color: rgba(239, 231, 208, 0.8);
}

/* "No allergies" option - highlighted */
.allergy-item-none {
  background-color: rgba(205, 186, 99, 0.2);
  border-color: #502111;
}

.allergy-item-none:hover {
  background-color: rgba(205, 186, 99, 0.3);
}

.allergy-item-none .form-check-label {
  color: #502111;
  font-weight: 500;
}

.allergy-item-none .help-text {
  color: rgba(80, 33, 17, 0.6);
  font-style: italic;
  margin-left: 2rem;
  cursor: default;
}

/* Form check styling */
.allergy-item-row .form-check {
  display: flex;
  align-items: center;
  margin-bottom: 0;
}

.allergy-item-row .form-check-input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.75rem;
  cursor: pointer;
}

.allergy-item-row .form-check-label {
  cursor: pointer;
  font-size: 1.05em;
  margin: 0;
  flex: 1;
}

/* Details sections - show/hide when checked */
.allergy-item-details {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(80, 33, 17, 0.2);
  display: none;
}

.allergy-item-details.visible {
  display: block;
}

/* Wrapper for form fields in details */
.guest-count-wrapper,
.other-allergy-wrapper,
.special-preference-wrapper {
  margin-bottom: 0.75rem;
}

.guest-count-wrapper:last-child,
.other-allergy-wrapper:last-child,
.special-preference-wrapper:last-child {
  margin-bottom: 0;
}

.allergy-item-details .form-label {
  color: rgba(80, 33, 17, 0.8);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.allergy-item-details .form-select,
.allergy-item-details .form-control {
  width: 100%;
}

.allergy-item-details .form-select {
  min-width: 150px;
}

/* Special preference checkboxes */
.special-preference-wrapper {
  padding-top: 0.5rem;
}

.special-preference-wrapper .form-check-label {
  cursor: pointer;
  font-size: 0.9em;
  color: rgba(80, 33, 17, 0.8);
}

.special-preference-wrapper .form-check-input {
  margin-right: 0.5rem;
}

/* Mobile responsiveness */
@media only screen and (max-width: 767px) {
  .allergy-item-row {
    padding: 0.875rem 1rem;
    margin-bottom: 0.5rem;
  }

  .allergy-item-row .form-check-label {
    font-size: 0.95em;
  }

  .allergy-item-details {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
  }

  .allergy-item-details .form-select,
  .allergy-item-details .form-control {
    width: 100%;
    min-width: 100%;
  }
}

/* Disclaimer box */
#allergy-disclaimer {
  max-width: 700px;
  background-color: rgba(205, 186, 99, 0.15);
}

/* Modal styling to match page color scheme */
#edit-allergies-modal .modal-content {
  background-color: #EFE7D0;
  border: 2px solid #502111;
  border-radius: 8px;
}

#edit-allergies-modal .modal-header {
  background-color: rgba(205, 186, 99, 0.2);
  border-bottom: 2px solid #502111;
  color: #502111;
}

#edit-allergies-modal .modal-header .modal-title {
  color: #502111;
  font-weight: 600;
}

#edit-allergies-modal .modal-body {
  background-color: #EFE7D0;
  color: #502111;
}

#edit-allergies-modal .modal-backdrop {
  background-color: rgba(80, 33, 17, 0.5);
}

#edit-allergies-modal .btn {
  border-color: #502111;
  color: #502111;
}

#edit-allergies-modal .btn:hover {
  background-color: rgba(80, 33, 17, 0.1);
  border-color: #502111;
}

#edit-allergies-modal .btn.submit-btn {
  background-color: #502111;
  color: #EFE7D0;
}

#edit-allergies-modal .btn.submit-btn:hover {
  background-color: rgba(80, 33, 17, 0.9);
  color: #EFE7D0;
}

