.clear {
  clear: both;
}

hr.nice_divider {
  height: 10px;
  margin: 20px 0 15px;
  border: 0;
  box-shadow: inset 0 12px 12px -12px rgb(0 0 0 / 50%);
}

.margin-bottom {
  margin-bottom: 25px;
}

.margin-top {
  margin-top: 25px;
}

/* Forms */
.actions {
  margin: 15px 0 25px;
}

.overflow_box {
  overflow: auto;
  width: 275px;
  height: 400px;
  border: solid 2px #dfdee2;
}

/* Errors */
#error_explanation {
  width: 400px;
  margin-bottom: 20px;
  padding: 7px;
  padding-bottom: 12px;
  border: 2px solid red;
  border-radius: 5px;

  background-color: #f0f0f0;
}

#error_explanation h2 {
  margin: -7px;
  padding: 5px 5px 5px 15px;

  font-size: 12px;
  font-weight: bold;
  color: #fff;
  text-align: left;

  background-color: #c00;
}

#error_explanation p {
  margin-bottom: 0;
  padding: 5px;
  color: #333;
}

#error_explanation ul {
  margin-top: 20px;
}

#error_explanation ul li {
  font-size: 12px;
  list-style: square;
}

.field_with_errors {
  display: inline;
}

/* Flash */
.alert-error {
  border-color: #eed3d7;
  color: #b94a48;
  text-align: left;
  background-color: #f2dede;
}

.alert-alert {
  border-color: #b87d00;
  color: #b87d00;
  text-align: left;
  background-color: #ffeebf;
}

.alert-success {
  border-color: #d6e9c6;
  color: #468847;
  text-align: left;
  background-color: #dff0d8;
}

.alert-notice {
  border-color: #197319;
  color: #468847;
  text-align: left;
  background-color: #dff0d8;
}

/* Funky checkbox */
.funkyradio div {
  clear: both;
  overflow: hidden;
  display: inline-block;
}

.funkyradio label {
  width: 100%;
  padding-right: 15px;
  border-radius: 3px;

  font-size: 18px;
  font-weight: normal;
  color: var(--gray);
}

.funkyradio input[type='checkbox']:empty {
  display: none;
}

.funkyradio input[type='checkbox']:empty ~ label {
  cursor: pointer;
  user-select: none;

  position: relative;

  margin-top: 15px;

  line-height: 22px;
  text-indent: 32px;
}

.funkyradio input[type='checkbox']:empty ~ label::before {
  content: '';

  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;

  display: block;

  width: 22px;
  border: 1px solid #d1d3d4;
  border-radius: 3px;

  background: #fff;
}

.funkyradio input[type='checkbox']:hover:not(:checked) ~ label::before {
  content: '\2714';
  color: #c2c2c2;
  text-indent: 4px;
}

.funkyradio input[type='checkbox']:checked ~ label {
  color: #777;
}

.funkyradio input[type='checkbox']:checked ~ label::before {
  content: '\2714';
  color: #333;
  text-indent: 4px;
  background-color: #ccc;
}

.funkyradio input[type='checkbox']:focus ~ label::before {
  box-shadow: 0 0 0 3px #999;
}

.funkyradio-default input[type='checkbox']:checked ~ label::before {
  color: #fff;
  background-color: var(--orange);
}

/* Select 2 */
.select2-container {
  width: auto !important;
}

/* Errors */
.field_with_errors input {
  border: 1px solid red;
}

.field_with_errors .select2-selection {
  border: 1px solid red;
  border-radius: 4px;
}

/* https://css-tricks.com/snippets/css/prevent-long-urls-from-breaking-out-of-container/ */
.dont-break-out {
  overflow-wrap: break-word;
}

.required::before {
  content: '*';
  font-weight: bold;
  color: #f00;
}

.red {
  color: #f00;
}

/* Style buttons to look like links */
button.link-button {
  cursor: pointer;

  padding: 0;
  border: none;

  font: inherit;
  color: var(--orange);
  text-decoration: none;

  background: none;
}

button.link-button:hover {
  text-decoration: underline;
}

/* Hide all Widearea wrappers when overlay is present */
body:has(.widearea-overlayLayer) .widearea-wrapper {
  display: none !important;
}

/* Down arrow for Select2 multi-select */
.select2-container--bootstrap .select2-selection--multiple {
  position: relative;
  padding-right: 26px;
}

.select2-container--bootstrap .select2-selection--multiple::before {
  pointer-events: none;
  content: '';

  position: absolute;
  top: 50%;
  right: 10px;

  margin-top: -2px;
  border-color: #999 transparent transparent;
  border-style: solid;
  border-width: 4px 4px 0;
}

/* When the clear "×" exists, hide the arrow */
.select2-container--bootstrap
  .select2-selection--multiple:has(.select2-selection__clear)::before {
  display: none;
}
