/* Phase 50.1 — estimate sticky action bar (phones only) */
.fo-estimate-sticky-bar {
    display: none;
}

@media (max-width: 768px) {
    .mobile-mode .fo-estimate-sticky-bar,
    .fo-estimate-sticky-bar.fo-estimate-sticky-bar--visible {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: calc(var(--fo-phone-nav-h, 56px) + env(safe-area-inset-bottom, 0px));
        z-index: 1025;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 8px 10px;
        background: rgba(15, 23, 42, 0.97);
        border-top: 1px solid rgba(148, 163, 184, 0.25);
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
        color: #e2e8f0;
    }

    .mobile-mode .fo-estimate-sticky-bar__total {
        font-size: 13px;
        font-weight: 700;
        white-space: nowrap;
        min-width: 0;
    }

    .mobile-mode .fo-estimate-sticky-bar__total span {
        color: #94a3b8;
        font-weight: 600;
        margin-right: 4px;
    }

    .mobile-mode .fo-estimate-sticky-bar__actions {
        display: flex;
        gap: 6px;
        flex-shrink: 0;
    }

    .mobile-mode .fo-estimate-sticky-bar .btn {
        min-height: 36px !important;
        padding: 4px 10px !important;
        font-size: 12px !important;
    }

    /* Hide duplicate top Save/Send cluster on phones when sticky bar is present */
    .mobile-mode .ec-top-actions--desktop-primary {
        display: none !important;
    }

    .mobile-mode .ec-page--with-sticky-bar {
        padding-bottom: calc(72px + var(--fo-phone-nav-h, 56px) + env(safe-area-inset-bottom, 0px)) !important;
    }

    /* Hide FAB on estimate create/edit — sticky bar owns primary actions */
    body.fo-route-estimates-edit .mobile-fab,
    body.fo-route-estimates-create .mobile-fab,
    .mobile-mode.fo-hide-mobile-fab .mobile-fab,
    .mobile-mode.fo-hide-mobile-fab .fo-m-page-fab {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .fo-estimate-sticky-bar {
        display: none !important;
    }
}
