/* Anpassungen für das Darktheme */

@media (prefers-color-scheme: dark) {
  
  .table-striped tr td {
    color: #a9a9a9 !important;
    border: none !important;
    font-weight: 300 !important;
  }

  .table-striped tr th {
    color: #a9a9a9 !important;
    border: none !important;
    font-weight: 400 !important;
  }

  .tableroundborder {
    border-collapse: separate;
    border-spacing: 0;
    border-collapse: separate;
    border-radius: 10px;
    border: 1px solid;
    border-color: rgba(45, 45, 45);
  }

  .alert-secondary {
    background-color: #222 !important;
  }

  .text-secondary {
    color: #8c8c8c !important;
  }
  .text-primary {
    color: #3b9eff !important;
  }
  .form-check-label {
    color: #a9a9a9 !important;
  }

  .text-detail {
    color: #c9c9c9 !important;
  }

  /* Override black text in dark mode */
  .h5, h5, .modal-body .h5, .modal-body h5 {
    color: #c9c9c9 !important;
  }

  /* Ensure modal content text is readable - ABER inline color styles müssen funktionieren! */
  .modal-body {
    color: #c9c9c9;
  }

  .modal-body p:not([style*="color"]),
  .modal-body span:not([style*="color"]):not(.trumbowyg-editor span),
  .modal-body div:not([style*="color"]):not(.trumbowyg-editor):not(.trumbowyg-editor div) {
    color: #c9c9c9;
  }

  /* Specific fixes for labels and form elements */
  .control-label, .form-label {
    color: #c9c9c9 !important;
  }

  .form-control[readonly] {
    background-color: #222 !important;
  }

  .dropdown-item:hover {
    background-color: #3e3e3e !important;
    border-radius: 8px;
    box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.3);
  }

  body {
    /* War 0.5 und 0.8 */
    /* background:
      linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(18, 18, 18, 0)),
      url('/Media/BackgroundImages/darkbg.jpg') no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    background-color: rgba(0, 0, 0) !important; */
        background-image: url('/Media/BackgroundImages/darkbg.jpg');
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-position: center center;
  }
  
  /* Fallback animated background when no image is loaded */
  body.no-bg-image {
    background: #0F172A;
    background-image: none;
    color: #F3F4F6;
    transition: all 0.3s ease;
  }
  
  /* Animated background container */
  .animated-bg {
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background: linear-gradient(125deg, #0F172A 0%, #1E3A8A 25%, #0F172A 50%, #1E293B 75%, #0F172A 100%);
  }
  
  body.no-bg-image .animated-bg {
    display: block;
  }
  
  .animated-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
  }
  
  /* Particles */
  .particle {
    position: fixed;
    pointer-events: none;
    opacity: 0.6;
    background: rgba(96, 165, 250, 0.6);
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.6);
    border-radius: 50%;
    animation: float 20s infinite;
    filter: blur(1px);
    z-index: -1;
  }
  
  body.no-bg-image .particle {
    display: block;
  }
  
  body:not(.no-bg-image) .particle {
    display: none;
  }

  /* Dropzone Uploader */
  .dropzone {
    background-color: #222 !important;
    border-radius: 3px !important;
    /* border: 1px solid #515151; */
    padding: 0.375rem 0.75rem;
  }

  /* Card Hintergrund abdunkeln, transparent*/
  .card {
    background-color: rgba(12, 12, 12, 0.6) !important;
    border-radius: 10px !important;

  }
  .card-header-button  {
    background-color: rgba(12, 12, 12, 1) !important;
    border: none !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }
  
  .card-header-button .card-body {
    border: none !important;
  }
  
  /* Spezifische Regeln für Farbklassen in card-header-button im Dark Theme */
  .card-header-button .text-primary,
  .card-header-button .text-primary h5,
  .card-header-button .text-primary span {
    color: #6ea8fe !important;
  }
  
  .card-header-button .text-success,
  .card-header-button .text-success h5,
  .card-header-button .text-success span {
    color: #75b798 !important;
  }
  
  .card-header-button .text-info,
  .card-header-button .text-info h5,
  .card-header-button .text-info span {
    color: #6edff6 !important;
  }
  
  .card-header-button .text-warning,
  .card-header-button .text-warning h5,
  .card-header-button .text-warning span {
    color: #fd7e14 !important;
  }
  
  /* Globale text-warning Farbe überschreiben */
  .text-warning {
    color: #fd7e14 !important;
  }
  
  /* Globale text-danger Farbe für Dark Mode */
  .text-danger {
    color: #ea868f !important;
  }
  
  /* Globale text-success Farbe für Dark Mode */
  .text-success {
    color: #75b798 !important;
  }
  
  /* Bootstrap warning CSS-Variablen überschreiben */
  :root {
    --bs-warning: #fd7e14;
    --bs-warning-rgb: 253, 126, 20;
  }
  
  /* Button-Outline warning Farbe */
  .btn-outline-warning {
    --bs-btn-color: #fd7e14;
    --bs-btn-border-color: #fd7e14;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #fd7e14;
    --bs-btn-hover-border-color: #fd7e14;
    --bs-btn-focus-shadow-rgb: 253, 126, 20;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #fd7e14;
    --bs-btn-active-border-color: #fd7e14;
  }
  
  /* Button warning Farbe */
  .btn-warning {
    --bs-btn-color: #000;
    --bs-btn-bg: #fd7e14;
    --bs-btn-border-color: #fd7e14;
    --bs-btn-hover-color: #000;
    --bs-btn-hover-bg: #ffaa5c;
    --bs-btn-hover-border-color: #ff9f47;
    --bs-btn-focus-shadow-rgb: 217, 108, 17;
    --bs-btn-active-color: #000;
    --bs-btn-active-bg: #ff9f47;
    --bs-btn-active-border-color: #ff9338;
  }

  /* Button-Outline primary Farbe */
  .btn-outline-primary {
    --bs-btn-color: #3b9eff !important;
    --bs-btn-border-color: #3b9eff !important;
    --bs-btn-hover-color: #fff !important;
    --bs-btn-hover-bg: #3b9eff !important;
    --bs-btn-hover-border-color: #3b9eff !important;
    --bs-btn-focus-shadow-rgb: 59, 158, 255 !important;
    --bs-btn-active-color: #fff !important;
    --bs-btn-active-bg: #3b9eff !important;
    --bs-btn-active-border-color: #3b9eff !important;
    color: #3b9eff !important;
    border-color: #3b9eff !important;
  }

  .btn-outline-primary:hover {
    color: #fff !important;
    background-color: #3b9eff !important;
    border-color: #3b9eff !important;
  }

  /* Button primary Farbe */
  .btn-primary {
    --bs-btn-color: #fff !important;
    --bs-btn-bg: #3b9eff !important;
    --bs-btn-border-color: #3b9eff !important;
    --bs-btn-hover-color: #fff !important;
    --bs-btn-hover-bg: #2a8eef !important;
    --bs-btn-hover-border-color: #1f84e5 !important;
    --bs-btn-focus-shadow-rgb: 59, 158, 255 !important;
    --bs-btn-active-color: #fff !important;
    --bs-btn-active-bg: #1f84e5 !important;
    --bs-btn-active-border-color: #1478d0 !important;
    background-color: #3b9eff !important;
    border-color: #3b9eff !important;
  }

  .btn-primary:hover {
    background-color: #2a8eef !important;
    border-color: #1f84e5 !important;
  }

  /* Button-Outline info Farbe */
  .btn-outline-info {
    --bs-btn-color: #3dd5f3 !important;
    --bs-btn-border-color: #3dd5f3 !important;
    --bs-btn-hover-color: #000 !important;
    --bs-btn-hover-bg: #3dd5f3 !important;
    --bs-btn-hover-border-color: #3dd5f3 !important;
    --bs-btn-focus-shadow-rgb: 61, 213, 243 !important;
    --bs-btn-active-color: #000 !important;
    --bs-btn-active-bg: #3dd5f3 !important;
    --bs-btn-active-border-color: #3dd5f3 !important;
    color: #3dd5f3 !important;
    border-color: #3dd5f3 !important;
  }

  .btn-outline-info:hover {
    color: #000 !important;
    background-color: #3dd5f3 !important;
    border-color: #3dd5f3 !important;
  }

  /* Button info Farbe */
  .btn-info {
    --bs-btn-color: #000 !important;
    --bs-btn-bg: #3dd5f3 !important;
    --bs-btn-border-color: #3dd5f3 !important;
    --bs-btn-hover-color: #000 !important;
    --bs-btn-hover-bg: #25c9e8 !important;
    --bs-btn-hover-border-color: #1ec4e5 !important;
    --bs-btn-focus-shadow-rgb: 61, 213, 243 !important;
    --bs-btn-active-color: #000 !important;
    --bs-btn-active-bg: #1ec4e5 !important;
    --bs-btn-active-border-color: #16bfe1 !important;
    background-color: #3dd5f3 !important;
    border-color: #3dd5f3 !important;
  }

  .btn-info:hover {
    background-color: #25c9e8 !important;
    border-color: #1ec4e5 !important;
  }

  /* Button-Outline secondary Farbe */
  .btn-outline-secondary {
    --bs-btn-color: #a8a8a8 !important;
    --bs-btn-border-color: #a8a8a8 !important;
    --bs-btn-hover-color: #000 !important;
    --bs-btn-hover-bg: #a8a8a8 !important;
    --bs-btn-hover-border-color: #a8a8a8 !important;
    --bs-btn-focus-shadow-rgb: 168, 168, 168 !important;
    --bs-btn-active-color: #000 !important;
    --bs-btn-active-bg: #a8a8a8 !important;
    --bs-btn-active-border-color: #a8a8a8 !important;
    color: #a8a8a8 !important;
    border-color: #a8a8a8 !important;
  }

  .btn-outline-secondary:hover {
    color: #000 !important;
    background-color: #a8a8a8 !important;
    border-color: #a8a8a8 !important;
  }

  /* Button secondary Farbe */
  .btn-secondary {
    --bs-btn-color: #000 !important;
    --bs-btn-bg: #a8a8a8 !important;
    --bs-btn-border-color: #a8a8a8 !important;
    --bs-btn-hover-color: #000 !important;
    --bs-btn-hover-bg: #959595 !important;
    --bs-btn-hover-border-color: #8d8d8d !important;
    --bs-btn-focus-shadow-rgb: 168, 168, 168 !important;
    --bs-btn-active-color: #000 !important;
    --bs-btn-active-bg: #8d8d8d !important;
    --bs-btn-active-border-color: #858585 !important;
    background-color: #a8a8a8 !important;
    border-color: #a8a8a8 !important;
  }

  .btn-secondary:hover {
    background-color: #959595 !important;
    border-color: #8d8d8d !important;
  }

  .card-header-button .text-danger,
  .card-header-button .text-danger h5,
  .card-header-button .text-danger span {
    color: #ea868f !important;
  }
  

   

  .card-menu {
    background-color: rgba(0, 0, 0, 0.2) !important;
    border-radius: 10px !important;
  }

  .nav-tpbg {
    background-color: rgba(6, 6, 6, 0.8) !important;
  }

  /*Select2 anpassen*/

  /* .select2-hidden-accessible {
        color: #b1b1b1 !important;
    } */

  /* .select2-container--bootstrap-5,
    .select2-selection--single {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='white' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
    }  */

  .modal .select2-selection {
    background-color: #444 !important;
    /* color: #b1b1b1 !important; */
    border: none !important;
  }

  .select2-selection {
    background-color: transparent;
    /* color: #b1b1b1 !important; */
    border: none !important;
  }

  .select2-dropdown {
    background-color: #444 !important;
  }

  .select2-selection__rendered {
    color: #b1b1b1 !important;
  }

  .select2-search__field {
    background-color: #444 !important;
    color: #b1b1b1 !important;
  }

  .select2-results {
    color: #b1b1b1 !important;
    background-color: #555 !important;
  }

  .select2-results__option[aria-selected='true'] {
    background-color: rgb(255, 255, 255, 0.6) !important;
  }

  /*Test 01.03.2023*/
  .select2-container--open {
    z-index: 9999999;
  }

  /*Flatpickr anpassen*/
  @import url('/node_modules/flatpickr/dist/themes/dark.css');

  .btn-dark {
    color: #919191 !important;
  }

  /* Datetimepicker Today farbe setzen*/
  .today {
    background-image: linear-gradient(
      rgb(82, 83, 84),
      rgb(37, 38, 38)
    ) !important;
  }

  .card-modal {
    background-color: rgba(25, 25, 25, 0.4) !important;
    border-radius: 10px !important;
    /* box-shadow: 1px 2px 2px 2px rgba(25, 25, 25, 0.2); */
  }

  .card-chat-me {
    background-color: rgba(25, 25, 25, 1) !important;
    border-radius: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    /* box-shadow: 1px 2px 2px 2px rgba(25, 25, 25, 0.2); */
  }

  .card-chat-other {
    background-color: rgba(50, 50, 50, 1) !important;
    border-radius: 10px !important;
    /* box-shadow: 1px 2px 2px 2px rgba(25, 25, 25, 0.2); */
  }
  .card-todo {
    background-color: rgba(25, 25, 25, 0.4) !important;
    /* background-color: rgba(25, 25, 25, 0.8) !important; */
    border-radius: 10px !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    transition: all 0.2s ease;
  }
  /* .card-todo:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 15px rgba(0,0,0,0.1) !important;
    } */
    
  
  .card-modal-menu {
    background-color: rgba(25, 25, 25, 0.8) !important;
    border-radius: 10px !important;
    /* Apple-like subtle shadow for dark mode */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3),
                0 1px 3px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
  }
  
  .card-modal-menu:hover:not(.active-card) {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5),
                0 3px 6px rgba(0, 0, 0, 0.3);
  }
  .card-modal-form {
    background-color: #444 !important;
  }

  /* Dock */
  /* Button in Dock */
  #Dock {
    position: fixed;
    bottom: 2%;
    left: 1%;
    right: 1%;
    width: 98%;
    max-width: 860px;
    margin: 0 auto;
    z-index: 99;
    font-size: 14px;
    background: linear-gradient(
      180deg,
      rgba(65, 65, 65, 0.8),
      rgba(50, 50, 50, 0.8)
    );
    outline: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 10px;
    box-shadow: 0px 5px 5px 5px rgba(0, 0, 0, 0.3);
  }

  .dock-btn {
    background-color: rgb(24, 24, 24);
    border-radius: 10px;
    transition: transform 0.2s;
    box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8);
  }

  /* Trumbowyg Dark Theme - Modern Approach 2025 */
  
  /* Base Editor Styling */
  .trumbowyg-editor {
    background-color: #121212 !important; /* Material Design recommended dark surface */
    color: #e0e0e0; /* KEIN !important - inline styles für Farben müssen funktionieren! */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* Spezifische Elemente ohne inline color styles bekommen die Standard-Farbe */
  .trumbowyg-editor > *:not([style*="color"]),
  .trumbowyg-editor p:not([style*="color"]),
  .trumbowyg-editor div:not([style*="color"]),
  .trumbowyg-editor span:not([style*="color"]) {
    color: #e0e0e0;
  }
  
  .trumbowyg-textarea {
    background: #121212 !important;
    color: #e0e0e0 !important;
    border-color: #343434 !important;
  }
  
  .trumbowyg-box {
    border: none !important;
    background-color: #121212 !important;
  }
  
  /* Rahmen um den Editor-Wrapper im Dark Mode */
  #trumbowrapper {
    border: 1px solid #343434 !important;
  }
  
  /* Fullscreen Mode Fix - needs background in fullscreen */
  .trumbowyg-box.trumbowyg-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    z-index: 100000 !important;
    background-color: #121212 !important;
  }
  
  /* Trumbowyg Fullscreen innerhalb eines Modals */
  .modal .trumbowyg-box.trumbowyg-fullscreen {
    z-index: 100050 !important;
  }
  
  .trumbowyg-fullscreen .trumbowyg-editor {
    background-color: #121212 !important;
    margin: 0 !important;
    height: calc(100% - 37px) !important;
  }
  
  /* Button-Leiste im Vollbildmodus Dark Mode */
  .trumbowyg-fullscreen .trumbowyg-button-pane {
    position: relative !important;
    z-index: 100051 !important;
    background-color: #1e1e1e !important;
  }
  
  /* Button Pane */
  .trumbowyg-button-pane {
    background-color: rgba(25, 25, 25, 0.6) !important;
    border-bottom-color: #343434 !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  
  .trumbowyg-button-pane::before,
  .trumbowyg-button-pane::after {
    background: #343434 !important;
  }
  
  .trumbowyg-button-pane .trumbowyg-button-group:not(:empty)::after {
    background-color: #343434 !important;
  }
  
  /* Button States */
  .trumbowyg-button-pane button {
    transition: background-color 0.2s ease;
  }
  
  .trumbowyg-button-pane button:not(.trumbowyg-disable):hover,
  .trumbowyg-button-pane button:not(.trumbowyg-disable):focus,
  .trumbowyg-button-pane button.trumbowyg-active {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-radius: 4px;
  }
  
  /* SVG Icons */
  .trumbowyg-box svg {
    fill: #e0e0e0 !important;
    color: #e0e0e0 !important;
  }
  
  .trumbowyg-button-pane button.trumbowyg-active svg {
    fill: #6ea8fe !important; /* Primary color for active state */
  }
  
  /* Dropdown Styling */
  .trumbowyg-dropdown {
    border-color: #343434 !important;
    background: #1e1e1e !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4) !important;
  }
  
  /* Dropdown Buttons - AUSSER Farb-Buttons und Buttons MIT inline styles */
  .trumbowyg-dropdown:not(.trumbowyg-dropdown-foreColor):not(.trumbowyg-dropdown-backColor) button {
    background: #1e1e1e !important;
    color: #e0e0e0 !important;
    transition: background-color 0.2s ease;
  }

  .trumbowyg-dropdown:not(.trumbowyg-dropdown-foreColor):not(.trumbowyg-dropdown-backColor) button:hover,
  .trumbowyg-dropdown:not(.trumbowyg-dropdown-foreColor):not(.trumbowyg-dropdown-backColor) button:focus {
    background: #2a2a2a !important;
  }
  
  .trumbowyg-button-pane .trumbowyg-open-dropdown::after {
    border-top-color: #e0e0e0 !important;
  }
  
  /* Modal Styling */
  .trumbowyg-modal-box {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
    border: 1px solid #343434 !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5) !important;
  }
  
  .trumbowyg-modal-box .trumbowyg-modal-title {
    border-bottom: 1px solid #343434 !important;
    color: #e0e0e0 !important;
    background: #252525 !important;
  }
  
  .trumbowyg-modal-box .trumbowyg-input-row {
    border-color: #343434 !important;
  }
  
  .trumbowyg-modal-box .trumbowyg-input-infos {
    color: #b0b0b0 !important;
    background-color: #1a1a1a !important;
    border-right-color: #343434 !important;
  }
  
  .trumbowyg-modal-box .trumbowyg-input-infos span {
    color: #b0b0b0 !important;
    background-color: #1a1a1a !important;
    border-color: #343434 !important;
  }
  
  .trumbowyg-modal-box .trumbowyg-input-infos span.trumbowyg-msg-error {
    color: #ea868f !important; /* Consistent with your danger color */
  }
  
  /* Form Inputs in Modal */
  .trumbowyg-modal-box input,
  .trumbowyg-modal-box select,
  .trumbowyg-modal-box textarea {
    border: 1px solid #343434 !important;
    color: #e0e0e0 !important;
    background: #121212 !important;
    transition: all 0.2s ease;
  }
  
  .trumbowyg-modal-box input:hover,
  .trumbowyg-modal-box select:hover,
  .trumbowyg-modal-box textarea:hover {
    border-color: #4a4a4a !important;
  }
  
  .trumbowyg-modal-box input:focus,
  .trumbowyg-modal-box select:focus,
  .trumbowyg-modal-box textarea:focus {
    border-color: #6ea8fe !important;
    background-color: #1a1a1a !important;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(110, 168, 254, 0.25) !important;
  }
  
  /* Error State */
  .trumbowyg-modal-box .trumbowyg-input-row.trumbowyg-input-error input,
  .trumbowyg-modal-box .trumbowyg-input-row.trumbowyg-input-error select,
  .trumbowyg-modal-box .trumbowyg-input-row.trumbowyg-input-error textarea {
    border-color: #ea868f !important;
  }
  
  /* Modal Buttons */
  .trumbowyg-modal-box .trumbowyg-modal-button {
    transition: all 0.2s ease;
  }
  
  .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit {
    background: #198754 !important; /* Bootstrap success color */
    color: #fff !important;
    border: none !important;
  }
  
  .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:hover,
  .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:focus {
    background: #157347 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
  }
  
  .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:active {
    background: #146c43 !important;
    transform: translateY(0);
  }
  
  .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset {
    background: #6c757d !important; /* Bootstrap secondary color */
    color: #fff !important;
    border: none !important;
  }
  
  .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:hover,
  .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:focus {
    background: #5c636a !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
  }
  
  .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:active {
    background: #565e64 !important;
    transform: translateY(0);
  }
  
  /* Overlay */
  .trumbowyg-overlay {
    background-color: rgba(0, 0, 0, 0.7) !important;
  }
  
  /* Blur Effect */
  .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor *,
  .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor::before {
    text-shadow: 0 0 7px rgba(255, 255, 255, 0.1) !important;
    color: rgba(224, 224, 224, 0.3) !important;
  }
  
  /* Fullscreen Button Icon Fix */
  .trumbowyg-fullscreen .trumbowyg-button-pane .trumbowyg-button-group:not(:empty) .trumbowyg-fullscreen-button svg {
    color: #e0e0e0 !important;
    fill: transparent !important;
  }
  
  /* Emoji Plugin Dark Mode Support */
  .trumbowyg-dropdown-emoji {
    background-color: #1e1e1e !important;
  }
  
  .trumbowyg-dropdown-emoji button:hover {
    background-color: #2a2a2a !important;
  }
  
  /* Table Plugin Dark Mode Support */
  .trumbowyg-dropdown table {
    background-color: #1e1e1e !important;
  }
  
  .trumbowyg-dropdown table td {
    border-color: #343434 !important;
  }
  
  .trumbowyg-dropdown table td:hover {
    background-color: #2a2a2a !important;
  }
  
  /* Font family and size dropdown dark mode */
  .trumbowyg-dropdown-fontfamily button:hover,
  .trumbowyg-dropdown-fontsize button:hover {
    background-color: #2a2a2a !important;
  }
  
  /* Ensure font buttons are visible in dark mode */
  .trumbowyg-fontfamily-button,
  .trumbowyg-fontsize-button {
    color: #e0e0e0 !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
  }
  
  .trumbowyg-fontfamily-button:hover,
  .trumbowyg-fontsize-button:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
  }
  
  .trumbowyg-fontfamily-button:active,
  .trumbowyg-fontsize-button:active,
  .trumbowyg-fontfamily-button.trumbowyg-active,
  .trumbowyg-fontsize-button.trumbowyg-active {
    background-color: rgba(255, 255, 255, 0.15) !important;
  }

  /* Colors Plugin Dark Mode Fix */
  /* Farb-Dropdown Container */
  .trumbowyg-dropdown-foreColor:not(.trumbowyg-dropdown--color-list),
  .trumbowyg-dropdown-backColor:not(.trumbowyg-dropdown--color-list) {
    background-color: #1e1e1e !important;
    border-color: #343434 !important;
    padding: 8px !important;
    max-width: 300px !important;
  }

  /* Farb-Buttons in der Toolbar sichtbar machen im Dark Mode */
  .trumbowyg-foreColor-button,
  .trumbowyg-backColor-button {
    position: relative !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
  }

  .trumbowyg-foreColor-button svg,
  .trumbowyg-backColor-button svg {
    fill: #e0e0e0 !important;
  }

  .trumbowyg-foreColor-button:hover,
  .trumbowyg-backColor-button:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
  }

  /* WICHTIG: Einzelne Farb-Buttons - Nur Dimensionen und Border, KEIN Background! */
  .trumbowyg-dropdown-foreColor:not(.trumbowyg-dropdown--color-list) button,
  .trumbowyg-dropdown-backColor:not(.trumbowyg-dropdown--color-list) button {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    border: 2px solid #555 !important;
    border-radius: 4px !important;
    padding: 0 !important;
    margin: 2px !important;
    cursor: pointer !important;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
    box-sizing: border-box !important;
    position: relative !important;
    /* WICHTIG: Kein background, background-color oder background-image hier! Die inline styles müssen durchkommen! */
  }

  /* Hover-Effekt für Farb-Buttons */
  .trumbowyg-dropdown-foreColor:not(.trumbowyg-dropdown--color-list) button:hover,
  .trumbowyg-dropdown-backColor:not(.trumbowyg-dropdown--color-list) button:hover {
    transform: scale(1.15) !important;
    border-color: #e0e0e0 !important;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3) !important;
    z-index: 10 !important;
  }

  /* Active State für Farb-Buttons */
  .trumbowyg-dropdown-foreColor:not(.trumbowyg-dropdown--color-list) button.trumbowyg-active,
  .trumbowyg-dropdown-backColor:not(.trumbowyg-dropdown--color-list) button.trumbowyg-active {
    border-color: #6ea8fe !important;
    box-shadow: 0 0 8px rgba(110, 168, 254, 0.5) !important;
    transform: scale(1.1) !important;
  }

  /* "Remove Color" Button (mit background-image) */
  .trumbowyg-dropdown-foreColor button[style*="background-image"],
  .trumbowyg-dropdown-backColor button[style*="background-image"] {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    border: 2px solid #555 !important;
    border-radius: 4px !important;
    padding: 0 !important;
    margin: 2px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
    display: inline-block !important;
    float: left !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: repeat !important;
  }

  .trumbowyg-dropdown-foreColor button[style*="background-image"]:hover,
  .trumbowyg-dropdown-backColor button[style*="background-image"]:hover {
    transform: scale(1.15) !important;
    border-color: #e0e0e0 !important;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3) !important;
  }

  /* "Custom Color (#)" Button - nur Text, kein background-color oder background-image */
  .trumbowyg-dropdown-foreColor button:not([style*="background-color"]):not([style*="background-image"]),
  .trumbowyg-dropdown-backColor button:not([style*="background-color"]):not([style*="background-image"]) {
    background: #2a2a2a !important;
    color: #e0e0e0 !important;
    border: 1px solid #555 !important;
    border-radius: 4px !important;
    padding: 4px 8px !important;
    margin: 2px !important;
    display: block !important;
    width: calc(100% - 4px) !important;
    clear: both !important;
    float: none !important;
    text-indent: 0 !important;
    line-height: 20px !important;
    text-align: center !important;
  }

  .trumbowyg-dropdown-foreColor button:not([style*="background-color"]):not([style*="background-image"]):hover,
  .trumbowyg-dropdown-backColor button:not([style*="background-color"]):not([style*="background-image"]):hover {
    background: #3a3a3a !important;
    border-color: #6ea8fe !important;
  }

  /* Datatables Anpassungen */

  div.dtsp-searchPane div.dataTables_wrapper div.dataTables_scrollBody {
    background: none !important;
    border-bottom: none;
  }

  div.dt-button-collection {
    background-color: rgba(15, 15, 15, 1) !important;
  }

  div.dtsp-searchPane input.dtsp-paneInputButton,
  div.dtsp-searchPane button.dtsp-paneButton {
    background-color: #858585 !important;
  }
  .div--fullscreen {
    background-color: #1a1a1a !important;
  }



  /* Excalidraw fullscreen buttons with info color */
  #exitfs, #excali-fullscreen-btn {
    background-color: transparent !important;
    border-color: #0dcaf0 !important;
    color: #0dcaf0 !important;
  }

  #exitfs:hover, #excali-fullscreen-btn:hover {
    background-color: #0dcaf0 !important;
    border-color: #0dcaf0 !important;
    color: #000 !important;
  }

  /* Treeview Anpassungen */
  .list-group-item:hover {
    background-color: rgba(25, 25, 25, 0.8) !important;
  }

  h5 {
    color: rgba(210, 210, 210) !important;
  }
  .colorpicker {
    background-color: #222 !important;
  }

  .trumbowyg-button-pane {
    background-color: rgba(25, 25, 25, 0.6) !important;
  }

  /* MyKI */
.chat-container {
  background-color: #424141;
  border: 1px solid #323232;
  border-radius: 8px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
}

/* Die Textarea selbst */
.chat-textarea {
  width: 100%;
  height: 100%;
  background: none;
  border: none;
  color: #E8E8E8;
  resize: none; /* kein "Eckenziehen" */
  outline: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

/* Allgemeiner Button-Stil (angelehnt an ChatGPT) */
.chat-btn {
  background: none;
  border: none;
  color: #E8E8E8;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  cursor: pointer;
}

.chat-btn:hover {
  color: #fff;
}

/* Deaktivierter Senden-Button etwas blasser machen */
#send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

  /* Board Sidebar Dark Mode Fixes - Only for mobile/flyout mode */
  @media (max-width: 991px) {
    .board-sidebar {
      background-color: #1a1a1a !important;
      color: #e0e0e0 !important;
    }
  }
  
  /* Board Items */
  .board-wrapper {
    background-color: rgba(40, 40, 40, 0.8) !important;
    border: 1px solid #444 !important;
    color: #e0e0e0 !important;
  }
  
  .board-wrapper:hover {
    background-color: rgba(50, 50, 50, 0.9) !important;
    border-color: #555 !important;
  }
  
  /* Board Title */
  .board-title {
    color: #e0e0e0 !important;
  }
  
  /* Close Button */
  .board-sidebar-close {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid #444 !important;
  }
  
  .board-sidebar-close:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
  }
  
  /* Dropdown Menu im Board Sidebar */
  .board-sidebar .dropdown-menu {
    background-color: #2a2a2a !important;
    border: 1px solid #444 !important;
  }
  
  .board-sidebar .dropdown-menu .btn {
    color: #e0e0e0 !important;
  }
  
  .board-sidebar .dropdown-menu .btn:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
  }
  
  /* Sortable Active State */
  .board-item.sortable-active {
    border-color: #6ea8fe !important;
    background-color: rgba(110, 168, 254, 0.1) !important;
  }
  
  /* Mobile Board Toggle Button Dark Mode */
  .mobile-board-toggle {
    background-color: #2a2a2a !important;
    border: 1px solid #444 !important;
    color: #e0e0e0 !important;
  }
  
  .mobile-board-toggle:hover {
    background-color: #3a3a3a !important;
    border-color: #555 !important;
  }
  
  .mobile-board-toggle .button-text {
    color: #e0e0e0 !important;
  }

  /* ======================
     ANIMATIONEN
     ====================== */

  @keyframes rotate {
    0% { 
      transform: rotate(0deg); 
    }
    100% { 
      transform: rotate(360deg); 
    }
  }

  @keyframes float {
    0%, 100% { 
      transform: translateY(0) translateX(0); 
    }
    25% { 
      transform: translateY(-100px) translateX(100px); 
    }
    50% { 
      transform: translateY(-200px) translateX(-100px); 
    }
    75% { 
      transform: translateY(-100px) translateX(-50px); 
    }
  }

  /* ======================
     MOBILE OPTIMIERUNGEN
     ====================== */

  /* Weniger Partikel auf kleinen Bildschirmen für bessere Performance */
  @media (max-width: 768px) {
    .animated-bg::before {
      animation-duration: 40s; /* Langsamere Animation auf mobilen Geräten */
    }
  }

  /* Partikel auf sehr kleinen Bildschirmen ausblenden */
  @media (max-width: 480px) {
    .particle {
      display: none !important;
    }
  }

  /* Transparenzverlauf für Streaming-Text */
  .bot-response.streaming::after {
    background: linear-gradient(to bottom, transparent 0%, rgba(50, 50, 50, 1) 100%) !important;
  }
}
