/* Frontend Styles for Floating Chat Widget */

#fcw-widget-container {
    position: fixed;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#fcw-widget-container.fcw-position-bottom-right {
    align-items: flex-end;
}

#fcw-widget-container.fcw-position-bottom-left {
    align-items: flex-start;
}

.fcw-widget-item {
    position: relative;
}

/* Button Styles */
.fcw-single-button,
.fcw-multiple-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.fcw-single-button:hover,
.fcw-multiple-button:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.fcw-single-button:active,
.fcw-multiple-button:active {
    transform: scale(0.95);
}

.fcw-whatsapp-button {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.fcw-phone-button {
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
}

.fcw-single-button svg,
.fcw-multiple-button svg {
    width: 32px;
    height: 32px;
    fill: white;
    position: relative;
    z-index: 2;
}

/* Ripple Effect */
.fcw-ripple-enabled .fcw-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: 0;
    animation: fcw-ripple-animation 2s ease-out infinite;
}

.fcw-ripple-enabled .fcw-ripple-delay {
    animation-delay: 1s;
}

@keyframes fcw-ripple-animation {
    0% {
        width: 100%;
        height: 100%;
        opacity: 0.8;
    }
    100% {
        width: 180%;
        height: 180%;
        opacity: 0;
    }
}

.fcw-whatsapp-button .fcw-ripple {
    color: #25D366;
}

.fcw-phone-button .fcw-ripple {
    color: #4A90E2;
}

/* Popup Menu */
.fcw-popup-menu {
    position: absolute;
    bottom: 75px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    min-width: 320px;
    max-width: 380px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.fcw-position-bottom-right .fcw-popup-menu {
    right: 0;
}

.fcw-position-bottom-left .fcw-popup-menu {
    left: 0;
}

.fcw-popup-menu.fcw-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.fcw-popup-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
}

.fcw-popup-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #212529;
}

.fcw-popup-body {
    padding: 12px 0;
    max-height: 400px;
    overflow-y: auto;
}

/* WhatsApp Contact Item */
.fcw-contact-item {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    text-decoration: none;
    color: #212529;
    transition: background-color 0.2s;
    gap: 16px;
}

.fcw-contact-item:hover {
    background-color: #f8f9fa;
}

.fcw-contact-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.fcw-contact-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.fcw-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    color: white;
}

.fcw-online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background-color: #10B981;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
    animation: fcw-pulse 2s ease-in-out infinite;
}

@keyframes fcw-pulse {
    0%, 100% {
        box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.4);
    }
}

.fcw-contact-info {
    flex: 1;
    min-width: 0;
}

.fcw-contact-name {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 2px;
}

.fcw-contact-designation {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 4px;
}

.fcw-contact-status {
    font-size: 12px;
    color: #10B981;
    font-weight: 500;
}

/* Phone Contact Item */
.fcw-phone-item {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    text-decoration: none;
    color: #212529;
    transition: background-color 0.2s;
    gap: 16px;
}

.fcw-phone-item:hover {
    background-color: #f8f9fa;
}

.fcw-phone-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fcw-phone-icon svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.fcw-phone-details {
    flex: 1;
    min-width: 0;
}

.fcw-phone-label {
    font-size: 14px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 4px;
}

.fcw-phone-number {
    font-size: 15px;
    color: #4A90E2;
    font-weight: 500;
}

/* Scrollbar Styling */
.fcw-popup-body::-webkit-scrollbar {
    width: 6px;
}

.fcw-popup-body::-webkit-scrollbar-track {
    background: transparent;
}

.fcw-popup-body::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 3px;
}

.fcw-popup-body::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .fcw-popup-menu {
        min-width: 280px;
        max-width: calc(100vw - 40px);
    }
    
    .fcw-single-button,
    .fcw-multiple-button {
        width: 56px;
        height: 56px;
    }
    
    .fcw-single-button svg,
    .fcw-multiple-button svg {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .fcw-popup-menu {
        min-width: 260px;
    }
    
    .fcw-contact-item,
    .fcw-phone-item {
        padding: 12px 16px;
    }
    
    .fcw-popup-header {
        padding: 16px 20px;
    }
}
