/**
 * Webform fixes for Visit Planner (Secondary Site) after Bootstrap 5 upgrade
 */

/* ============================================
   WEBFORM MULTIPLE TABLE - ADD/REMOVE BUTTONS
   ============================================ */

/* Remove form-control class effects from image buttons */
.webform-multiple-table--operations input[type="image"] {
  width: auto !important;
  height: auto !important;
  padding: 6px 12px !important;
  border-radius: 4px !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

/* Style the add button (plus icon) as green */
.webform-multiple-table--operations input[type="image"][name*="add"] {
  background-color: #5cb85c !important;
  border: 1px solid #4cae4c !important;
}

.webform-multiple-table--operations input[type="image"][name*="add"]:hover {
  background-color: #449d44 !important;
  border-color: #398439 !important;
}

/* Style the remove button (minus/trash icon) as white/default */
.webform-multiple-table--operations input[type="image"][name*="remove"] {
  background-color: #fff !important;
  border: 1px solid #ccc !important;
}

.webform-multiple-table--operations input[type="image"][name*="remove"]:hover {
  background-color: #e6e6e6 !important;
  border-color: #adadad !important;
}

.webform-multiple-table--operations input[type="image"] {
  opacity: 1 !important;
}

/* Fix error message list - display inline with commas */
.alert-danger ul.item-list__comma-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline !important;
  color: #843534;
  font-weight: bold;
}

.alert-danger ul.item-list__comma-list li {
  display: inline !important;
  list-style-type: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.alert-danger ul.item-list__comma-list li:not(:last-child)::after {
  content: ", " !important;
}

.alert-danger .item-list__comma-list a {
  color: inherit !important;
  text-decoration: none !important;
}

.alert-danger .item-list__comma-list a:hover {
  text-decoration: underline !important;
}
