.fi-footer-logo {
    height: 12px;
    display: inline;
    vertical-align: baseline;
}

.dark .fi-footer-logo {
    filter: brightness(0) invert(1);
}

/* Marktplatz: Grid-Kinder dürfen schmaler als Inhalt werden (verhindert horizontales Abschneiden) */
.fi-credentials-marketplace-widget .fi-wi-stats-overview-stats-ctn {
    align-items: stretch;
}

/* Zeilen gleiche Höhe: Stat-Karte füllt die Zelle (unabhängig von Tag- vs. Entwicklungszeile) */
.fi-credentials-marketplace-widget .fi-credentials-marketplace-stat-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    min-height: 100%;
    /* Wie Filament Stat (rounded-xl): Toggle nicht über die Karte hinausragen */
    border-radius: 0.75rem;
    overflow: hidden;
}

/* Nur ein Rahmen: Wrapper hat border — Filament ring/shadow-sm auf der Stat würden doppeln */
.fi-credentials-marketplace-widget .fi-credentials-marketplace-stat-wrap > .fi-wi-stats-overview-stat:not(.fi-credentials-marketplace-stat--active) {
    box-shadow: none !important;
    --tw-ring-shadow: 0 0 #0000 !important;
    --tw-shadow: 0 0 #0000 !important;
}

.fi-credentials-marketplace-widget .fi-credentials-marketplace-stat-wrap > .fi-wi-stats-overview-stat {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
}

/* In Entwicklung: kein Klick — gesamte Karte mit not-allowed-Cursor */
.fi-credentials-marketplace-widget .fi-credentials-marketplace-stat-wrap--in-development,
.fi-credentials-marketplace-widget .fi-wi-stats-overview-stat.fi-credentials-marketplace-stat--in-development {
    cursor: not-allowed;
    opacity: 0.5;
}

/* DEV: diagonales Eck-Band oben links (Clip behält wrap overflow:hidden bei) */
.fi-credentials-marketplace-widget .fi-credentials-marketplace-dev-corner {
    pointer-events: none;
    user-select: none;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 15;
    width: 3.35rem;
    height: 3.35rem;
    overflow: hidden;
    border-top-left-radius: 0.75rem;
}

.fi-credentials-marketplace-widget .fi-credentials-marketplace-dev-ribbon {
    display: block;
    width: 5.75rem;
    margin-top: 0.55rem;
    margin-left: -1.45rem;
    padding: 0.22rem 0;
    background-color: rgb(202 138 4);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.18);
    color: rgb(255 255 255);
    font-size: 0.5625rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    line-height: 1;
    text-align: center;
    transform: rotate(-45deg);
}

.dark .fi-credentials-marketplace-widget .fi-credentials-marketplace-dev-ribbon {
    background-color: rgb(234 179 8);
    color: rgb(66 32 6);
}

/* Fake-Toggle: reines CSS (keine Tailwind top/right/translate — fehlen im Filament-Preset) */
.fi-credentials-marketplace-widget .fi-credentials-marketplace-fake-toggle {
    pointer-events: none;
    user-select: none;
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 10;
}

.fi-credentials-marketplace-widget .fi-credentials-marketplace-fake-toggle-track {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 2.75rem;
    height: 1.5rem;
    border-radius: 9999px;
    background-color: rgb(209 213 219);
    box-shadow: inset 0 0 0 1px rgb(3 7 18 / 0.12);
    transition: background-color 0.2s ease;
}

.dark .fi-credentials-marketplace-widget .fi-credentials-marketplace-fake-toggle-track {
    background-color: rgb(75 85 99);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.15);
}

.fi-credentials-marketplace-widget .fi-credentials-marketplace-fake-toggle-track--on {
    background-color: rgb(5 150 105);
    box-shadow: inset 0 0 0 1px rgb(4 120 87 / 0.35);
}

.dark .fi-credentials-marketplace-widget .fi-credentials-marketplace-fake-toggle-track--on {
    background-color: rgb(16 185 129);
    box-shadow: inset 0 0 0 1px rgb(167 243 208 / 0.35);
}

.fi-credentials-marketplace-widget .fi-credentials-marketplace-fake-toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 9999px;
    background-color: rgb(255 255 255);
    box-shadow:
        0 1px 3px 0 rgb(0 0 0 / 0.12),
        0 0 0 1px rgb(3 7 18 / 0.08);
    transition: transform 0.2s ease-out;
}

.dark .fi-credentials-marketplace-widget .fi-credentials-marketplace-fake-toggle-knob {
    box-shadow:
        0 1px 3px 0 rgb(0 0 0 / 0.35),
        0 0 0 1px rgb(255 255 255 / 0.12);
}

.fi-credentials-marketplace-widget .fi-credentials-marketplace-fake-toggle-knob--on {
    transform: translateX(1.25rem);
}

/* Zugangsdaten-Marktplatz: Stat-Karten */
.fi-credentials-marketplace-widget .fi-wi-stats-overview-stat {
    overflow: visible;
    /* Platz für absolut positionierten Fake-Toggle (ohne Tailwind pr-*) */
    padding-right: 3.75rem;
    transition:
        background-color 0.15s ease,
        box-shadow 0.15s ease;
}

@media (min-width: 640px) {
    .fi-credentials-marketplace-widget .fi-wi-stats-overview-stat {
        padding-right: 4rem;
    }
}

/* Beschreibungszeile: volle Breite, mehrzeilig; Tags umbrechen nur zwischen Chips */
.fi-credentials-marketplace-widget .fi-wi-stats-overview-stat > .grid > .flex.items-center.gap-x-1 {
    align-items: flex-start;
    min-width: 0;
}

.fi-credentials-marketplace-widget .fi-wi-stats-overview-stat-description {
    min-width: 0;
    flex: 1 1 0%;
}

.fi-credentials-marketplace-widget .fi-wi-stats-overview-stat:hover:not(.fi-credentials-marketplace-stat--active):not(.fi-credentials-marketplace-stat--in-development) {
    background-color: rgb(249 250 251) !important;
}

.dark .fi-credentials-marketplace-widget .fi-wi-stats-overview-stat:hover:not(.fi-credentials-marketplace-stat--active):not(.fi-credentials-marketplace-stat--in-development) {
    background-color: rgb(255 255 255 / 0.06) !important;
}

/* Zugangsdaten-Marktplatz: aktive Anbindung (Filament-Stat-Karte) */
.fi-wi-stats-overview-stat.fi-credentials-marketplace-stat--active {
    background-color: rgb(220 252 231) !important;
    box-shadow:
        0 1px 2px 0 rgb(0 0 0 / 0.05),
        inset 0 0 0 1px rgb(34 197 94 / 0.4) !important;
}

.dark .fi-wi-stats-overview-stat.fi-credentials-marketplace-stat--active {
    background-color: rgb(6 78 59 / 0.45) !important;
    box-shadow:
        0 1px 2px 0 rgb(0 0 0 / 0.2),
        inset 0 0 0 1px rgb(74 222 128 / 0.35) !important;
}

/* Aktive Karte: Hover etwas kräftigeres Grün (Status bleibt erkennbar) */
.fi-credentials-marketplace-widget .fi-wi-stats-overview-stat.fi-credentials-marketplace-stat--active:hover {
    background-color: rgb(209 250 229) !important;
}

.dark .fi-credentials-marketplace-widget .fi-wi-stats-overview-stat.fi-credentials-marketplace-stat--active:hover {
    background-color: rgb(6 95 70 / 0.55) !important;
}
