/* CloudWave Multi-Chat Widget Styles */

.cwmc-widget {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.cwmc-widget.cwmc-bottom-right {
    bottom: 20px;
    right: 20px;
}

.cwmc-widget.cwmc-bottom-left {
    bottom: 20px;
    left: 20px;
}

/* Main floating button */
.cwmc-main-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    z-index: 10;
}

.cwmc-main-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.cwmc-main-button:active {
    transform: scale(0.95);
}

.cwmc-chat-icon,
.cwmc-close-icon {
    transition: opacity 0.3s ease, transform 0.3s ease;
    position: absolute;
}

.cwmc-close-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

.cwmc-widget.active .cwmc-chat-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

.cwmc-widget.active .cwmc-close-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Chat menu */
.cwmc-menu {
    position: absolute;
    bottom: 80px;
    right: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    min-width: 300px;
    max-width: 320px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
}

.cwmc-widget.cwmc-bottom-left .cwmc-menu {
    right: auto;
    left: 0;
}

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

/* Welcome message */
.cwmc-welcome-message {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    line-height: 1.5;
}

/* Options container */
.cwmc-options {
    padding: 12px;
}

/* Individual option */
.cwmc-option {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    margin-bottom: 8px;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.25s ease;
    background: #f7f7f7;
    position: relative;
    overflow: hidden;
}

.cwmc-option:last-child {
    margin-bottom: 0;
}

.cwmc-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.cwmc-option:hover::before {
    left: 100%;
}

.cwmc-option:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.cwmc-option-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.cwmc-option:hover .cwmc-option-icon {
    transform: scale(1.1) rotate(5deg);
}

/* WhatsApp */
.cwmc-whatsapp .cwmc-option-icon {
    background: #25D366;
    color: white;
}

.cwmc-whatsapp:hover {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
}

/* Telegram */
.cwmc-telegram .cwmc-option-icon {
    background: #0088cc;
    color: white;
}

.cwmc-telegram:hover {
    background: linear-gradient(135deg, #0088cc 0%, #005f8c 100%);
    color: white;
}

/* Live Chat */
.cwmc-livechat .cwmc-option-icon {
    background: #7b7afc;
    color: white;
}

.cwmc-livechat:hover {
    background: linear-gradient(135deg, #7b7afc 0%, #4e4feb 100%);
    color: white;
}

/* Support Ticket */
.cwmc-ticket .cwmc-option-icon {
    background: #ff6b6b;
    color: white;
}

.cwmc-ticket:hover {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
}

/* Animations */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cwmc-widget.animation-enabled .cwmc-option {
    animation: slideUp 0.3s ease forwards;
    opacity: 0;
}

.cwmc-widget.animation-enabled .cwmc-option:nth-child(1) {
    animation-delay: 0.1s;
}

.cwmc-widget.animation-enabled .cwmc-option:nth-child(2) {
    animation-delay: 0.15s;
}

.cwmc-widget.animation-enabled .cwmc-option:nth-child(3) {
    animation-delay: 0.2s;
}

.cwmc-widget.animation-enabled .cwmc-option:nth-child(4) {
    animation-delay: 0.25s;
}

/* Pulse effect for main button */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(123, 122, 252, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(123, 122, 252, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(123, 122, 252, 0);
    }
}

.cwmc-main-button {
    animation: pulse 2s infinite;
}

.cwmc-widget.active .cwmc-main-button {
    animation: none;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .cwmc-widget {
        bottom: 15px;
        right: 15px;
    }
    
    .cwmc-widget.cwmc-bottom-left {
        left: 15px;
    }
    
    .cwmc-menu {
        min-width: 280px;
        max-width: calc(100vw - 30px);
    }
    
    .cwmc-main-button {
        width: 56px;
        height: 56px;
    }
    
    .cwmc-option {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .cwmc-option-icon {
        width: 36px;
        height: 36px;
    }
    
    .cwmc-welcome-message {
        padding: 16px;
        font-size: 15px;
    }
}

/* Accessibility */
.cwmc-main-button:focus,
.cwmc-option:focus {
    outline: 2px solid #7b7afc;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .cwmc-widget {
        display: none !important;
    }
}
