/**
 * WhatsApp Interactive Chat - Styles
 * Floating button + greeting bubble + shortcode buttons
 */

:root {
    --wa-green: #25D366;
    --wa-green-dark: #128C7E;
    --wa-green-light: #DCF8C6;
    --wa-text: #111B21;
    --wa-gray: #667781;
    --wa-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

/* ===== FLOATING WIDGET - Stil premium similar alextag.ro ===== */
#wa-chat-widget {
    position: fixed !important;
    bottom: var(--wa-bottom-offset, 90px) !important;
    right: 24px !important;
    z-index: 999999 !important;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    isolation: isolate;
}

/* Main Floating Button - foarte protejat împotriva suprascrierilor de temă */
#wa-chat-widget .wa-chat-button,
.wa-chat-button {
    width: 60px !important;
    height: 60px !important;
    background-color: #25D366 !important;
    background: #25D366 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding: 0 !important;
    text-decoration: none !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

#wa-chat-widget .wa-chat-button:hover,
.wa-chat-button:hover {
    background-color: #128C7E !important;
    background: #128C7E !important;
    color: #ffffff !important;
    transform: scale(1.08) !important;
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.35) !important;
}

#wa-chat-widget .wa-chat-button:active,
.wa-chat-button:active {
    transform: scale(0.96) !important;
    background-color: #128C7E !important;
}

/* Online dot on button */
#wa-chat-widget .wa-online-dot,
.wa-online-dot {
    position: absolute !important;
    top: 6px !important;
    right: 6px !important;
    width: 13px !important;
    height: 13px !important;
    background: #34C759 !important;
    border: 2px solid #ffffff !important;
    border-radius: 50% !important;
    box-shadow: 0 0 0 2px rgba(52, 199, 89, 0.3) !important;
    animation: wa-pulse 2s infinite ease-in-out;
    z-index: 1;
}

@keyframes wa-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.85; }
}

/* ===== GREETING BUBBLE - Elegant dark style ===== */
.wa-greeting-bubble {
    background: #1F2937;
    color: #F9FAFB;
    width: 255px;
    max-width: calc(100vw - 70px);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    overflow: hidden;
    animation: wa-bubble-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: bottom right;
    position: relative;
    padding: 13px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

@keyframes wa-bubble-in {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.85);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wa-greeting-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.wa-greeting-bubble .wa-person-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.15);
    background: #F8FAFC;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wa-greeting-bubble .wa-greeting-text {
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.35;
    color: #E5E7EB;
}

.wa-greeting-bubble .wa-bubble-close {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(255,255,255,0.08);
    border: none;
    width: 20px;
    height: 20px;
    font-size: 15px;
    line-height: 1;
    color: #9CA3AF;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.wa-greeting-bubble .wa-bubble-close:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

/* ===== MAIN CONTACT BAR - WhatsApp Green + L Avatar ===== */
.wa-contact-bar {
    background: #25D366;           /* WhatsApp green */
    color: #fff;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 15px 8px 9px;
    border-radius: 9999px;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.32);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 250px;
    width: auto;
}

.wa-contact-bar:hover {
    background: #20BA5A;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.38);
}

.wa-contact-bar .wa-person-photo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.35);
    background: #F8FAFC;           /* Light background for the L avatar */
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wa-contact-bar .wa-person-photo.small {
    width: 32px;
    height: 32px;
}

.wa-bar-info {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
    margin-right: 4px;
}

.wa-contact-bar .wa-name {
    font-weight: 600;
    font-size: 14.5px;
    letter-spacing: -0.1px;
    color: #fff;
}

.wa-contact-bar .wa-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: rgba(255,255,255,0.9);
    margin-top: 0.5px;
}

.wa-contact-bar .wa-status-dot {
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
}

.wa-contact-bar .wa-arrow {
    margin-left: auto;
    opacity: 0.85;
    display: flex;
    align-items: center;
    color: #fff;
}

/* ===== SHORTCODE BUTTONS (for Elementor / templates) - protejate */
.wa-button,
a.wa-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;
    background-color: #25D366 !important;
    background: #25D366 !important;
    color: #ffffff !important;
    padding: 12px 22px !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    line-height: 1 !important;
    box-shadow: 0 3px 12px rgba(37, 211, 102, 0.3) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.wa-button:hover,
a.wa-button:hover {
    background-color: #128C7E !important;
    background: #128C7E !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 5px 18px rgba(37, 211, 102, 0.38) !important;
}

.wa-button:active,
a.wa-button:active {
    transform: translateY(0) !important;
    background-color: #128C7E !important;
}

.wa-button-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.wa-button-text {
    font-weight: 600;
    letter-spacing: -.2px;
}

/* Variant styles for Elementor flexibility */
.wa-button.wa-small {
    padding: 9px 16px;
    font-size: 14px;
    gap: 7px;
}

.wa-button.wa-outline {
    background: transparent;
    color: var(--wa-green) !important;
    border: 2px solid var(--wa-green);
    box-shadow: none;
}

.wa-button.wa-outline:hover {
    background: var(--wa-green);
    color: #fff !important;
}

/* Responsive tweaks */
@media (max-width: 480px) {
    #wa-chat-widget {
        bottom: var(--wa-bottom-offset, 75px) !important;
        right: 16px !important;
    }
    
    .wa-greeting-bubble {
        width: 235px;
        padding: 12px 14px;
    }
    
    .wa-contact-bar {
        padding: 8px 12px 8px 8px;
    }
}

/* Make sure Elementor doesn't break our buttons */
.elementor .wa-button {
    display: inline-flex;
}