/*
 * SPDX-FileCopyrightText: 2025-present Tobias Kunze
 * SPDX-License-Identifier: Apache-2.0
 */

.character-limit-highlight-wrapper,
.character-limit-input-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.character-limit-highlight {
  position: absolute;
  top: 1px;
  left: 1px;
  right: 0;
  bottom: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow: auto;
  pointer-events: none;
  display: none;
  color: transparent;
}
.character-limit-textarea {
  position: relative;
  background: transparent;
  z-index: 1;
}
.character-limit-excess {
  background-color: var(--color-danger);
  opacity: 0.25;
  color: transparent;
}

.character-counter-textarea,
.character-counter-input {
  position: absolute;
  z-index: 2;
}
.character-counter-textarea {
  bottom: 8px;
  right: 12px;
}
.character-counter-input {
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
