/* ══════════════════════════════════════════════════════════════
   Device Control — floating dock (FAB reopen)
   Same rise/drain as hide; pinned under header + navigator
   v1.4.2
   ══════════════════════════════════════════════════════════════ */

.dcc-dock-float-backdrop {
    display: none;
}

html.dcc-dock-float-open .dcc-dock-float-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: rgba(15, 23, 42, .35);
}

/*
 * FAB reopen while scrolled:
 * fixed under live chrome (header + page navigator),
 * remembered in-flow left/width, rise/drain from BR origin.
 */
.dcc-filter-dock.is-dock-floating {
    position: fixed !important;
    /* JS (pinFloatTop) sets --dcc-float-top to the live header+navigator bottom.
       Fallback = just under the header so it never lands mid-page. */
    top: var(--dcc-float-top, calc(
        var(--farab-app-header-height, var(--bs-app-header-height, 70px)) + 8px
    )) !important;
    left: var(--dcc-float-left, max(.75rem, env(safe-area-inset-left, 0px))) !important;
    right: auto !important;
    bottom: auto !important;
    inset: unset !important;
    width: var(--dcc-float-width, calc(100% - 1.5rem)) !important;
    max-width: none !important;
    max-height: none !important;
    z-index: 1100;
    margin: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    overflow: visible !important;
    transform-origin: 100% 100%;
}

.dcc-chips--tabs {
    border-style: dashed;
}

/* ── Desktop: animate dock-main only (same as in-flow rise/drain) ── */
@media (min-width: 1200px) {
    .dcc-filter-dock.is-dock-floating {
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        animation: none !important;
        transform: none !important;
    }

    .dcc-filter-dock.is-dock-floating > .dcc-dock-main {
        display: flex !important;
        flex-direction: column;
        gap: var(--dcc-s-3, .75rem);
        width: 100%;
        position: static !important;
        top: auto !important;
        padding: var(--dcc-s-2, .5rem);
        border: 1px solid var(--line, #e9ecef);
        border-radius: var(--dcc-r-lg, 14px);
        background: var(--s-1, #fff);
        box-shadow: var(--dcc-el-2, 0 10px 30px rgba(15, 23, 42, .12));
        transform-origin: 100% 100%;
    }

    [data-bs-theme="dark"] .dcc-filter-dock.is-dock-floating > .dcc-dock-main {
        background: var(--s-1, #16192a);
        box-shadow: 0 12px 36px rgba(0, 0, 0, .45);
    }
}

/* ── Mobile / tablet: animate whole dock card (same as in-flow) ── */
@media (max-width: 1199.98px) {
    .dcc-filter-dock.is-dock-floating {
        display: flex !important;
        flex-direction: column;
        gap: var(--dcc-s-2, .5rem);
        padding: var(--dcc-s-2, .5rem) !important;
        border: 1px solid var(--line, #e9ecef) !important;
        border-radius: var(--dcc-r-lg, 14px) !important;
        background: var(--s-1, #fff) !important;
        box-shadow: var(--dcc-el-2, 0 10px 30px rgba(15, 23, 42, .12)) !important;
    }

    [data-bs-theme="dark"] .dcc-filter-dock.is-dock-floating {
        background: var(--s-1, #16192a) !important;
        box-shadow: 0 12px 36px rgba(0, 0, 0, .45) !important;
    }

    .dcc-filter-dock.is-dock-floating > .dcc-dock-main {
        display: contents !important;
        animation: none !important;
        transform: none !important;
    }

    .dcc-filter-dock.is-dock-floating.is-dock-expanding,
    .dcc-filter-dock.is-dock-floating.is-dock-collapsing {
        transform-origin: 100% 100%;
    }
}

@media (max-width: 768px) {
    .dcc-chips--tabs,
    .dcc-filter-dock .dcc-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .dcc-chips--tabs::-webkit-scrollbar,
    .dcc-filter-dock .dcc-chips::-webkit-scrollbar {
        display: none;
    }
}
