:root {
  /* tighten up form spacing */
  --pico-form-element-spacing-vertical: 0.5rem;
  --pico-form-element-spacing-horizontal: 0.7rem;
  /* customize picoss so that the overall UI is smaller */
  --pico-font-size: 17px;
}

@media only screen and (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --pico-background-color: #19131f;
  }
}

/* fade multi page changes */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.12s;
}

form label [id$="_err_msg"] {
  padding-left: 0.5em;
  color: #db3f3f;
}

/* also resets browser styles */
#globalToast {
  position: absolute;
  top: 72px;
  right: 36px;
}

.toast {
  /* remove pico css modal styles for dialog */
  top: unset;
  right: unset;
  bottom: unset;
  left: unset;
  min-width: unset;
  min-height: unset;
  backdrop-filter: unset;
  -webkit-backdrop-filter: unset;
  align-items: unset;
  justify-content: unset;
  /* setup default toast styles */
  position: relative;
  height: fit-content;
  width: fit-content;
  max-width: 350px;
  margin-bottom: 8px;
  z-index: 1000;
  /* stack on top of other modals if they are visible */
  padding: 0.9em;
  border: none;
  border-radius: 8px;
  background-color: #b1b1b1;
  color: black;
}

.toast-success {
  background-color: #2a7b6f;
  color: white;
}

.toast-error {
  background-color: #902d2d;
  color: white;
}

.toast[open] {
  animation: fadein 0.3s ease-in forwards;
}

@keyframes fadein {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes fadeout {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

/* icons */


.icon-delete,
.icon-edit {
  display: inline-block;
  width: 24px;
  height: 24px;
  background-color: #808080;
  transition: background-color 0.2s ease;
}

.icon-delete {
  mask: url(/assets/images/delete-icon.svg) no-repeat center/contain;

  button:hover & {
    background-color: #f44336; /* Red on hover for delete */
  }

  button:active & {
    background-color: #d32f2f; /* Darker red when pressed */
  }
}

.icon-edit {
  mask: url(/assets/images/edit-icon.svg) no-repeat center/contain;

  a:hover &,
  button:hover & {
    background-color: #a0a0a0; /* Lighter gray on hover */
  }

  a:active &,
  button:active & {
    background-color: #606060; /* Darker gray when pressed */
  }
}


