/* =========================================================
   LOQ WHATSAPP PRO — Base Widget Structure
   ========================================================= */

:root {
    --lwa-green: #25d366;
    --lwa-ios-bg: rgba(255, 255, 255, 0.8);
    --lwa-ios-glass: saturate(180%) blur(20px);
    --lwa-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    --lwa-dark: #0f172a;
}

.loq-wa-pro-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100000;
    font-family: 'Inter', -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Base Button */
.loq-wa-pro-btn {
    all: unset;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--lwa-green);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.35);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 20;
}

.loq-wa-pro-btn:hover {
    transform: scale(1.1) translateY(-5px);
}

.loq-wa-pro-custom-icon {
    width: 100%; height: 100%; object-fit: contain; border-radius: 50%;
}

.loq-wa-pro-notif {
    position: absolute; top: -2px; right: -2px; background: #ff3b30; color: #fff;
    font-size: 11px; font-weight: 800; width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; border: 3px solid #fff;
}

/* Shared CTA functionality (Common Layout) */
.loq-wa-pro-cta-bubble {
    position: absolute;
    bottom: 95px;
    right: 0;
    width: 320px;
    min-height: 40px;
    padding: 20px 24px;
    border-radius: 30px;
    z-index: 15;
    box-sizing: border-box;
    cursor: pointer;
    
    /* Animation base */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(15px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.loq-wa-pro-cta-bubble.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.loq-wa-pro-cta-content p {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    padding-right: 25px;
}

.loq-wa-pro-cta-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: transparent;
    border: 0;
    color: inherit;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.4;
    line-height: 1;
    padding: 4px;
}

.loq-wa-pro-cta-close:hover { opacity: 1; }

.loq-wa-pro-cta-bubble::after {
    content: '';
    position: absolute;
    bottom: -12px;
    right: 22px;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
}

/* Base Sheet Logic */
.loq-wa-pro-sheet {
    position: absolute; bottom: 85px; right: 0; width: 340px;
    box-shadow: var(--lwa-shadow); border: 1px solid rgba(255, 255, 255, 0.4);
    overflow: hidden; pointer-events: none; opacity: 0;
    transform: translateY(30px) scale(0.9); transform-origin: bottom right;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.loq-wa-pro-widget.is-open .loq-wa-pro-sheet { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }

.loq-wa-pro-header { background: rgba(15, 37, 59, 0.95); padding: 24px; display: flex; justify-content: space-between; align-items: center; color: #fff; }
.loq-wa-pro-agent { display: flex; align-items: center; gap: 14px; }
.loq-wa-pro-avatar { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; position: relative; border: 2px solid rgba(255,255,255,0.2); }
.loq-wa-pro-avatar img { width: 100%; height: 100%; object-fit: cover; }
.loq-wa-pro-id-init { background: #eee; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.loq-wa-pro-online-indicator { position: absolute; bottom: 2px; right: 2px; width: 10px; height: 10px; background: #34c759; border-radius: 50%; border: 2px solid #0f253b; }
.loq-wa-pro-info { display: flex; flex-direction: column; }
.loq-wa-pro-name { font-weight: 800; font-size: 16px; }
.loq-wa-pro-role { font-size: 12px; opacity: 0.7; }
.loq-wa-pro-close { all: unset; cursor: pointer; font-size: 28px; opacity: 0.5; }

.loq-wa-pro-body {
    padding: 24px;
    background-size: 100%;
    max-height: 350px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
.loq-wa-pro-body::-webkit-scrollbar { width: 4px; }
.loq-wa-pro-body::-webkit-scrollbar-track { background: transparent; }
.loq-wa-pro-body::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 10px; }

.loq-wa-pro-message {
    background: #fff;
    padding: 14px 18px;
    border-radius: 6px 20px 20px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    max-width: 90%;
    margin-bottom: 20px;
    animation: lwa-fade-in 0.4s ease-out;
}

@keyframes lwa-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.loq-wa-pro-message p { margin: 0; font-size: 13px; color: #1c1c1e; line-height: 1.5; }
.loq-wa-pro-time { display: block; margin-top: 8px; font-size: 10px; color: #8e8e93; text-align: right; }

.loq-wa-pro-footer { padding: 20px 24px 24px; }
.loq-wa-pro-start-btn {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    background: #25d366; color: #fff; text-decoration: none; font-weight: 800; font-size: 16px;
    padding: 16px; border-radius: 18px; transition: all 0.3s;
}

@media (max-width: 480px) {
    .loq-wa-pro-sheet { position: fixed; bottom: 95px; left: 20px; right: 20px; width: auto; }
}
