/* Live Chat Widget Styles */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99998;
    font-family: 'Inter', sans-serif;
}

.chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4af37, #b08a1a);
    border: none;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    animation: pulse 2s infinite;
    position: relative;
    z-index: 99999;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(212, 175, 55, 0.6);
}

@keyframes pulse {
    0% { box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4); }
    50% { box-shadow: 0 8px 25px rgba(212, 175, 55, 0.8); }
    100% { box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4); }
}

.chat-popup {
    position: fixed;
    bottom: 20px;
    right: 90px;
    top: auto;
    width: 300px;
    height: 350px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0) translateX(50px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    z-index: 99999;
    max-height: calc(100vh - 40px);
}

.chat-popup.active {
    transform: scale(1) translateX(0);
    opacity: 1;
}

.chat-popup.active {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.chat-header {
    background: linear-gradient(135deg, #d4af37, #b08a1a);
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
}

.chat-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.chat-close:hover {
    opacity: 1;
}

.chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b08a1a;
    font-size: 24px;
}

.chat-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.chat-subtitle {
    font-size: 12px;
    opacity: 0.9;
    margin: 5px 0 0 0;
}

.chat-options {
    padding: 15px;
    height: calc(100% - 110px);
    overflow-y: auto;
}

.chat-option {
    display: block;
    width: 100%;
    padding: 15px;
    margin-bottom: 10px;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    background: white;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    font-size: 14px;
    text-align: left;
}

.chat-option:hover {
    border-color: #d4af37;
    background: #f4eed6;
    color: #b08a1a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.2);
}

.chat-option i {
    margin-right: 10px;
    width: 20px;
    color: #d4af37;
}

.chat-footer {
    padding: 15px 20px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
    font-size: 11px;
    color: #666;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chat-widget {
        bottom: 15px;
        right: 15px;
    }
    .chat-button {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
    .chat-popup {
        position: fixed;
        bottom: 15px;
        right: 80px;
        left: 15px;
        width: auto;
        height: 300px;
        max-height: calc(100vh - 30px);
        transform: scale(0) translateX(30px);
    }
    .chat-popup.active {
        transform: scale(1) translateX(0);
    }
    .chat-header {
        padding: 15px;
    }
    .chat-avatar {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    .chat-title {
        font-size: 14px;
    }
    .chat-subtitle {
        font-size: 11px;
    }
    .chat-options {
        padding: 15px;
    }
    .chat-option {
        padding: 12px;
        font-size: 13px;
    }
}

.status-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 12px;
    height: 12px;
    background: #28a745;
    border: 2px solid white;
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* Chat overlay untuk mencegah tumpang tindih */
.chat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 99997;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.chat-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Pastikan popup selalu di atas overlay */
.chat-popup {
    z-index: 99999;
}

.chat-popup.active {
    z-index: 99999;
}
