/* =============================================================
   PZF V2 — Contact Button Stack (iOS Candy Style)
   File: css/pzf-v2.css
   ============================================================= */

/* ── Container ────────────────────────────────────────────── */
#pzf-v2-stack {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    z-index: 99999;
}

/* ── Collapse toggle (small, no border) ───────────────────── */
.pzf-collapse-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease;
    margin-bottom: 0;
}

.pzf-collapse-wrap.pzf-open {
    max-height: 50px;
    opacity: 1;
}

.pzf-collapse-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-bottom: 6px;
    transition: background 0.2s, transform 0.2s;
    /* Desktop: ẩn, chỉ hiện khi hover stack */
    opacity: 0;
    transition: opacity 0.2s, background 0.2s, transform 0.2s;
}

#pzf-v2-stack:hover .pzf-collapse-btn {
    opacity: 1;
}

.pzf-collapse-btn:hover {
    background: rgba(255, 255, 255, 0.38);
    transform: scale(1.08);
}

.pzf-collapse-btn svg path {
    stroke: rgba(255, 255, 255, 0.85);
}

/* ── Item wrapper (animated) ──────────────────────────────── */
.pzf-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    /* default: collapsed */
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
    transition:
        max-height 0.35s cubic-bezier(0.34, 1.26, 0.64, 1),
        opacity 0.25s ease,
        margin-bottom 0.3s ease;
}

.pzf-item.pzf-visible {
    max-height: 64px;
    opacity: 1;
    margin-bottom: 8px;
}

.pzf-item.pzf-visible:last-of-type {
    margin-bottom: 0;
}

/* ── Trigger button (collapsed state — shows 1st icon) ────── */
.pzf-trigger-wrap {
    margin-top: 0;
    display: none; /* shown via JS */
}

.pzf-trigger-wrap.pzf-show {
    display: flex;
}

/* ── Base button ──────────────────────────────────────────── */
.pzf-btn {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    transition: transform 0.15s;
    flex-shrink: 0;
}

.pzf-btn:hover {
    transform: scale(1.1);
    text-decoration: none;
}

.pzf-btn:active {
    transform: scale(0.95);
}

/* ── "More" badge on trigger ──────────────────────────────── */
.pzf-badge-more {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    background: #f43f5e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* ── Tooltip label ────────────────────────────────────────── */
.pzf-tooltip {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 7px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.pzf-btn:hover .pzf-tooltip {
    opacity: 1;
}

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 768px) {
    #pzf-v2-stack {
        right: 10px;
    }

    .pzf-btn {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    .pzf-item.pzf-visible {
        max-height: 54px;
        margin-bottom: 7px;
    }

    /* Mobile: collapse button luôn hiện (không cần hover) */
    .pzf-collapse-btn {
        opacity: 1;
        width: 26px;
        height: 26px;
    }

    /* Mobile: ẩn tooltip (không có hover) */
    .pzf-tooltip {
        display: none;
    }

    .pzf-badge-more {
        width: 13px;
        height: 13px;
        top: -3px;
        right: -3px;
    }
}
