/* WhatsApp Floating Buttons - Frontend Styles */

.wfb-button {
    position: fixed;
    display: flex;
    align-items: center;
    gap: 0px;
    padding: 0px 0px;
    background-color: #25D366;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    font-weight: 600;
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    white-space: nowrap;
}

.wfb-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    text-decoration: none;
    color: white;
}

.wfb-button:active {
    transform: translateY(0) scale(1);
}

.wfb-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 57px;
    height: 57px;
    flex-shrink: 0;
}

.wfb-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.wfb-text {
    display: inline-block;
}

/* Poziționare */
.wfb-left {
    left: var(--wfb-side-spacing, 20px);
}

.wfb-right {
    right: var(--wfb-side-spacing, 20px);
}

/* Calculăm poziția pentru butoane */
.wfb-button.wfb-message.wfb-left,
.wfb-button.wfb-message.wfb-right {
    bottom: var(--wfb-bottom-spacing, 20px);
}

.wfb-button.wfb-call.wfb-left,
.wfb-button.wfb-call.wfb-right {
    bottom: var(--wfb-bottom-spacing, 20px);
}

/* Când ambele butoane sunt pe aceeași parte */
body:has(.wfb-message.wfb-left):has(.wfb-call.wfb-left) .wfb-call.wfb-left {
    bottom: calc(var(--wfb-bottom-spacing, 20px) + 55px + var(--wfb-button-spacing, 10px));
}

body:has(.wfb-message.wfb-right):has(.wfb-call.wfb-right) .wfb-call.wfb-right {
    bottom: calc(var(--wfb-bottom-spacing, 20px) + 55px + var(--wfb-button-spacing, 10px));
}

/* Display Settings */
.wfb-display-mobile {
    display: none;
}

.wfb-display-desktop {
    display: flex;
}

.wfb-display-both {
    display: flex;
}

/* Responsive - Mobile */
@media screen and (max-width: 768px) {
    .wfb-button {
        border-radius: 50%;
        padding: 0;
        justify-content: center;
        background: none !important;
        box-shadow: none;
        width: 57px;
        height: 57px;
    }
    
    .wfb-text {
        display: none;
    }
    
    .wfb-icon {
        width: 57px;
        height: 57px;
    }
    
    .wfb-display-mobile {
        display: flex;
    }
    
    .wfb-display-desktop {
        display: none;
    }
    
    .wfb-display-both {
        display: flex;
    }
    
    /* Ajustare spațiu între butoane pe mobil */
    body:has(.wfb-message.wfb-left):has(.wfb-call.wfb-left) .wfb-call.wfb-left {
        bottom: calc(var(--wfb-bottom-spacing, 20px) + 67px + var(--wfb-button-spacing, 10px));
    }
    
    body:has(.wfb-message.wfb-right):has(.wfb-call.wfb-right) .wfb-call.wfb-right {
        bottom: calc(var(--wfb-bottom-spacing, 20px) + 67px + var(--wfb-button-spacing, 10px));
    }
}

/* Tablets */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .wfb-button {
        padding: 11px 18px;
        font-size: 14px;
    }
}

/* Animation on load */
@keyframes wfbSlideIn {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes wfbSlideInLeft {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.wfb-button.wfb-right {
    animation: wfbSlideIn 0.5s ease-out;
}

.wfb-button.wfb-left {
    animation: wfbSlideInLeft 0.5s ease-out;
}

/* Pulse animation pentru a atrage atenția */
@keyframes wfbPulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
}

.wfb-button {
    animation: wfbSlideIn 0.5s ease-out, wfbPulse 2s ease-in-out 1s infinite;
}

.wfb-button.wfb-left {
    animation: wfbSlideInLeft 0.5s ease-out, wfbPulse 2s ease-in-out 1s infinite;
}

/* Dezactivează animația la hover */
.wfb-button:hover {
    animation: none;
}

/* Print styles - ascunde butoanele la print */
@media print {
    .wfb-button {
        display: none !important;
    }
}

/* Accesibilitate */
.wfb-button:focus {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.wfb-button:focus:not(:focus-visible) {
    outline: none;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .wfb-button {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    .wfb-button:hover {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    }
}
