/* Set margin and padding to 0, and make body and html height 100% to cover the whole viewport */
* {
  box-sizing: border-box;
}

body,
html {
  background: #F6F6F6;
  font-family: system-ui, sans-serif;
  font-weight: normal;
  font-size: 14px;
}

.wrapper {
  margin: 0 auto;
  max-width: 90ch;
}

.Kopf img {
  display: block;
  margin: 2rem auto;
  width: 100%;
  max-width: 400px;
}

.auswertung {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-block: 0.5rem;
}

.auswertung > div {
  background-color: white;
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
}

.auswertung > div > div:first-child {
  color: gray;
  font-size: 1rem;
}

.auswertung > div > div:last-child {
  font-size: 1.5rem;
  font-weight: 700;
}

/* Wrapper für Textarea + Backdrop */
.highlight-wrapper {
  position: relative;
  margin-block: 1rem;
}

/* Backdrop: zeigt den kompletten Text mit Farbmarkierungen */
.highlight-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 1rem;
  background-color: white;
  border-radius: 10px;
  font-family: system-ui, sans-serif;
  font-size: 1rem;
  line-height: normal;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow: hidden;
  color: #1a1a1a;
  pointer-events: none;
  box-sizing: border-box;
}

/* Markierung: langer Satz (> 25 Wörter) */
mark.hl-sentence {
  background-color: #e07400;
  color: white;
  padding: 1px 0;
  border-radius: 3px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Markierung: langes Wort (≥ 15 Zeichen) — überlagert Orange */
mark.hl-word {
  background-color: #c62828;
  color: white;
  padding: 1px 0;
  border-radius: 3px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Style for rounded text field */
.rounded-text-field {
  background-color: transparent;
  color: transparent;
  caret-color: #1a1a1a;
  border-radius: 10px;
  border: none;
  width: 100%;
  min-height: 55ex;
  font-size: 1rem;
  padding: 1rem;
  margin-block: 0;
  font-family: system-ui, sans-serif;
  position: relative;
  z-index: 1;
  resize: none;
}

.rounded-text-field::placeholder {
  color: #aaa;
}

.rounded-text-field:focus {
  outline-color: #39C55B;
}

/* Zeile unterhalb des Eingabefelds: Toggles links, Icons rechts */
.action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-block: 0.5rem;
}

.toggle-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Toggle-Buttons für Markierungen */
.highlight-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  height: 34px;
  padding: 0 14px;

  border-radius: 6px;
  border: 1.5px solid #ccc;
  background: white;
  color: #1a1a1a;

  font-size: 14px;
  font-family: system-ui, sans-serif;

  cursor: pointer;
  white-space: nowrap;

  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.highlight-toggle img:not(.icon-large) {
  width:16px;
  height:16px;
}

#toggleSentences.is-active {
  background-color: #e07400;
  border-color: #e07400;
  color: white;
}

#toggleWords.is-active {
  background-color: #c62828;
  border-color: #c62828;
  color: white;
}

/* Style for elements with fixed width and height */
.element {
  width: 32px;
  height: 32px;
  overflow: hidden;
  cursor: pointer;
  display: inline-block;
}

.tooltip2 {
  display: inline-block;
  position: relative;
  text-align: left;
}

.tooltip2 .tooltiptext2 {
  min-width: 250px;
  top: 40px;
  left: 50%;
  transform: translate(-50%, 0);
  padding: 5px 5px 5px 5px;
  color: #000000;
  background-color: #FFFFFF;
  font-weight: normal;
  font-family: system-ui;
  font-size: 13px;
  border-radius: 4px;
  position: absolute;
  z-index: 99999999;
  box-sizing: border-box;
  border: 1px solid transparent;
  box-shadow: 0 1px 8px transparent;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.8s;
}

.tooltip2:hover .tooltiptext2 {
  visibility: visible;
  opacity: 1;
}

.tooltip {
  display: inline-block;
  position: relative;
  text-align: center;
}

.tooltip .tooltiptext {
  min-width: 120px;
  top: 40px;
  left: 50%;
  transform: translate(-50%, 0);
  padding: 5px 5px 5px 5px;
  color: #000000;
  background-color: #FFFFFF;
  font-weight: normal;
  font-family: system-ui;
  font-size: 13px;
  border-radius: 4px;
  position: absolute;
  z-index: 99999999;
  box-sizing: border-box;
  border: 1px solid transparent;
  box-shadow: 0 1px 8px transparent;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.8s;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

.dialog-container {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.dialog-content {
  background: white;
  padding: 15px;
  border-radius: 10px;
}

.dialog-content button {
  background-color: #333;
  color: white;
  border: none;
  padding: 10px 20px;
  margin-top: 20px;
  cursor: pointer;
  border-radius: 5px;
  font-size: 14px;
  font-weight: bold;
  font-family: "System UI", sans-serif;
}

.footer {
  color: #97999b;
  font-size: 0.75rem;
  margin-block: 1.5rem;
  text-align: center;
}

.footer *:first-child {
  margin-bottom: 1rem;
}

.footer-logo {
  text-align: center;
  margin-block: 5rem;
}

.custom-menu {
  text-align: center;
  margin-block: 2rem;
  margin-bottom: 10px;
}

.custom-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: inline-block;
}

.custom-menu ul li {
  display: inline;
  margin-right: 20px;
}

.custom-menu ul li a {
  text-decoration: none;
  color: #323232;
  font-size: 15px;
  font-family: "System UI", sans-serif;
  font-weight: bold;
}

.material-symbols-outlined {
  font-variation-settings:
  'FILL' 0,
  'wght' 400,
  'GRAD' 0,
  'opsz' 24;

  font-size:12px;
  line-height:1;
  transform: translateY(1px);
}

.icon-large {
  width:20px;
  height:20px;
  transform: translateY(1px);
}