/* Einrückung im Parent-Dropdown sichtbar machen */
select#editMenuItemParentId {
  font-family: monospace;
  white-space: pre;
}

* {
    box-sizing: border-box;
  }
  html, body {
    height: 100%;
    margin: 0; 
    padding: 0;
    font-family: Arial, sans-serif;
    background: #f4f4f4;
  }

/* Content Styles */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin-left: 240px;
  transition: margin-left 0.3s ease;
}
.backend-sidebar.collapsed + .page-wrapper {
  margin-left: 60px;
}
main.content {
  flex-grow: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  padding: 80px 20px 60px 20px;
  background: white;
  margin: 0;
  border-radius: 6px;
  box-shadow: 0 0 10px rgb(0 0 0 / 0.1);
}
/* main.content::after {
  content: "";
  display: block;
  height: 1000px;
} */
.card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.1);
  padding: 20px;
  margin-bottom: 20px;
  transition: box-shadow 0.3s ease;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.card:hover {
  box-shadow: 0 8px 20px rgb(0 0 0 / 0.15);
}
.card h2,
.card h3 {
  margin-top: 0;
  margin-bottom: 12px;
  color: #005eff;
  font-weight: 600;
}
.card p {
  color: #555;
  line-height: 1.5;
  font-size: 15px;
  margin-bottom: 10px;
}
.card-footer {
  border-top: 1px solid #eee;
  padding-top: 10px;
  font-size: 14px;
  color: #888;
  text-align: right;
}

/* Grundstil für Tabellen */
table {
  width: 100%;
  max-width: 900px;
  margin-left: 0;
  margin-right: 0;
  border-collapse: collapse;
  font-family: Arial, sans-serif;
  font-size: 16px;
  color: #333;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 5px rgb(0 0 0 / 0.1);
  border-radius: 6px;
  /* overflow: hidden; entfernt, damit Tooltips nicht abgeschnitten werden */
}
/* Tabellenkopf */
table thead tr {
  background-color: #660606;
  color: white;
  text-align: left;
}
/* Tabellenzellen */
table th,
table td {
  padding: 12px 15px;
  border-bottom: 1px solid #ddd;
  text-align: center;
}
/* Zeilen-Hover-Effekt */
table tbody tr:hover {
  background-color: #fbeaea;
  cursor: pointer;
}
/* Letzte Zeile kein Border */
table tbody tr:last-child td {
  border-bottom: none;
}


@media (max-width: 600px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }
  thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  tr {
    margin-bottom: 1rem;
    border-bottom: 1px solid #ccc;
  }
  td {
    border: none;
    position: relative;
    padding-left: 50%;
    text-align: right;
  }
  td::before {
    position: absolute;
    top: 12px;
    left: 15px;
    width: 45%;
    white-space: nowrap;
    font-weight: bold;
    text-align: left;
    content: attr(data-label);
  }
}
table td i {
  font-size: 1.2rem;
  vertical-align: middle;
  margin-right: 8px;
}
table td i.clickable {
  cursor: pointer;
  color: #660606;
  transition: color 0.3s ease;
}
table td i.clickable:hover {
  color: #a80000;
}
table td i.disabled {
  color: #999999;
  cursor: default;
  opacity: 0.5;
  pointer-events: none;
}

/* Menüname in der Tabelle rot */
.table-name .menu-name-edit {
  color: #660606;
  text-decoration: none;
}

/* Zahl der Menüitems als Link rot */
.table-items a {
  color: #660606;
  text-decoration: none;
}

/* Optional: Hover-Effekt für beide */
.table-name .menu-name-edit:hover,
.table-items a:hover {
  color: #900;
}

.message-box {
  position: fixed;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 280px;
  max-width: 90vw;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  z-index: 10500;
  opacity: 0.95;
  cursor: default;
  user-select: none;
  font-size: 1rem;
  display: none;
  align-items: center;
  gap: 10px;
  font-family: Arial, sans-serif;
}
.message-box.show {
  display: flex;
}
.message-box.error {
  background-color: #d93025;
}
.message-box.success {
  background-color: #188038;
}
.message-box.info {
  background-color: #1a73e8;
}
.message-box.warning {
  background-color: #fbbc04;
}
.message-box i {
  font-size: 1.3rem;
}
.test-buttons {
  margin: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.test-buttons button {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: filter 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
  background-clip: padding-box;
}
.test-error {
  background-color: #d93025;
}
.test-error:hover {
  background-color: #bf2821;
}
.test-success {
  background-color: #188038;
}
.test-success:hover {
  background-color: #146830;
}
.test-info {
  background-color: #1a73e8;
}
.test-info:hover {
  background-color: #155fbb;
}
.test-warning {
  background-color: #fbbc04;
  color: #333;
}
.test-warning:hover {
  background-color: #e6a803;
  color: #333;
}
.test-buttons button {
  color: white !important;
  font-weight: 600;
}
.input-group {
  position: relative;
}
input[type="password"], input[type="text"] {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 0.75rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}
.toggle-password {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  cursor: pointer;
  color: #888;
}
.requirements {
  margin-top: 1rem;
  list-style: none;
  padding: 0;
}
.requirements li {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  font-size: 0.95rem;
}
.requirements li i {
  margin-right: 8px;
}
.valid {
  color: green;
}
.invalid {
  color: red;
}
.progress-container {
  margin-top: 1rem;
  background-color: #eee;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
}
.progress-bar {
  height: 10px;
  width: 0%;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-label {
  margin-top: 0.5rem;
  font-weight: bold;
  font-size: 0.95rem;
}
.btn-generator {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background-color: #1a73e8;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.btn-generator:hover {
  background-color: #125cc4;
}
.icon-tooltip-wrapper {
  position: relative;
  display: inline-block;
}
.icon-tooltip {
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 2000;
}
.icon-tooltip-wrapper:hover .icon-tooltip {
  opacity: 1;
  pointer-events: auto;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0; 
  left: 0;
  width: 100vw; 
  height: 100vh;
  background-color: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  box-sizing: border-box;
  z-index: 9999;
}
.modal-overlay.active {
  display: flex;
}
/* Modal */
.modal {
  background: white;
  padding: 20px;
  border-radius: 6px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 0 10px rgba(0,0,0,0.25);
  box-sizing: border-box;
  animation: modalFadeIn 0.3s ease forwards;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
.modal-header {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: #660606;
  position: relative;
  padding-right: 30px;
}
.modal-close-icon {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  padding: 5px 10px;
  transition: color 0.3s ease;
  user-select: none;
}
.modal-close-icon:hover {
  color: #005eff;
}
.modal-body {
  font-size: 1rem;
  color: #333;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.modal-footer {
  display: flex;
  justify-content: center;
  gap: 10px; /* Falls du mehrere Buttons hast */
  margin-top: 40px; /* Abstand nach oben, optional anpassen */
}

.modal-close-btn {
  background: linear-gradient(135deg, #005eff, #003bb5);
  border: none;
  color: white;
  padding: 10px 20px;
  font-size: 1rem;
  border-radius: 25px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 94, 255, 0.4);
  transition: background 0.3s ease, box-shadow 0.3s ease;
  font-weight: 600;
}

.modal-close-btn:hover {
  background: linear-gradient(135deg, #003bb5, #001f70);
  box-shadow: 0 6px 14px rgba(0, 59, 181, 0.6);
}
.open-modal-btn {
  background-color: #005eff;
  color: white;
  border: none;
  padding: 12px 28px;
  font-size: 1.1rem;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 94, 255, 0.5);
  font-weight: 700;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  margin: 2rem;
}
.open-modal-btn:hover {
  background-color: #003bb5;
  box-shadow: 0 7px 20px rgba(0, 59, 181, 0.7);
}
.modal-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.modal-label {
  font-size: 1rem;
  color: #660606;
  font-weight: 500;
  margin-bottom: 2px;
}
.modal-input {
  padding: 10px 14px;
  font-size: 1rem;
  border: 1.5px solid #bbb;   /* <-- hier auf grau (#bbb) ändern */

  border-radius: 6px;
  background: #f7faff;
  color: #222;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  box-shadow: 0 1px 3px rgba(0,94,255,0.07);
}
.modal-input:focus {
  border-color: #bdbdbd;
  box-shadow: 0 2px 8px rgba(0,94,255,0.13);
}
select.modal-input {
  cursor: pointer;
  background: white;
  appearance: none;
}
input[type="number"].modal-input::-webkit-inner-spin-button,
input[type="number"].modal-input::-webkit-outer-spin-button {
  opacity: 0.5;
}

/*Checkbox Styles*/
/* Universelles Styling für alle Checkboxen */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border: 1.5px solid #bbb;   /* <-- hier auf grau (#bbb) ändern */
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  transition: background 0.2s, border-color 0.2s;
  display: inline-block;
}

input[type="checkbox"]:checked {
  background: #660606;
  border-color: #660606;
}

input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 12px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
  pointer-events: none;
}

/* Standard Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  background: transparent;
  border: none;
}
::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 6px;
  border: none;
  transition: background 0.2s;
}

/* Weißer Strich/Overlay nur beim Hover */
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    to bottom,
    #ccc 0%,
    #fff 40%,
    #fff 60%,
    #ccc 100%
  );
}

/* Für Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}
/* Sticky- und Scroll-Button Styles */
.sticky-scroll-container {
  position: fixed;
  bottom: 108px;
  right: 20px;
  z-index: 10500;
}
.sticky-scroll-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
.scroll-btn-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.sticky-btn {
  background-color: #660606;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  cursor: pointer;
  flex-shrink: 0;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
  transition: background-color 0.2s ease, filter 0.2s ease;
}

.scroll-btn {
  background-color: #660606;
  color: white;
  border: none;
  border-radius: 6px;
  width: 40px;
  height: 40px;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  user-select: none;
  transition: background-color 0.2s ease, filter 0.2s ease;
}
.sticky-btn:hover,
.scroll-btn:hover {
  background-color: #660606;
  box-shadow: 0 0 0 100px rgba(255,255,255,0.15) inset;
}
.scroll-btn-container button {
  display: none;
}
.scroll-btn-container button.visible {
  display: flex;
}
.btn-tooltip {
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 4000;
}
.scroll-btn:hover .btn-tooltip,
.sticky-btn:hover .btn-tooltip {
  opacity: 1;
  pointer-events: auto;
}

/* Basis Button */
button {
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 6px;
  border: 2px solid #ccc;
  background-color: blue;
  color: #333;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  user-select: none;
  box-shadow: 0 2px 5px rgb(0 0 0 / 0.1);
}

/* Button Hover */
button:hover {
  background-color: #f0f0f0;
  border-color: #999;
}

/* Button Active (gedrückt) */
button:active,
button.active {
  background-color: #ddd;
  border-color: #666;
  color: #111;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.2);
}

/* Primary Button (blau) */
button.primary {
  background-color: #005eff;
  border-color: #005eff;
  color: white;
  box-shadow: 0 4px 8px rgb(0 94 255 / 0.4);
}

/* Primary Button Hover */
button.primary:hover {
  background-color: #0041b3;
  border-color: #003a9e;
  box-shadow: 0 6px 12px rgb(0 65 179 / 0.6);
}

/* Primary Button Active */
button.primary:active,
button.primary.active {
  background-color: #003080;
  border-color: #002666;
  box-shadow: inset 0 3px 7px rgba(0,0,0,0.5);
}

.menu-page-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: #660606;
  margin-top: 32px;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 8px rgba(102,6,6,0.08);
}
.menu-page-desc {
  font-size: 1.15rem;
  color: #444;
  margin-bottom: 24px;
  margin-top: 0;
  font-weight: 400;
  letter-spacing: 0.2px;
}

.menu-icon {
    color: #660606;
    cursor: pointer;
    font-size: 1em;
    margin: 0 4px;
    transition: color 0.2s, opacity 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    height: 24px;
    width: 24px;
    position: relative;
}
.menu-icon.menu-delete-disabled {
    color: #ccc !important;
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}
.menu-icon:hover:not(.menu-delete-disabled) {
    color: #a00;
        background: transparent;
}

/* Keine Unterstreichung für Menü-Icons als Link */
a.menu-icon {
  text-decoration: none;
  color: #660606;
}

/* Tooltip Styling */
.menu-icon .icon-tooltip {
  display: block;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  left: 50%;
  bottom: 120%;
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.2em;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 1000;
  transition: opacity 0.2s ease;
  border-radius: 4px;
}

.menu-icon:hover .icon-tooltip {
  opacity: 1;
  pointer-events: auto;
}



.menu-id {
    color: #660606;
    font-weight: normal;
    text-align: center;
}
.menu-name {
    font-weight: 600;
    letter-spacing: 0.5px;
}
.menu-footer {
    color: #888;
    font-style: italic;
}
@media (max-width: 700px) {
    .menu-table-header th, .menu-table-row td { font-size: 0.92rem; padding: 8px 4px; }
    .menu-icon { height: 28px; width: 28px; font-size: 1em; }
}

/* Gleichmäßige Abstände zwischen Checkbox und Icons */
.menu-actions {
  display: flex;
  align-items: center;
  gap: 4px; /* Abstand zwischen allen Elementen */
}
.menu-actions input[type="checkbox"] {
  margin: 0;
}
.menu-actions .menu-icon {
  margin: 0;
}

/* Custom Confirm Dialog */
/* .custom-dialog {
  position: fixed;
  z-index: 3000;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}
.custom-dialog-content {
  background: #fff;
  padding: 32px 24px 20px 24px;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  min-width: 320px;
  text-align: center;
}
.custom-dialog-message {
  font-size: 1.1em;
  margin-bottom: 24px;
}
.custom-dialog-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}
.custom-dialog-btn {
  padding: 8px 18px;
  border: none;
  border-radius: 4px;
  background: #eee;
  color: #222;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.2s;
}
.custom-dialog-btn.danger {
  background: #a00;
  color: #fff;
}
.custom-dialog-btn:hover {
  background: #ccc;
}
.custom-dialog-btn.danger:hover {
  background: #c22;
}

/* Picker-Container schöner machen */
/* Picker-Container schöner machen */
/* .iconpicker.dropdown-menu {
  border-radius: 10px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18) !important;
  border: 1px solid #e0e0e0 !important;
  padding: 12px 16px !important;
  background: #fff !important;
  min-width: 320px !important;
} 
 
.iconpicker .iconpicker-item {
  font-size: 1.5em !important;
  margin: 8px !important;
  transition: transform 0.15s, box-shadow 0.15s;
  border-radius: 6px;
}
.iconpicker .iconpicker-item:hover,
.iconpicker .iconpicker-item.iconpicker-selected {
  background: #e3f2fd !important;
  color: #1976d2 !important;
  transform: scale(1.2);
  box-shadow: 0 2px 8px rgba(25,118,210,0.12);
}

.iconpicker .iconpicker-search {
  border-radius: 6px;
  border: 1px solid #bdbdbd;
  padding: 6px 10px;
  margin-bottom: 10px;
  font-size: 1em;
  width: 100%;
  box-sizing: border-box;
}

.iconpicker.dropdown-menu {
  max-height: 350px !important;
  overflow-y: auto !important;
}
.iconpicker.dropdown-menu::-webkit-scrollbar {
  width: 8px;
}
.iconpicker.dropdown-menu::-webkit-scrollbar-thumb {
  background: #e0e0e0;
  border-radius: 4px;
}
.iconpicker .iconpicker-search {
  margin-bottom: 18px !important;
  font-size: 1.1em !important;
  padding: 10px 12px !important;
}

.iconpicker-row {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  max-width: 340px;
}
.icon-picker-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 260px;
  max-height: 200px;
  overflow-y: auto;
  background: white;
  border: 1px solid #ccc;
  display: none;
  z-index: 999;
}
.icon-picker-dropdown .icon-option {
  padding: 8px;
  cursor: pointer;
  display: inline-block;
  width: 40px;
  text-align: center;
}
.icon-picker-dropdown .icon-option:hover {
  background-color: #eee;
}
#addMenuItemIconPreview {
  font-size: 2em;
  min-width: 48px;
  text-align: center;
}