/* * AVT Floating Button Styles
 * Desktop-only pill, styled to match the AI assistant launcher (plugin 30) that
 * stacks directly above it in the same corner.
 */

/* Keyframes for the attention animation */
@keyframes avt-fb-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* --- Global FAB Container (Mobile-First) --- */

#avt-fb-container {
    position: fixed;
    bottom: 20px; /* Closer to the bottom on mobile */
    right: 15px; /* Slightly less margin on mobile */
    z-index: 9999;

    /* Hidden entirely below 769px — the corner belongs to the AI launcher and
       plugin 23's mobile bar there. */
    display: none;

    align-items: center;
    justify-content: flex-end;

    /* Transition properties for showing/hiding the FAB (only effective when display is not 'none') */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
}

#avt-fb-container.avt-fb-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* --- FAB Link Button (Mobile-First) --- */

.avt-fb-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 15px 8px 9px;
    border-radius: 999px;
    /* Same accent pair as the AI assistant launcher above it, so the two
       buttons in the corner share a fill and darken to the same green. */
    background-color: #047857;
    color: #fff;
    font: inherit;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: 0 4px 14px rgba(29,29,26,.22);
    transition: background-color 0.15s ease, transform 0.15s ease;
    text-decoration: none;
    outline: none;
}

/* The child theme has a bare `a:hover { color: var(--accent) }` — 0,1,1 beats
   the 0,1,0 of the rule above, so without this the label turned accent green on
   the darker green fill and all but vanished mid-hover. Same for the focus the
   keyboard leaves behind. */
.avt-fb-link:hover,
.avt-fb-link:focus,
.avt-fb-link:active {
    color: #fff;
}

/* Class to trigger the attention animation */
.avt-fb-attention {
    animation: avt-fb-pulse 1.5s ease-in-out;
}

.avt-fb-link:hover,
.avt-fb-link:focus {
    transform: translateY(-2px);
    background-color: var(--accent-hover, #065f46);
}

.avt-fb-link:focus-visible {
    outline: 2px solid var(--accent-hover, #065f46);
    outline-offset: 3px;
}

/* A white disc holding the mark, which is the launcher's avatar treatment: same
   box, same circle, so the two stacked pills each lead with a round token and
   look like siblings. Sizing matches too, which keeps both pills 48px tall.
   White rather than transparent: the dollar render is dark green and grey, and
   would all but disappear against the pill's own green. */
.avt-fb-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 50%;
    background: #fff;
}

.avt-fb-icon img {
    width: auto;
    height: 17px;
    display: block;
}

.avt-fb-label {
    display: inline;
}

/* ---------------------------------------------------- */
/* --- Desktop Specific Styles (min-width: 769px) --- */
/* ---------------------------------------------------- */
@media (min-width: 769px) {
    /* Show the element and set desktop spacing/positioning */
    #avt-fb-container {
        display: flex; /* OVERRIDE: Show as flex container on desktop */
        bottom: 50px;
        right: 20px;
    }

    /* Identical metrics to .avt-aia-launcher: both pills end up 48px tall, so
       stacked they read as one control group rather than two near-misses. */
    .avt-fb-link {
        padding: 10px 18px 10px 11px;
        gap: 9px;
        font-size: 14px;
    }

    .avt-fb-icon {
        width: 28px;
        height: 28px;
        flex: 0 0 28px;
    }

    .avt-fb-icon img {
        height: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .avt-fb-attention {
        animation: none;
    }

    .avt-fb-link:hover,
    .avt-fb-link:focus {
        transform: none;
    }
}
