/* ─── Deusa Diagnóstico · Widget flotante ─── */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

.deusa-float {
    --accent:  #e8c17a;
    --accent2: #c4855a;
    --bg:      #1a1a1a;
    --text:    #f0ede8;
    --muted:   #7a7570;
    --border:  #2a2a2a;

    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 99999;
    font-family: 'DM Sans', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .75rem;
    animation: deusaSlideIn .6s 1.5s cubic-bezier(.4,0,.2,1) both;
}

/* ── Panel ── */
.deusa-float__panel {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.75rem;
    width: 280px;
    box-shadow: 0 24px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(232,193,122,.06);
    transform-origin: bottom right;
    transition: opacity .35s cubic-bezier(.4,0,.2,1), transform .35s cubic-bezier(.4,0,.2,1);
    position: relative;
    overflow: hidden;
}
.deusa-float__panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 100% 0%, rgba(232,193,122,.07) 0%, transparent 60%);
    pointer-events: none;
}
.deusa-float__panel.collapsed {
    opacity: 0;
    transform: scale(.85) translateY(8px);
    pointer-events: none;
}

/* ── Close ── */
.deusa-float__close {
    position: absolute;
    top: .85rem;
    right: .85rem;
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all .2s ease;
    padding: 0;
    box-shadow: none;
}
.deusa-float__close:hover {
    background: #252525;
    color: var(--text);
}

/* ── Contenido ── */
.deusa-float__emoji {
    font-size: 1.5rem;
    margin-bottom: .6rem;
    display: block;
    animation: deusaWiggle 2.5s ease-in-out infinite;
}
.deusa-float__tag {
    font-size: .65rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: .5rem;
}
.deusa-float__title {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    line-height: 1.3;
    color: var(--text);
    margin-bottom: .6rem;
}
.deusa-float__title em {
    font-style: italic;
    color: var(--accent);
}
.deusa-float__sub {
    font-size: .8rem;
    color: var(--muted);
    line-height: 1.55;
    font-weight: 300;
    margin-bottom: 1.25rem;
}

/* ── Botón ── */
.deusa-float__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    padding: .8rem 1.25rem;
    background: var(--accent);
    color: #0e0e0e;
    border-radius: 50px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: .875rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all .2s ease;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}
.deusa-float__btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.18) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform .45s ease;
}
.deusa-float__btn:hover {
    background: #f0cf8e;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(232,193,122,.3);
    color: #0e0e0e;
    text-decoration: none;
}
.deusa-float__btn:hover::after { transform: translateX(100%); }
.deusa-float__btn svg {
    width: 14px;
    height: 14px;
    transition: transform .2s ease;
    flex-shrink: 0;
}
.deusa-float__btn:hover svg { transform: translateX(3px); }

.deusa-float__note {
    text-align: center;
    font-size: .68rem;
    color: #444;
    margin-top: .6rem;
}

/* ── Burbuja ── */
.deusa-float__bubble {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(232,193,122,.35);
    transition: all .25s ease;
    position: relative;
    flex-shrink: 0;
    padding: 0;
}
.deusa-float__bubble:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 32px rgba(232,193,122,.45);
}
.deusa-float__bubble svg {
    width: 22px;
    height: 22px;
    color: #0e0e0e;
    transition: transform .3s ease;
}
.deusa-float__bubble.active svg { transform: rotate(45deg); }

/* pulso */
.deusa-float__bubble::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(232,193,122,.3);
    animation: deusaPulse 2.5s ease-out infinite;
}
.deusa-float__bubble.active::before { display: none; }

/* badge */
.deusa-float__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    background: var(--accent2);
    border-radius: 50%;
    border: 2px solid #fff;
    font-size: .55rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .2s ease;
    font-family: 'DM Sans', sans-serif;
}
.deusa-float__bubble.active .deusa-float__badge { opacity: 0; }

/* ── Ocultar en móvil si está desactivado ── */
.deusa-float.hide-mobile {
    display: none;
}
@media (min-width: 768px) {
    .deusa-float.hide-mobile { display: flex; }
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .deusa-float { bottom: 1rem; right: 1rem; }
    .deusa-float__panel { width: 260px; }
}

/* ── Keyframes ── */
@keyframes deusaSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes deusaWiggle {
    0%,100% { transform: rotate(0deg); }
    20%     { transform: rotate(-10deg); }
    40%     { transform: rotate(8deg); }
    60%     { transform: rotate(-5deg); }
    80%     { transform: rotate(3deg); }
}
@keyframes deusaPulse {
    0%   { transform: scale(1); opacity: .8; }
    100% { transform: scale(1.5); opacity: 0; }
}
