.sj-float-widget {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 99990;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    font-family: Arial, Helvetica, sans-serif;
}

.sj-float-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(3, 27, 64, .45);
    backdrop-filter: blur(3px);
    z-index: 1;
    opacity: 0;
    transition: opacity .25s ease;
    pointer-events: none;
}

.sj-float-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.sj-float-panel {
    position: relative;
    z-index: 2;
    width: min(320px, calc(100vw - 28px));
    background: #fff;
    border-radius: 20px;
    border: 2px solid #00d1ff;
    box-shadow:
        0 24px 50px rgba(3, 27, 64, .35),
        0 0 0 1px rgba(3, 27, 64, .06);
    overflow: hidden;
    transform-origin: bottom right;
    animation: sjPanelIn .28s cubic-bezier(.22, 1, .36, 1);
}

.sj-float-panel[hidden],
.sj-float-backdrop[hidden] {
    display: none !important;
}

@keyframes sjPanelIn {
    from {
        opacity: 0;
        transform: scale(.9) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.sj-float-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 16px 14px;
    background: linear-gradient(135deg, #031b40 0%, #0e2f6e 100%);
    color: #fff;
}

.sj-float-panel-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.sj-float-panel-logo {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #00d1ff;
    color: #031b40;
    font-weight: 800;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: .02em;
    box-shadow: 0 4px 14px rgba(0, 209, 255, .45);
}

.sj-float-panel-kicker {
    margin: 0 0 2px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255, 255, 255, .72);
    font-weight: 700;
}

.sj-float-panel-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
}

.sj-float-close {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease, transform .2s ease;
}

.sj-float-close svg {
    width: 18px;
    height: 18px;
}

.sj-float-close:hover {
    background: rgba(255, 255, 255, .24);
    transform: scale(1.05);
}

.sj-float-panel-body {
    padding: 14px;
    display: grid;
    gap: 10px;
    background: #f4f7fb;
}

.sj-float-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
    border: 1px solid transparent;
}

.sj-float-action:hover {
    transform: translateY(-2px);
}

.sj-float-action-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sj-float-action-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.sj-float-action-icon--pse {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 6px;
    box-sizing: border-box;
}

.sj-float-action-icon--pse img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.sj-float-action-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.sj-float-action-text strong {
    font-size: 14px;
    line-height: 1.25;
}

.sj-float-action-text small {
    font-size: 12px;
    line-height: 1.35;
    opacity: .85;
}

.sj-float-action--wa {
    background: linear-gradient(135deg, #1ebe57 0%, #25d366 100%);
    color: #fff;
    box-shadow: 0 8px 22px rgba(37, 211, 102, .35);
}

.sj-float-action--wa .sj-float-action-icon {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

.sj-float-action--wa:hover {
    box-shadow: 0 12px 28px rgba(37, 211, 102, .45);
}

.sj-float-action--pse {
    background: #fff;
    color: #031b40;
    border-color: #dbe3ef;
    box-shadow: 0 4px 14px rgba(3, 27, 64, .08);
}

.sj-float-action--pse:hover {
    border-color: #00d1ff;
    box-shadow: 0 8px 20px rgba(3, 27, 64, .12);
}

.sj-float-social-block {
    margin-top: 4px;
    padding: 12px 14px 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
}

.sj-float-social-label {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #64748b;
    text-align: center;
}

.sj-float-social {
    display: flex;
    justify-content: center;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.sj-float-social a {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #031b40;
    color: #fff;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.sj-float-social a:hover {
    transform: translateY(-2px);
    background: #00d1ff;
    color: #031b40;
    box-shadow: 0 6px 16px rgba(0, 209, 255, .35);
}

.sj-float-social svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.sj-float-panel-footer {
    padding: 10px 14px 14px;
    text-align: center;
    background: #fff;
    border-top: 1px solid #eef2f7;
}

.sj-float-privacy-btn {
    border: none;
    background: transparent;
    color: #0e2f6e;
    font-size: 12px;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
    padding: 4px 8px;
}

.sj-float-privacy-btn:hover {
    color: #0077c8;
}

.sj-float-toggle {
    position: relative;
    z-index: 3;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    line-height: 0;
    width: 92px;
    height: 92px;
}

.sj-float-toggle-ring {
    position: absolute;
    inset: 4px;
    z-index: 2;
    border-radius: 50%;
    border: 3px solid #00d1ff;
    box-shadow: 0 0 0 4px rgba(0, 209, 255, .2);
    animation: sjRingPulse 2.5s ease-in-out infinite;
    pointer-events: none;
}

.sj-float-toggle.is-open .sj-float-toggle-ring {
    animation: none;
    opacity: 0;
}

@keyframes sjRingPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.06);
        opacity: .75;
    }
}

.sj-float-toggle-hint {
    position: absolute;
    right: calc(100% + 10px);
    bottom: 14px;
    max-width: 200px;
    line-height: 1.35;
    text-align: left;
    background: #031b40;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(3, 27, 64, .25);
    pointer-events: none;
    animation: sjHintIn 3s ease-in-out infinite;
}

.sj-float-toggle-hint::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: #031b40;
}

.sj-float-toggle.is-open .sj-float-toggle-hint {
    display: none;
}

@keyframes sjHintIn {
    0%, 100% { opacity: 0; transform: translateX(6px); }
    15%, 75% { opacity: 1; transform: translateX(0); }
}

.sj-float-mascot {
    position: absolute;
    inset: 4px;
    z-index: 1;
    display: block;
    width: auto;
    height: auto;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(.22, 1, .36, 1);
}

.sj-float-mascot-bob {
    display: block;
    width: 100%;
    height: 100%;
    will-change: transform;
}

.sj-float-widget--interactive .sj-float-mascot-bob {
    animation: sjMascotFloat 4.2s ease-in-out infinite;
}

/* Con GIF: no transform en ancestros del <img> — en Chrome congela los frames del GIF */
.sj-float-widget--gif-mascot .sj-float-mascot-bob {
    animation: none;
    will-change: auto;
}

.sj-float-widget--gif-mascot .sj-float-toggle-img--gif,
.sj-float-widget--gif-mascot .sj-float-toggle-img--video {
    animation: sjMascotGifBob 4.2s ease-in-out infinite;
}

@keyframes sjMascotGifBob {
    0%, 100% {
        margin-top: 0;
    }
    50% {
        margin-top: -6px;
    }
}

.sj-float-mascot-look {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
}

.sj-float-mascot-shadow {
    position: absolute;
    left: 50%;
    bottom: 2px;
    z-index: 0;
    width: 56%;
    height: 8px;
    margin-left: -28%;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(3, 27, 64, .32) 0%, transparent 72%);
    animation: sjMascotShadow 3.4s ease-in-out infinite;
    pointer-events: none;
}

.sj-float-toggle-img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    border-radius: 0;
    filter: drop-shadow(0 4px 8px rgba(3, 27, 64, .22));
    animation: none;
    transition: opacity .2s ease, transform .25s ease;
}

.sj-float-toggle-img--gif {
    image-rendering: auto;
}

.sj-float-toggle-img--video {
    background: transparent;
    pointer-events: none;
}

.sj-float-widget--interactive .sj-float-toggle:not(.is-open) .sj-float-mascot-bob.sj-float-mascot--wiggle {
    animation: sjMascotWiggle 0.55s ease-in-out;
}

@keyframes sjMascotWiggle {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(-6deg); }
    40% { transform: rotate(6deg); }
    60% { transform: rotate(-4deg); }
    80% { transform: rotate(4deg); }
}

.sj-float-toggle.is-open .sj-float-mascot {
    opacity: 0;
    transition: opacity .2s ease;
}

.sj-float-toggle.is-open .sj-float-mascot-bob {
    transform: scale(.85);
    transition: transform .2s ease;
}

.sj-float-toggle.is-open .sj-float-toggle-img {
    opacity: 0;
    transform: scale(.85);
}

.sj-float-widget--gif-mascot .sj-float-toggle.is-open .sj-float-toggle-img {
    transform: none;
    animation: none;
}

@keyframes sjMascotFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-7px) rotate(0.6deg);
    }
    50% {
        transform: translateY(-13px) rotate(0deg);
    }
    75% {
        transform: translateY(-7px) rotate(-0.6deg);
    }
}

@keyframes sjMascotShadow {
    0%, 100% {
        transform: scaleX(1);
        opacity: .52;
    }
    50% {
        transform: scaleX(.8);
        opacity: .26;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sj-float-widget--interactive .sj-float-mascot-bob,
    .sj-float-widget--gif-mascot .sj-float-toggle-img--gif,
    .sj-float-widget--gif-mascot .sj-float-toggle-img--video,
    .sj-float-mascot-shadow {
        animation: none;
    }
}

.sj-float-toggle-close {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #031b40, #0e2f6e);
    color: #fff;
    opacity: 0;
    transform: scale(.8);
    transition: opacity .2s ease, transform .2s ease;
    pointer-events: none;
    box-shadow: 0 10px 24px rgba(3, 27, 64, .35);
}

.sj-float-toggle-close svg {
    width: 28px;
    height: 28px;
}

.sj-float-toggle.is-open .sj-float-toggle-close {
    opacity: 1;
    transform: scale(1);
}

.sj-float-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 3;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #25d366;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

.sj-float-toggle.is-open .sj-float-badge {
    display: none;
}

.sj-float-badge-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #25d366;
    animation: sjBadgePulse 1.8s ease-out infinite;
}

@keyframes sjBadgePulse {
    0% { transform: scale(.6); opacity: .9; }
    100% { transform: scale(1.6); opacity: 0; }
}

@keyframes sjDogBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

.privacy-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .7);
    z-index: 100000;
}

.privacy-overlay.is-visible {
    display: block;
}

.privacy-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(800px, 92%);
    max-height: 88vh;
    overflow-y: auto;
    background: #1a1a2e;
    color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(255, 255, 255, .3);
    z-index: 100001;
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
}

.privacy-modal.is-visible {
    display: block;
}

.privacy-modal h2 {
    color: #f8b400;
    margin: 0 0 18px;
    font-size: clamp(1.2rem, 3vw, 1.6rem);
}

.privacy-modal p {
    line-height: 1.6;
    margin: 0 0 14px;
    font-size: 15px;
}

.privacy-modal a {
    color: #f8b400;
    font-weight: 700;
    text-decoration: none;
}

.privacy-modal a:hover {
    text-decoration: underline;
}

.privacy-modal button {
    margin-top: 10px;
    background: #d50032;
    color: #fff;
    border: none;
    padding: 12px 28px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}

.privacy-modal button:hover {
    background: #b00020;
}

@media (max-width: 640px) {
    .sj-float-widget {
        right: 10px;
        bottom: 10px;
    }

    .sj-float-toggle {
        width: 80px;
        height: 80px;
    }

    .sj-float-mascot {
        inset: 4px;
    }

    .sj-float-toggle-hint {
        display: none;
    }

    .sj-float-panel {
        width: min(300px, calc(100vw - 20px));
    }

    .privacy-modal {
        padding: 20px;
        top: 45%;
    }

    .privacy-modal p {
        font-size: 14px;
    }
}
