.flag-alert,
.unflag-alert {
  width: 100%;
  --flag-alert-bg-color: #f8d7da;
  --flag-alert-color: #721c24;
  --unflag-alert-bg-color: #d4edda;
  --unflag-alert-color: #155724;
  --unflag-alert-bg-color-opacity: 1.0;
  position: fixed;
  z-index: 1050;
  display: none;
  opacity: var(--unflag-alert-bg-color-opacity, 1.0);
}

.flag-alert.show,
.unflag-alert.show {
  display: block;
}

.flag-alert {
  background-color: var(--flag-alert-bg-color);
  color: var(--flag-alert-color);
}

.unflag-alert {
  width: 100%;
  background-color: var(--unflag-alert-bg-color);
  color : var(--unflag-alert-color);
}

.flag-alert.top,
.unflag-alert.top {
  top: 0;
  left: 0;
  right: 0;
  box-shadow: 0 2px 10px rgb(var(--bs-body-color-rgb), 0.2);
}

.flag-alert.bottom,
.unflag-alert.bottom {
  bottom: 0;
  left: 0;
  right: 0;
  box-shadow: 0 -2px 10px rgb(var(--bs-body-color-rgb), 0.2);
}

.flag-alert.middle,
.unflag-alert.middle {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(var(--bs-site-max-width) / 2);
  box-shadow: 0 2px 10px rgb(var(--bs-body-color-rgb), 0.2);
}

.flag-alert .message,
.unflag-alert .message {
  max-width: var(--bs-site-max-width);
  margin: 0 auto;
  min-height: 3rem;
}

.flag-alert .message,
.unflag-alert .message {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0;
  gap: 1.5rem;
  position: static;
  line-height: 3.5rem;
}

.flag-alert .message a,
.unflag-alert .message a {
  color: var(--bs-body-color);
  text-decoration: none;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bs-body-bg);
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  line-height: 1;
}

.flag-alert .message a:hover,
.unflag-alert .message a:hover {
  text-decoration: underline;
}

.flag-alert button.close,
.unflag-alert button.close {
  display: flex;
  align-items: center;
  position: absolute;
  top: 0;
  right: 2.5rem;
  height: 100%;
  background: transparent;
  border: none;
  font-size: 2rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .flag-alert .message,
  .unflag-alert .message {
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 2.5rem;
    line-height: 1.5;
  }
  .flag-alert .message a,
  .unflag-alert .message a {
    padding-top:0.3rem;
    padding-bottom: 0.3rem;
  }
  .flag-alert button.close,
  .unflag-alert button.close {
    right: 0.8rem;
  }
}
