/* ════════════════════════════════════════
   WA FLOTANTE  ·  Frontend Styles  v1.0
════════════════════════════════════════ */
:root {
    --wa-green:  #25d366;
    --wa-dark:   #075e54;
    --wa-teal:   #128c7e;
    --wa-text:   #111b21;
    --wa-sub:    #667781;
    --wa-bg:     #ffffff;
    --wa-radius: 18px;
}

#wa-float {
    position: fixed;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    bottom: var(--wa-bottom, 28px);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, sans-serif;
}
#wa-float.pos-right { right: 26px; align-items: flex-end; }
#wa-float.pos-left  { left:  26px; align-items: flex-start; }

/* ── PANEL ── */
#wa-panel {
    background: var(--wa-bg);
    border-radius: var(--wa-radius);
    box-shadow: 0 8px 40px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.10);
    width: 300px;
    overflow: hidden;
    transform-origin: bottom right;
    transform: scale(0) translateY(10px);
    opacity: 0;
    transition: transform .28s cubic-bezier(.34,1.56,.64,1), opacity .22s ease;
    pointer-events: none;
}
.pos-left #wa-panel { transform-origin: bottom left; }
#wa-panel.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
}

/* ── HEADER ── */
.waf-header {
    background: linear-gradient(135deg, var(--wa-dark) 0%, var(--wa-teal) 100%);
    padding: 18px 18px 20px;
    color: #fff;
}
.waf-header-top {
    display: flex;
    align-items: center;
    gap: 10px;
}
.waf-header-icon {
    width: 38px; height: 38px;
    background: rgba(255,255,255,.18);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.waf-header-icon svg { width: 22px; height: 22px; fill: #fff; }
.waf-header-title { font-size: 15px; font-weight: 700; line-height: 1.2; }
.waf-header-sub   { font-size: 12px; opacity: .82; margin-top: 2px; }
.waf-status-dot {
    display: inline-block;
    width: 7px; height: 7px;
    background: #9fe87a;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
    animation: waf-pulse 2s infinite;
}
@keyframes waf-pulse {
    0%,100% { box-shadow: 0 0 0 0   rgba(159,232,122,.55); }
    50%      { box-shadow: 0 0 0 5px rgba(159,232,122,0);   }
}

/* ── LINES ── */
.waf-lines {
    padding: 10px 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.waf-line {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none !important;
    color: var(--wa-text) !important;
    transition: background .15s, transform .15s;
    position: relative;
    overflow: hidden;
}
.waf-line::before {
    content: '';
    position: absolute; inset: 0;
    background: #000;
    opacity: 0;
    transition: opacity .15s;
}
.pos-right .waf-line:hover { transform: translateX(-3px); }
.pos-left  .waf-line:hover { transform: translateX(3px);  }
.waf-line:hover::before    { opacity: .04; }

.waf-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.waf-info  { flex: 1; min-width: 0; }
.waf-name  { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.waf-msg   { font-size: 11.5px; color: var(--wa-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.waf-arrow { color: #bbb; flex-shrink: 0; }
.waf-arrow svg { width: 16px; height: 16px; display: block; }

.waf-divider {
    font-size: 11px; color: #bbb;
    text-align: center;
    padding: 0 14px 12px;
}

/* ── FAB ── */
#wa-fab {
    width: 58px; height: 58px;
    border-radius: 50%;
    background: var(--wa-green);
    box-shadow: 0 6px 20px rgba(37,211,102,.55);
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: transform .2s, box-shadow .2s;
    position: relative;
    outline: none;
}
#wa-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 28px rgba(37,211,102,.7);
}
#wa-fab svg {
    width: 30px; height: 30px; fill: #fff;
    transition: transform .28s, opacity .2s;
    position: absolute;
}
#wa-fab .waf-icon-open  { opacity: 1;  transform: scale(1) rotate(0); }
#wa-fab .waf-icon-close { opacity: 0;  transform: scale(.6) rotate(-90deg); }
#wa-fab.open .waf-icon-open  { opacity: 0; transform: scale(.6) rotate(90deg); }
#wa-fab.open .waf-icon-close { opacity: 1; transform: scale(1) rotate(0); }

/* ── TOOLTIP ── */
#wa-tooltip {
    background: #111b21;
    color: #fff;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .4s 1.4s, transform .4s 1.4s;
    pointer-events: none;
}
#wa-tooltip.show { opacity: 1; transform: translateY(0); }

.waf-fab-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.pos-right .waf-fab-row { flex-direction: row-reverse; }
.pos-left  .waf-fab-row { flex-direction: row; }
