/* GENERAL */
body {
  -webkit-font-smoothing: antialiased;
}

/* TABLES */

.table :where(th, td) {
  vertical-align: top;
}

/* LOGO */
.logo {
  background: -webkit-linear-gradient(45deg, hsl(var(--a)) 0%, hsl(var(--p)) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 0 rgba(255, 255, 255, 0);
}
.logo:hover {
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

/* FORM ERRORS */
.errorlist,
.errorlist li {
  padding: 0;
  margin: 0;
  list-style: none;
  white-space: normal;
}

.form-errors .errorlist li::before {
  display: inline-block;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  font: var(--fa-font-solid);
  content: "\f54c";
  margin-right: 0.5rem;
}

/* ROUTES FORMSETS */
.route-formset .label-text {
  display: none;
}
.route-formset :nth-child(-n + 2 of .field-wrapper) .label-text {
  display: block;
}

.formset-wrapper .field-wrapper {
  align-self: end;
}

.route-formset label {
  justify-content: flex-end;
}
.route-formset :nth-child(-n + 2 of .field-wrapper) label {
  justify-content: space-between;
}

/* Select/multiple */
.choices[data-type*="select-multiple"] .choices__list--multiple .choices__item {
  height: auto;
  min-height: 1.25rem;
}

/* DAISY UI THEME */

:root {
  --animation-btn: 0.42s;
  --animation-input: 0.42s;
  --border-btn: 2px;
  --tab-border: 2px;
}

.card-compact .card-body {
  padding: 1.25rem;
}

.card-bordered,
.card.bordered {
  border-width: 2px;
}

/* DAISYUI COLLAPSE FIX */
.collapse input[type="checkbox"] {
  width: 100%;
}

/* TOAST */
.toast {
  white-space: normal;
}
.toast-toggle + * {
  animation-name: fade-out;
  animation-fill-mode: forwards;
  animation-delay: 4.2s;
}
.toast-toggle:checked + * {
  animation-name: also-fade-out;
  animation-delay: 0s !important;
}

/* We have to duplicate the keyframes with a different name or the animation won't work when checked */
@keyframes fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    display: none;
  }
}
@keyframes also-fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    display: none;
  }
}

/* Ace code editor */
.ace-wrapper {
  min-height: 400px;
}
.ace-wrapper + textarea {
  display: none;
}
