.switch {
    display: flex;
    align-items: center;
    /* Zentriert Icon, Text und Slider vertikal */
    gap: 10px;
    /* Abstand zwischen Icon, Text und Slider */
}

.switch .icon {
    font-size: 16px;
    /* Größe des Icons */
    color: var(--color-text-default);
    /* Farbe des Icons */
}

.switch .label-text {
    font-size: 14px;
    /* Größe des Textes */
    color: var(--color-text-muted);
    /* Farbe des Textes */
}

.switch input {
    display: none;
    /* Versteckt die Standard-Checkbox */
}

.switch .slider {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 25px;
    background-color: var(--color-border-strong);
    border-radius: 25px;
    cursor: pointer;
    transition: 0.4s;
}

.switch .slider.round:before {
    content: "";
    position: absolute;
    height: 19px;
    width: 19px;
    left: 3px;
    bottom: 3px;
    background-color: var(--color-surface);
    border-radius: 50%;
    transition: 0.4s;
}

.switch input:checked+.slider {
    background-color: var(--color-info);
}

.switch input:checked+.slider:before {
    transform: translateX(25px);
}

/* === TABELLEN === */
.tabelle {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    cursor: pointer;
    border-radius: 5px;
    background-color: var(--color-surface-muted);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tabelle-header,
.tabelle-row {
    display: flex;
    justify-content: space-between;
    padding: 10px;
}

.tabelle-header {
    background-color: var(--color-surface-muted);
    font-size: 16px;
}

.tabelle-row {
    display: flex;
    font-size: 12px;
}

.tabelle-row:hover {
    background-color: var(--color-surface-muted);
}

.tabelle-row:hover .dropdown-content {
    display: block;
}

/* Ausrichtrung der Spalteninhalte */
.tabRow.links {
    text-align: left;
}

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

.tabRow.rechts {
    text-align: right;
}

/* Breite dere Spalten */
.eins {
    flex: 1;
}

.zwei {
    flex: 2;
}

.drei {
    flex: 3;
}

.vier {
    flex: 4;
}

/* Alternierende Zeilenfarben */
.tabelle-row:nth-child(odd) {
    background-color: var(--color-surface);
    /* Erste Zeile und alle ungeraden Zeilen weiß */
}

.tabelle-row:nth-child(even) {
    background-color: var(--color-surface-muted);
    /* Alle geraden Zeilen grau */
}

/* === DROPDOWN BUTTON=== */
.dropdown {
    position: relative;
    display: inline-block;
    width: 100%;
    height: 100%;
    padding: 0;
}

.dropdown.hidden {
    display: none;
}

.dropdown-btn.show {
    display: block;
}

.dropdown-btn {
    display: flex;
    /* Flexbox aktivieren */
    align-items: center;
    /* Vertikale Zentrierung */
    background-color: var(--color-surface-muted);
    color: var(--color-text-default);
    padding: 10px;
    font-size: 16px;
    border: 1px solid var(--color-surface);
    cursor: pointer;
    width: 100%;
    height: 100%;
    gap: 1rem;
}

.dropdown-btn i,
.dropdown-btn svg {
    margin-right: 6px;
    vertical-align: middle;
}

.dropdown-content {
    display: none;
    cursor: pointer;
    position: absolute;
    background-color: var(--color-surface-muted);
    min-width: 160px;
    width: 100%;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.dropdown-content.show {
    display: block !important;
}

/* === DROPDOWN LIST === */
.dropdown-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    height: 100%;
    z-index: 100;
}

.dropdown-list {
    display: block;
    background-color: var(--color-surface);
    position: absolute;
    cursor: pointer;
    text-align: left;
    padding: 4px 0;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    /* Höher als Dialog z-index (1000) */
    overflow-y: auto;
    max-height: 200px;
    border: 1px solid var(--color-border-strong);
    border-radius: 4px;
}

.dropdown-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dropdown-item-title {
    display: block;
}

.dropdown-item-subtitle {
    display: block;
    margin-top: 2px;
    font-size: 0.9em;
    opacity: 0.8;
}

.dropdown-section-label {
    margin: 8px 12px 4px;
    padding-top: 8px;
    border-top: 1px solid var(--color-border-strong);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.7;
    cursor: default;
}

.dropdown-item:hover {
    background-color: var(--color-surface-muted);
}

.dropdown-item.highlighted {
    background-color: var(--color-surface-muted);
    color: var(--color-primary);
}

.dropdown-item.is-disabled {
    cursor: not-allowed;
    opacity: 0.75;
    font-style: italic;
}

.dropdown-item.is-disabled:hover,
.dropdown-item.is-disabled.highlighted {
    background-color: transparent;
    color: inherit;
}

/* == DROPDWON MENU === */
.dropdown-menu {
    display: none;
    cursor: pointer;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--color-surface);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 100;
    width: 200px;
    padding: 8px;
    border-radius: var(--bradius);
}

.dropdown-menu.show {
    display: block !important;
}

.dropdown-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Mobile Overlay for Meine Anlagen Dropdown */
.dropdown-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.dropdown-overlay .dropdown-menu {
    display: block !important;
    opacity: 1;
    visibility: visible;
    background-color: var(--color-surface);
    color: var(--color-text-default);
    width: 100%;
    max-width: 360px;
    max-height: 70vh;
    overflow-y: auto;
}

.dropdown-overlay .dropdown-item {
    color: var(--color-text-default);
}


/* === HINT HINWEIS === */
#hintDiv {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 16px 8px;
    width: 344px;
    background-color: var(--color-surface);
    z-index: 100;
    text-align: center;
    border-radius: var(--bradius);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);

}

#hintDiv p {
    margin: 1rem;
    font-size: 16px;
    color: var(--color-text-muted);
    text-align: left;
}

#closeHintBtn {
    position: absolute;
    /* innerhalb von #hintDiv positionieren */
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    background: var(--color-border-strong);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
