.mb-4 {
  margin-bottom: 1rem;
}
.mb-8 {
  margin-bottom: 2rem;
}

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

.flex {
  display: flex;
}
.justify-end {
  justify-content: flex-end;
}
.items-center {
  align-items: center;
}
.gap-4 {
  gap: 1rem;
}

/* Prevent scrolling while dialog is open */
body:has(dialog[data-dialog-target="dialog"][open]) {
  overflow: hidden;
}

/* Customize the dialog backdrop */
dialog {
  box-shadow: 0 0 0 100vw rgb(0 0 0 / 0.5);
  border: none;
  border-radius: 8px;
  min-width: 300px;
  max-width: 90vw;
}

@keyframes fade-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes fade-out {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* Add animations */
dialog[data-dialog-target="dialog"][open] {
  animation: fade-in 200ms forwards;
}

dialog[data-dialog-target="dialog"][closing] {
  animation: fade-out 200ms forwards;
}
.radio-button-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.radio-button {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.radio-button label {
  cursor: pointer;
  margin: 0;
}

.label-normal {
  font-weight: normal;
}

input {
  box-sizing: border-box;
}
input[type="radio"], input[type="checkbox"] {
  accent-color: #42595a;
  width: 1rem;
  height: 1rem;
}

.error-container {
  color: red;
  font-weight: 600;
}
/* Overlay für den ausgegrauten Hintergrund */
.form-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Halbdurchsichtiges Grau */
  display: none; /* Unsichtbar, bis das Formular abgesendet wird */
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* Box für den Spinner und den Text */
.spinner-box {
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Spinner Styling */
.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #42595a;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem auto;
}

/* Keyframes für die Drehung des Spinners */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Text in der Box */
.spinner-text {
  font-size: 1.2rem;
  color: #42595a;
}
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup {
  background: white;
  padding: 20px;
  border-radius: 5px;
  text-align: center;
  max-width: 400px;
  width: 100%;
}

.popup-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.btn-red {
  background-color: red;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.btn-green-primary {
  background-color: darkgreen;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
/* Grundlegendes CSS für die gesamte Seite */
@font-face {
  font-family: "Centra No2";
  src: url("<%= asset_path("Centra-No2-Regular.woff2") %>") format("woff2"),
    url("<%= asset_path("Centra-No2-Regular.woff") %>") format("woff");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Centra No2";
  src: url("<%= asset_path("Centra-No2-Bold.woff2") %>") format("woff2"),
    url("<%= asset_path("Centra-No2-Bold.woff") %>") format("woff");
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: "Centra No2";
  src: url("<%= asset_path("Centra-No2-Medium.woff2") %>") format("woff2"),
    url("<%= asset_path("Centra-No2-Medium.woff") %>") format("woff");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "Centra No2";
  src: url("<%= asset_path("Centra-No2-Light.woff2") %>") format("woff2"),
    url("<%= asset_path("Centra-No2-Light.woff") %>") format("woff");
  font-weight: 300;
  font-style: normal;
}

body {
  height: 100%;
  margin: 0;
  font-family: "Centra No2", ui-sans-serif, system-ui, sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  background-color: #f0f0f0;
  color: #262625;
}

a {
  text-decoration: none;
  color: #262625;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* Layout für Navigation und Hauptinhalt */
.wrapper {
  display: flex;
  height: 100vh;
}

.navbar {
  background-color: #b7d0bd;
  color: #262625;
  width: 210px; /* Feste Breite */
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Platz zwischen Inhalt und Footer */
  padding: 15px;
  padding-right: 8px;
  box-sizing: border-box;
}

.navbar-top {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
}

.navbar-admin-badge {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #5a6b5f;
  margin-bottom: 0.4rem;
}

.navbar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.navbar-logo {
  font-size: 1.05rem;
  font-weight: bold;
  white-space: nowrap;
}

.navbar-icons {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.navbar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin: 0;
  border-radius: 6px;
  color: #262625;
  transition: background-color 0.15s ease;
}

.navbar-icon svg {
  width: 17px;
  height: 17px;
}

.navbar-icon:hover {
  background-color: rgba(38, 38, 37, 0.12);
  text-decoration: none;
}

.navbar-section {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.navbar-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5a6b5f;
  padding-bottom: 0.35rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid rgba(38, 38, 37, 0.15);
}

.navbar a {
  font-size: 0.85rem;
  margin: 0.2rem 0;
  font-weight: 500;
}

.navbar a:hover {
  text-decoration: underline;
}

.navbar .navbar-icon {
  font-size: initial;
}

.navbar .copyright {
  font-size: 12px;
  color: #6b6b6b; /* Hellerer Farbton als der Standardtext */
  text-align: left;
  margin-top: auto; /* Schiebt das Copyright nach unten */
}

.navbar .commit-id {
  font-size: 9px;
  line-height: 1.2;
  color: #8a8a8a;
  margin-top: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.main-content {
  box-sizing: border-box;
  height: 100vmin;
  min-height: fit-content;
  overflow: visible;
  margin-left: 200px; /* Platz für die Navigation (Breite + Padding der Navigation) */
  background-color: #ffffff;
  padding: 2rem;
  overflow-y: auto;
  flex-grow: 1;
}

.home__image {
  display: block;
  max-width: 280px;
  width: 100%;
  height: auto;
  margin-top: 1rem;
}

/* Buttons Styles */
.btn-base {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  margin-top: 10px;
  margin-right: 10px;
  margin-left: 0px;
  border-radius: 9999px;
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  gap: 0.5rem;
  width: fit-content;
  height: fit-content;
  line-height: 22px;
  padding: 10px 20px;
  border: none;
  cursor: pointer;
}

.btn-small {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.btn-dark-primary {
  background-color: #262625;
  color: #fff;
}

.btn-dark-primary:disabled {
  background-color: #a3b1b2;
  color: #ffffff; /* Falls du den Text auch anpassen möchtest */
  cursor: not-allowed;
}

.btn-disabled {
  background-color: #a3b1b2; /* Deaktivierte Hintergrundfarbe */
  color: #ffffff; /* Textfarbe für den deaktivierten Zustand */
  cursor: wait; /* Verhindert, dass der Button klickbar erscheint */
  opacity: 0.65; /* Optional, um den deaktivierten Button etwas blasser erscheinen zu lassen */
}

.btn-dark-primary:disabled {
  background-color: #a3b1b2; /* Fallback, falls `btn-disabled` nicht angewendet wird */
  cursor: wait;
}

.btn-dark-secondary {
  background-color: #444;
  color: #fff;
}

.btn-green-primary {
  background-color: #42595a;
  color: #fff;
}

.btn-green-secondary {
  background-color: #5a7677;
  color: #262625;
}

.btn-light-primary {
  background-color: #f0f0f0;
  color: #262625;
}

.btn-light-secondary {
  background-color: #e0e0e0;
  color: #444;
}

.btn-red-primary {
  background-color: #9c3333;
  color: #fff;
}

/* Formular */
.field {
  margin-bottom: 0.5rem;
  width: auto;
  min-height: 35px;
}

label, .label {
  font-weight: bold;
  margin-bottom: 0.5rem;
  display: block;
}

input[type="text"],
input[type="date"],
input[type="password"],
select {
  width: 90%;
  padding: 0.75rem;
  border-radius: 5px;
  border: 1px solid #ccc;
  font-size: 16px;
  margin-bottom: 1rem;
}

input[type="submit"] {
  border: none;
  outline: none;
  font-family: inherit;
}

.actions input[type="submit"] {
  background-color: #42595a;
  color: white;
  cursor: pointer;
}

.actions input[type="submit"]:hover {
  background-color: #5a7677;
}

.notice,
.alert {
  padding: 1rem;
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 1rem;
  display: block;
}

/* Notice Box: Heller Hintergrund wie die Buttons */
.notice {
  background-color: #e8f0f1; /* Leichter Hintergrund passend zu den Button-Farben */
  color: #42595a; /* Textfarbe passend zu den Button-Texten */
  border: none;
}

/* Alert Box: Helles Gelb */
.alert {
  background-color: #fff3cd; /* Helles Gelb für die Warnung */
  color: #856404; /* Passende Textfarbe */
  border: none;
}

/* Responsivität */
@media (max-width: 768px) {
  .navbar {
    width: 200px;
  }

  .navbar-logo {
    font-size: 1.05rem;
  }

  .main-content {
    margin-left: 200px; /* Anpassung für mobile Ansichten */
  }
}

.visible {
  display: flex;
}

.hidden {
  display: none;
}

.login-form {
  max-width: 350px;
  margin: auto;
}

.generic-form {
  max-width: 350px;
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 10px;
  padding: 10px;
  max-width: 800px;
}

.entry-list { list-style: none; margin: 0; padding: 0; max-width: fit-content;}
.entry-list li { 
  padding: 10px 12px; 
  border: 1px solid #e6e6e6; 
  border-radius: 6px; 
  background: #fafafa; 
  margin-bottom: 10px;
}

.group-attribute-block {
  margin-left: 20px;
  margin-bottom: 15px;
  border-left: 2px solid #ccc;
  padding-left: 10px;
}

.suggestion {
  cursor: pointer;
  margin: 5px;
  padding: 5px;
}

.suggestion:hover {
  background-color: #b7d0bd;
}

:disabled,
[disabled],
[aria-disabled="true"] {
  cursor: not-allowed !important;
}

.page-loader {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loader {
  width: 30px;
  padding: 8px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #42595A;
  --_m: 
    conic-gradient(#0000 10%,#000),
    linear-gradient(#000 0 0) content-box;
  -webkit-mask: var(--_m);
          mask: var(--_m);
  -webkit-mask-composite: source-out;
          mask-composite: subtract;
  animation: l3 1s infinite linear;
}
@keyframes l3 {to{transform: rotate(1turn)}}

.turbo-progress-bar {
  display: none;
}

/* moresophy KI-Chat */
.chat {
  max-width: 820px;
}

.chat__title {
  margin: 0 0 1rem;
}

.chat__transcript {
  height: 55vh;
  min-height: 300px;
  overflow-y: auto;
  padding: 1rem;
  border: 1px solid #d9d9d9;
  border-radius: 12px;
  background-color: #f7f7f5;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat__empty {
  color: #8a8a8a;
  margin: auto;
  text-align: center;
  font-weight: 300;
}

.chat__bubble {
  max-width: 80%;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  line-height: 1.4;
}

.chat__bubble--user {
  align-self: flex-end;
  background-color: #b7d0bd;
  color: #262625;
}

.chat__bubble--assistant {
  align-self: flex-start;
  background-color: #eef0f2;
  border: 1px solid #e2e5e9;
  max-width: 90%;
  position: relative;
  padding-right: 2.4rem;
}

.chat__copy {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid #d7dadf;
  border-radius: 6px;
  background-color: #ffffff;
  color: #5a6b5f;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.chat__bubble--assistant:hover .chat__copy,
.chat__copy:focus-visible {
  opacity: 1;
}

.chat__copy:hover {
  background-color: #f0f2f4;
}

.chat__copy.is-copied {
  opacity: 1;
  color: #2e7d32;
  border-color: #a5d6a7;
}

.chat__role {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.65;
  margin-bottom: 0.2rem;
}

.chat__content {
  font-family: "Centra No2", ui-sans-serif, system-ui, sans-serif;
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.55;
}

.chat__content p {
  margin: 0 0 0.5rem;
}

.chat__content p:last-child {
  margin-bottom: 0;
}

.chat__content ul,
.chat__content ol {
  margin: 0.3rem 0 0.5rem;
  padding-left: 1.25rem;
}

.chat__content li {
  margin-bottom: 0.2rem;
}

.chat__content h1,
.chat__content h2,
.chat__content h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0.5rem 0 0.3rem;
}

.chat__content strong {
  font-weight: 500;
}

.chat__content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  background-color: rgba(0, 0, 0, 0.05);
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
}

.chat__form {
  margin-top: 0;
}

.chat__mate {
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  padding: 0.35rem 0.9rem 0.5rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}

.chat__mate-legend {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5a6b5f;
  padding: 0 0.3rem;
}

.chat__mate-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.5rem;
}

.chat__mate-option {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.chat__composer {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

.chat__input {
  flex: 1 1 auto;
  box-sizing: border-box;
  padding: 0.7rem 0.85rem;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  font-family: "Centra No2", ui-sans-serif, system-ui, sans-serif;
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.4;
  resize: vertical;
}

.chat__send {
  flex: 0 0 auto;
  white-space: nowrap;
}

.chat__timer {
  margin-left: auto;
  flex: 0 0 auto;
  min-width: 3.2rem;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 500;
  color: #b0b0b0;
  font-variant-numeric: tabular-nums;
}

.chat__timer.is-running {
  color: #5a6b5f;
}

.chat__reset {
  margin-left: 0.75rem;
  flex: 0 0 auto;
  font-size: 0.8rem;
  font-weight: 500;
  color: #262625;
  background-color: #ececec;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  padding: 0.3rem 0.7rem;
  text-decoration: none;
  white-space: nowrap;
}

.chat__reset:hover {
  background-color: #e0e0e0;
}

.chat__bubble--error {
  align-self: flex-start;
  background-color: #fdecea;
  border: 1px solid #f5c6c2;
  color: #8a1f16;
  max-width: 90%;
}

.chat__pending {
  opacity: 0.85;
}

.chat__dots::after {
  content: "\2026";
  animation: chat-dots 1.2s steps(4, end) infinite;
}

@keyframes chat-dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}
