.centralize-text {
  text-align: center;
}

.nav-active {
  text-decoration: underline !important;
}

/* Basic picocss alerts */

.alert {
  font-size: 0.875em;
  margin-bottom: 1rem; /* some default space below alert element */
  padding: 0.75rem 1rem; /* same as forms .input */
  border-radius: 0.5rem;
  /* color: var(--color); */
  background-color: var(--background-color);
  border: 1px solid var(--background-color); /* compensate for 1px border */

  /* icon */
  background-image: var(--icon);
  background-position: center left 0.75rem; /* use vertical for icon left align */
  background-size: 1.5rem auto; /* 24px icon size */
  background-repeat: no-repeat;
  padding-left: 2.85rem; /* 0.75rem + 1.5rem + 1rem = space + icon + padding */
}

.commit {
  color: #c0c0c0;
  font-size: 0.625rem;
}

.alert-danger {
  --background-color: #ffffff;
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23b71c1c'%3E%3Cpath fill-rule='evenodd' d='M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14ZM8 4a.75.75 0 0 1 .75.75v3a.75.75 0 0 1-1.5 0v-3A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z' clip-rule='evenodd'/%3E%3C/svg%3E");
  --color: #b71c1c;
}

.alert-warning {
  --background-color: #ffffff;
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23e65100'%3E%3Cpath fill-rule='evenodd' d='M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0ZM9 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM6.75 8a.75.75 0 0 0 0 1.5h.75v1.75a.75.75 0 0 0 1.5 0v-2.5A.75.75 0 0 0 8.25 8h-1.5Z' clip-rule='evenodd'/%3E%3C/svg%3E");
  --color: #e65100;
}

.alert-success {
  --background-color: #ffffff;
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%231b5e20'%3E%3Cpath fill-rule='evenodd' d='M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm3.844-8.791a.75.75 0 0 0-1.188-.918l-3.7 4.79-1.649-1.833a.75.75 0 1 0-1.114 1.004l2.25 2.5a.75.75 0 0 0 1.15-.043l4.25-5.5Z' clip-rule='evenodd'/%3E%3C/svg%3E");
  --color: #1b5e20;
}

/* Alternativa: Alert suspenso no canto superior direito */
.alert-suspended-corner-up {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  max-width: 400px;
  width: auto;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.alert-suspended-corner-down {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  max-width: 400px;
  width: auto;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.align-right {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pico-muted-color);
}

.align-right-each {
  position: absolute;
  right: 1rem;
  transform: translateY(-50%);
  color: var(--pico-muted-color);
}

.commit {
  color: #c0c0c0;
  font-size: 0.625rem;
}

[x-cloak] {
  display: none !important;
}

/* Dropdown menu styles */
.dropdown-menu {
  position: relative;
}

.dropdown-menu > a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dropdown-arrow {
  transition: transform 0.2s ease;
}

.dropdown-arrow.rotated {
  transform: rotate(180deg);
}

.dropdown-submenu {
  position: absolute;
  top: 80%;
  left: 0;
  background: var(--pico-background-color);
  border: 1px solid var(--pico-muted-border-color);
  border-radius: var(--pico-border-radius);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  min-width: 120px;
  padding: 0.25rem 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
}

.dropdown-submenu li {
  margin: 0 !important;
  padding: 0 !important;
  display: block;
  width: 100%;
}

.dropdown-submenu li + li {
  margin-top: 0.125rem !important;
}

.dropdown-submenu a {
  display: block !important;
  padding: 0.375rem 0.75rem !important;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.9rem;
  width: 100% !important;
  box-sizing: border-box;
  margin: 0 !important;
  text-align: center;
}

.dropdown-submenu a:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: dark) {
  .dropdown-submenu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
}
