/**
 * WeBuyVeg / Farmazone Trading - Native Floating Action Dock
 * Strict compliance with AGENTS.md tokens, mobile-first responsiveness, and isolated scope.
 */

/* ─── Floating Action Dock Stack (Right Side - Vertically Centered) ─── */
.tf-floating-dock {
    position: fixed;
    right: 12px;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    z-index: 1200;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.28s ease;
}

@media (min-width: 768px) {
    .tf-floating-dock {
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        gap: 14px;
    }
}

/* ─── Individual Floating Action Button (Native Pill / Disc) ─── */
.tf-action-btn {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    min-width: 48px;
    padding: 0 14px;
    background: rgba(19, 19, 20, 0.94);
    color: var(--text-primary, #e3e3e3);
    border: 1.5px solid var(--border-color, #2e3032);
    border-radius: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1),
                background-color 0.2s ease,
                border-color 0.2s ease,
                box-shadow 0.2s ease;
}

@media (max-width: 480px) {
    .tf-action-btn {
        height: 44px;
        padding: 0 12px;
        font-size: 0.8rem;
        gap: 6px;
    }
}

.tf-action-btn:hover {
    background: #252627;
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7);
}

.tf-action-btn:active {
    transform: scale(0.92);
}

/* ─── Fast Box Builder (Swipe Mode) Theme ─── */
.tf-action-btn--fastbox {
    border-color: rgba(66, 133, 244, 0.45);
}

.tf-action-btn--fastbox .tf-btn-icon {
    color: #4285f4;
    font-size: 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.tf-action-btn--fastbox:hover .tf-btn-icon {
    transform: rotate(-15deg) scale(1.15);
}

.tf-action-btn--fastbox .tf-btn-label {
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.01em;
}

/* ─── WeBuyVeg In-Store Cash Voucher (Scan to Pay) Theme ─── */
.tf-action-btn--voucher {
    border-color: rgba(16, 185, 129, 0.55);
    animation: tf-voucher-pulse 2.8s infinite;
}

.tf-action-btn--voucher .tf-btn-icon {
    color: #10b981;
    font-size: 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tf-action-btn--voucher .tf-btn-label {
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.tf-action-btn--voucher .tf-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    display: inline-block;
    animation: tf-dot-blink 1.8s infinite ease-in-out;
}

@keyframes tf-voucher-pulse {
    0% {
        border-color: rgba(16, 185, 129, 0.35);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
    }
    50% {
        border-color: rgba(16, 185, 129, 0.9);
        box-shadow: 0 8px 26px rgba(16, 185, 129, 0.3);
    }
    100% {
        border-color: rgba(16, 185, 129, 0.35);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
    }
}

@keyframes tf-dot-blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

/* ─── Scroll-Away State (Smooth glide off-screen on downward scroll) ─── */
.tf-floating-dock.is-hidden,
#tf-floating-dock.is-hidden {
    transform: translate(140px, -50%) scale(0.7) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.rocket-box-builder-fab.is-hidden,
#rocket-box-builder-fab.is-hidden {
    transform: translateY(120px) scale(0.6) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
