/* ─────────────────────────────────────────────────────────────────────────────
   Profix – Floating "Download Our App" Button
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Wrapper (enters from bottom-right) ─────────────────────────────────────── */
#pfix-app-btn {
    position: fixed;
    bottom: 28px;
    left: 24px;
    z-index: 9990;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;

    /* Start hidden & offset, animate in */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .45s cubic-bezier(.22, 1, .36, 1),
        transform .45s cubic-bezier(.22, 1, .36, 1);
    pointer-events: none;
}

#pfix-app-btn.pfix-app-btn--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ── Main pill button ───────────────────────────────────────────────────────── */
.pfix-app-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px 12px 16px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .2px;
    white-space: nowrap;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .28),
        0 2px 8px rgba(0, 0, 0, .18);
    transition: transform .2s ease,
        box-shadow .2s ease,
        background .2s ease;
    user-select: none;
    text-decoration: none;
}

.pfix-app-pill:hover {
    transform: translateY(-3px) scale(1.02);
    background: linear-gradient(135deg, #0f3460 0%, #1a1a2e 100%);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .32),
        0 4px 12px rgba(0, 0, 0, .2);
}

.pfix-app-pill:active {
    transform: translateY(-1px) scale(0.99);
}

/* icon wrapper */
.pfix-app-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(37, 211, 102, .4);
}

/* chevron rotates when tooltip is open */
.pfix-app-chevron {
    display: flex;
    align-items: center;
    opacity: .6;
    transition: transform .25s ease, opacity .2s;
}

.pfix-app-pill[aria-expanded="true"] .pfix-app-chevron {
    transform: rotate(180deg);
    opacity: 1;
}

/* hide chevron on mobile (no tooltip shown) */
@media (hover: none) and (pointer: coarse) {
    .pfix-app-chevron {
        display: none;
    }
}

/* ── Desktop tooltip ────────────────────────────────────────────────────────── */
.pfix-app-tooltip {
    background: #fff;
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .18),
        0 4px 16px rgba(0, 0, 0, .10);
    border: 1px solid rgba(0, 0, 0, .06);
    width: 240px;

    /* Animate open/close via max-height trick */
    overflow: hidden;
    animation: pfixTooltipIn .22s cubic-bezier(.22, 1, .36, 1) both;
}

.pfix-app-tooltip[hidden] {
    display: none;
}

@keyframes pfixTooltipIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pfix-app-tooltip-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 14px;
    text-align: center;
    letter-spacing: .2px;
}

/* ── Store badge links ──────────────────────────────────────────────────────── */
.pfix-app-store-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pfix-store-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    transition: transform .15s ease, box-shadow .15s ease;
}

.pfix-store-badge small {
    display: block;
    font-size: 10px;
    font-weight: 400;
    opacity: .85;
    margin-bottom: 1px;
}

.pfix-store-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
    color: #fff;
    text-decoration: none;
}

.pfix-store-apple {
    background: #1a1a2e;
}

.pfix-store-google {
    background: linear-gradient(135deg, #34a853, #0d652d);
}

/* ── Mobile adjustments ─────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    #pfix-app-btn {
        bottom: 20px;
        left: 16px;
    }

    .pfix-app-pill {
        padding: 11px 18px 11px 14px;
        font-size: 13px;
    }

    .pfix-app-icon {
        width: 28px;
        height: 28px;
    }

    .pfix-app-icon svg {
        width: 16px;
        height: 16px;
    }
}