/* DropDownList / AutoComplete popup lists */
.e-dropdownbase .e-list-item {
    min-height: 1.5625rem;
    line-height: 1.5625rem;
    font-size: 0.75rem;
    color: var(--fc-text);
    background-color: var(--fc-surface);
}

    .e-dropdownbase .e-list-item:hover,
    .e-dropdownbase .e-list-item.e-hover,
    .e-dropdownbase .e-list-item:focus {
        background-color: var(--fc-primary-soft);
        color: var(--fc-primary);
    }

    .e-dropdownbase .e-list-item.e-active,
    .e-dropdownbase .e-list-item.e-item-focus {
        background-color: var(--fc-primary-soft);
        color: var(--fc-primary);
    }

.e-ddl.e-popup,
.e-popup.e-dropdownbase,
.e-autocomplete.e-popup,
.e-combobox.e-popup {
    border: 1px solid var(--fc-border);
    border-radius: var(--fc-radius);
    background-color: var(--fc-surface);
    box-shadow: var(--fc-shadow-dialog);
}

/* Syncfusion DropDownButton */
.e-dropdown-btn,
.e-dropdown-btn.e-btn {
    height: 30px;
    padding: 0.3125rem 0.625rem;
    border: 1px solid var(--fc-border);
    border-radius: var(--fc-radius);
    background: var(--fc-surface);
    box-shadow: none;
    color: var(--fc-navy);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
}

    .e-dropdown-btn:hover,
    .e-dropdown-btn.e-btn:hover,
    .e-dropdown-btn:focus,
    .e-dropdown-btn.e-btn:focus {
        border-color: var(--fc-primary);
        background: var(--fc-primary-soft);
        color: var(--fc-primary);
    }

    .e-dropdown-btn:focus-visible,
    .e-dropdown-btn.e-btn:focus-visible {
        box-shadow: var(--fc-focus-ring);
    }

.e-dropdown-popup ul {
    margin: 0;
    padding: 0;
    border: 1px solid var(--fc-border);
    border-radius: var(--fc-radius);
    background: var(--fc-surface);
    box-shadow: var(--fc-shadow-dialog);
    color: var(--fc-text);
    font-size: 1rem;
}

.e-dropdown-popup .e-ul,
.e-dropdown-popup .e-content {
    padding: 0;
    background-color: var(--fc-surface);
}

.e-dropdown-popup .e-item {
    display: flex;
    align-items: center;
    min-height: 30px;
    height: 30px;
    padding: 0 10px;
    background-color: var(--fc-surface);
    color: var(--fc-text);
    font-size: 1rem;
    line-height: 30px;
}

    .e-dropdown-popup .e-item:hover,
    .e-dropdown-popup .e-item:focus-within,
    .e-dropdown-popup .e-item.e-active,
    .e-dropdown-popup .e-item.e-selected {
        background: var(--fc-primary-soft);
        color: var(--fc-primary);
    }

    .e-dropdown-popup .e-item > a,
    .e-dropdown-popup .e-item > span,
    .e-dropdown-popup .e-item .e-menu-item {
        display: flex;
        align-items: center;
        height: 100%;
        line-height: 1;
        color: inherit;
    }

        .e-dropdown-popup .e-item > a:focus-visible,
        .e-dropdown-popup .e-item .e-menu-url > a:focus-visible {
            outline: 2px solid var(--fc-primary);
            outline-offset: -2px;
            border-radius: var(--fc-radius-sm);
        }

    .e-dropdown-popup .e-item .e-menu-icon,
    .e-dropdown-popup .e-item .e-menu-url,
    .e-dropdown-popup .e-item .e-menu-text {
        display: inline-flex;
        align-items: center;
        color: inherit;
    }

    .e-dropdown-popup .e-item .e-menu-icon {
        margin-right: 8px;
    }

.e-dropdown-popup ul .e-item.e-separator {
    min-height: unset;
    border-color: var(--fc-divider);
}

.e-dropdown-popup ul .e-item.e-url {
    padding-top: 6px;
}

.e-ddl.e-popup .e-list-item.e-disabled,
.e-dropdownbase .e-list-item.e-disabled {
    pointer-events: auto !important;
    cursor: not-allowed;
    color: var(--fc-text-disabled);
    background-color: var(--fc-surface);
}

.e-ddl.e-popup .e-list-item .name,
.e-dropdownbase .e-list-item .name {
    display: block;
    width: 100%;
}

/* Read-only / disabled DropDown controls keep their value clearly legible. */
.e-input-group.e-disabled .e-input,
.e-input-group.e-control-wrapper.e-disabled .e-input,
.e-input-group.e-disabled .e-ddl-icon,
.e-input-group.e-control-wrapper.e-disabled .e-ddl-icon {
    color: var(--fc-text-readonly);
    -webkit-text-fill-color: var(--fc-text-readonly);
    opacity: 1;
}


/* Card footer action menus (Dokumente / Anzeige / Funktion).
   These are page-level actions, not compact toolbar buttons. */
.e-dropdown-btn.fc-card-action-menu,
.e-dropdown-btn.e-btn.fc-card-action-menu {
    font-size: 1rem;
    font-weight: 500;
}

.e-dropdown-popup:has(.fc-card-action-menu) {
    font-size: 0.9rem;
}

/* Syncfusion renders the popup outside the button hierarchy. The popup items
   therefore get the navigation-like interaction treatment globally; this is
   intentionally the same calm petrol hover used in FluxMenu. */
.e-dropdown-popup .e-item:hover,
.e-dropdown-popup .e-item:focus-within,
.e-dropdown-popup .e-item.e-active,
.e-dropdown-popup .e-item.e-selected {
    background-color: var(--fc-primary-soft) !important;
    color: var(--fc-primary) !important;
}

/* Card action menu entries use the same readable size as the main menu. */
.e-dropdown-popup .e-item {
    font-size: 0.9rem;
}

/* Nur das E-Mail-Menue aus FCDataCard: Syncfusion gibt dem <ul>
   standardmaessig 120px Mindestbreite. Die Klasse wird vom
   SfDropDownButton auch an das ausserhalb gerenderte Popup vererbt. */
.e-dropdown-popup.fc-card-email-menu {
    min-width: 0 !important;
    width: max-content !important;
    max-width: min(28rem, calc(100vw - 20px));
}

    .e-dropdown-popup.fc-card-email-menu ul.e-dropdown-menu {
        min-width: 0 !important;
        width: max-content;
        max-width: 100%;
        box-sizing: border-box;
    }

    .e-dropdown-popup.fc-card-email-menu .e-item {
        white-space: nowrap;
    }
