/* JJVV Inglaterra — Botones flotantes v1.4 */
.jjvv-sticky-buttons {
    position: fixed;
    z-index: 9998;
    pointer-events: none;
    font: inherit;
}

.jjvv-sticky-buttons ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.jjvv-sticky-buttons li {
    margin: 0 !important;
    padding: 0 !important;
}

/* Posiciones laterales */
.jjvv-position-right,
.jjvv-position-left {
    top: 50%;
    transform: translateY(-50%);
    width: var(--jjvv-fb-desktop-width, 210px);
}

.jjvv-position-right { right: 8px; }
.jjvv-position-left  { left: 8px; }

.jjvv-position-right li,
.jjvv-position-left li {
    display: flex;
    margin-bottom: 5px !important;
}

.jjvv-position-right li { justify-content: flex-end; }
.jjvv-position-left li  { justify-content: flex-start; }

.jjvv-position-right li:last-child,
.jjvv-position-left li:last-child { margin-bottom: 0 !important; }

/* Posiciones superior e inferior */
.jjvv-position-top,
.jjvv-position-bottom {
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: calc(100vw - 24px);
}

.jjvv-position-top { top: 8px; }
.jjvv-position-bottom { bottom: 8px; }

.jjvv-position-top ul,
.jjvv-position-bottom ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.jjvv-sticky-buttons a {
    pointer-events: auto;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0;
    overflow: hidden;
    white-space: nowrap;
    color: var(--jjvv-fb-text, #fff) !important;
    background-color: var(
        --theme-palette-color-1,
        var(--wp--preset--color--primary, var(--jjvv-fb-primary, #17324D))
    );
    opacity: var(--jjvv-fb-opacity, .96);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 11px;
    box-shadow: 0 9px 22px -15px rgba(16,32,48,.45);
    font: inherit;
    font-size: .68rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: .012em;
    text-decoration: none !important;
    text-transform: uppercase;
    -webkit-font-smoothing: antialiased;
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    transition: width .22s ease, transform .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.jjvv-fb-icon {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-width: 40px;
    height: 40px;
    flex: 0 0 40px;
}

.jjvv-fb-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.jjvv-fb-label {
    display: inline-block;
    max-width: 0;
    padding-right: 0;
    overflow: hidden;
    opacity: 0;
    white-space: normal;
    text-align: left;
    transition: max-width .22s ease, opacity .14s ease, padding .22s ease;
}

.jjvv-sticky-buttons a:hover,
.jjvv-sticky-buttons a:focus-visible {
    width: var(--jjvv-fb-desktop-width, 210px);
    color: var(--jjvv-fb-hover-text, #17324D) !important;
    background-color: var(
        --theme-palette-color-2,
        var(--wp--preset--color--secondary, var(--wp--preset--color--accent, var(--jjvv-fb-accent, #D7A846)))
    );
    opacity: 1;
    box-shadow: 0 12px 28px -18px rgba(16,32,48,.50);
    outline: none;
}

.jjvv-position-right a:hover,
.jjvv-position-right a:focus-visible { transform: translateX(-3px); }

.jjvv-position-left a:hover,
.jjvv-position-left a:focus-visible { transform: translateX(3px); }

.jjvv-position-top a:hover,
.jjvv-position-top a:focus-visible { transform: translateY(2px); }

.jjvv-position-bottom a:hover,
.jjvv-position-bottom a:focus-visible { transform: translateY(-2px); }

.jjvv-sticky-buttons a:hover .jjvv-fb-label,
.jjvv-sticky-buttons a:focus-visible .jjvv-fb-label {
    max-width: calc(var(--jjvv-fb-desktop-width, 210px) - 48px);
    padding-right: 12px;
    opacity: 1;
}

/* En la izquierda el ícono queda pegado al borde y el texto crece hacia la derecha. */
.jjvv-position-left a {
    flex-direction: row;
}

/* En la derecha, el texto aparece hacia la izquierda del ícono. */
.jjvv-position-right a {
    flex-direction: row-reverse;
}

.jjvv-position-right .jjvv-fb-label {
    text-align: right;
    padding-right: 0;
    padding-left: 0;
}

.jjvv-position-right a:hover .jjvv-fb-label,
.jjvv-position-right a:focus-visible .jjvv-fb-label {
    padding-left: 12px;
    padding-right: 0;
}

.jjvv-sticky-buttons a:focus-visible {
    box-shadow: 0 0 0 3px rgba(255,255,255,.95), 0 0 0 6px var(--jjvv-fb-primary, #17324D);
}

@media (max-width: 782px) {
    .jjvv-position-right,
    .jjvv-position-left {
        width: var(--jjvv-fb-mobile-width, 44px);
    }

    .jjvv-position-right { right: 5px; }
    .jjvv-position-left { left: 5px; }

    .jjvv-position-right li,
    .jjvv-position-left li { margin-bottom: 4px !important; }

    .jjvv-position-top,
    .jjvv-position-bottom {
        max-width: calc(100vw - 10px);
    }

    .jjvv-position-top { top: 5px; }
    .jjvv-position-bottom { bottom: 5px; }

    .jjvv-position-top ul,
    .jjvv-position-bottom ul { gap: 4px; }

    .jjvv-sticky-buttons a,
    .jjvv-sticky-buttons a:hover,
    .jjvv-sticky-buttons a:focus-visible {
        width: var(--jjvv-fb-mobile-width, 44px);
        min-width: var(--jjvv-fb-mobile-width, 44px);
        height: var(--jjvv-fb-mobile-width, 44px);
        transform: none;
        border-radius: 10px;
    }

    .jjvv-fb-icon {
        width: 100%;
        min-width: 100%;
        height: 100%;
        flex-basis: 100%;
    }

    .jjvv-fb-icon svg { width: 19px; height: 19px; }
    .jjvv-fb-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .jjvv-sticky-buttons a,
    .jjvv-fb-label { transition: none; }
}

@media print {
    .jjvv-sticky-buttons { display: none !important; }
}
