/* Floating WhatsApp Launcher Front-end Styles */

/* Container */
.fwl-container {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Position */
.fwl-container.bottom-right {
    right: 20px;
    left: auto;
    bottom: 20px;
}

.fwl-container.bottom-left {
    left: 20px;
    right: auto;
    bottom: 20px;
}

/* RTL Positioning */
.fwl-rtl.fwl-container.bottom-right {
    left: 20px;
    right: auto;
}

.fwl-rtl.fwl-container.bottom-left {
    right: 20px;
    left: auto;
}

/* Launcher Button */
.fwl-launcher-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
}

.fwl-launcher-button svg {
    width: 30px;
    height: 30px;
    transition: transform 0.3s ease;
}

.fwl-launcher-button.fwl-button-active {
    transform: scale(1.1);
}

.fwl-launcher-button.fwl-button-active svg {
    transform: rotate(180deg);
}

/* Contacts Panel */
.fwl-contacts-panel {
    position: absolute;
    bottom: 80px;
    width: 320px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    visibility: hidden;
    z-index: 999999;
}

.bottom-right .fwl-contacts-panel {
    right: 0;
}

.bottom-left .fwl-contacts-panel {
    left: 0;
}

.fwl-contacts-panel.fwl-panel-open {
    max-height: 500px;
    opacity: 1;
    visibility: visible;
    margin-bottom: 10px;
    display: block;
    overflow-y: auto;
}

/* Panel Header */
.fwl-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background-color: #075e54;
    color: #fff;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    position: relative;
}

.fwl-panel-subheader {
    background-color: #f5f5f5;
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
    color: #333;
}

.fwl-panel-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.fwl-close-panel {
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

/* Contacts List */
.fwl-contacts-list {
    padding: 10px;
    max-height: 350px;
    overflow-y: auto;
}

/* Contact Item */
.fwl-contact-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
}

.fwl-contact-item:hover {
    background-color: #25D366;
    color: #fff;
}

.fwl-contact-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    overflow: hidden;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fwl-contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fwl-default-avatar {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fwl-default-avatar svg {
    width: 30px;
    height: 30px;
    color: #999;
}

.fwl-contact-info {
    flex: 1;
}

.fwl-contact-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.fwl-contact-role {
    font-size: 12px;
    color: #25D366;
    margin-top: 3px;
}

.fwl-contact-availability {
    font-size: 11px;
    color: #666;
    margin-top: 3px;
    background: #f9f9f9;
    padding: 2px 5px;
    border-radius: 3px;
}

.fwl-contact-item:hover .fwl-contact-role {
    color: rgba(255, 255, 255, 0.8);
}

/* RTL Support */
.fwl-rtl .fwl-contact-avatar {
    margin-right: 0;
    margin-left: 15px;
}

.fwl-rtl .fwl-contact-info {
    text-align: right;
}

.fwl-rtl .fwl-panel-header {
    direction: rtl;
}

.fwl-rtl .fwl-panel-subheader {
    direction: rtl;
    text-align: right;
}

.fwl-rtl .fwl-close-panel {
    left: 15px;
    right: auto;
}

.fwl-rtl .fwl-contacts-panel {
    text-align: right;
}

/* Responsive */
@media screen and (max-width: 480px) {
    .fwl-contacts-panel {
        width: 280px;
    }
    
    .bottom-left .fwl-contacts-panel {
        left: -70px;
    }
    
    .bottom-right .fwl-contacts-panel {
        right: -70px;
    }
    
    .fwl-launcher-button {
        width: 50px;
        height: 50px;
    }
    
    .fwl-launcher-button svg {
        width: 25px;
        height: 25px;
    }
}

/* Animations */
@keyframes fwl-pulse {
    0% {
        transform: scale(1);
    }
    15% {
        transform: scale(1.15);
    }
    30% {
        transform: scale(1);
    }
}

.fwl-pulse {
    animation: fwl-pulse 2s infinite;
}
