/* Chat Window */
.acb-chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 150px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 999998;
    overflow: hidden;
}

.acb-chat-window.acb-chat-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Position adjustments */
.acb-position-bottom-left .acb-chat-window {
    right: auto;
    left: 30px;
}

.acb-position-top-right .acb-chat-window {
    bottom: auto;
    top: 100px;
}

.acb-position-top-left .acb-chat-window {
    bottom: auto;
    top: 100px;
    right: auto;
    left: 30px;
}

/* Chat Header */
.acb-chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 16px 16px 0 0;
}

.acb-chat-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.acb-chat-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.808);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    overflow: hidden;
}

.acb-chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.acb-chat-header-text h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
  	color:white;
}

.acb-chat-header-text p {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

.acb-chat-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.acb-chat-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.acb-chat-close svg {
    width: 20px;
    height: 20px;
}

/* Chat Messages */
.acb-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.acb-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.acb-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.acb-chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.acb-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Message */
.acb-message {
    display: flex;
    gap: 10px;
    animation: acb-message-slide-in 0.3s ease;
}

@keyframes acb-message-slide-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.acb-message-user {
    flex-direction: row-reverse;
}

.acb-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    overflow: hidden;
}

.acb-message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.acb-message-content {
    max-width: 75%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.acb-message-user .acb-message-content {
    align-items: flex-end;
}

.acb-message-text {
    background: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    line-height: 1.5;
    word-wrap: break-word;
}

.acb-message-user .acb-message-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.acb-message-time {
    font-size: 11px;
    color: #718096;
    padding: 0 4px;
}

/* Service Options */
.acb-service-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 8px;
}

.acb-service-btn {
    background: #fff;
    border: 2px solid #e2e8f0;
    padding: 16px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.acb-service-btn:hover:not(.disabled) {
    border-color: #667eea;
    background: #f7fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.acb-service-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.acb-service-icon {
    font-size: 28px;
}

.acb-service-icon-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.acb-service-name {
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
}

/* Quick Replies */
.acb-quick-replies {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.acb-quick-reply-btn,
.acb-restart-btn,
.acb-close-btn {
    background: #fff;
    border: 2px solid #e2e8f0;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
    color: #2d3748;
    text-align: left;
}

.acb-quick-reply-btn:hover:not(.disabled),
.acb-restart-btn:hover,
.acb-close-btn:hover {
    border-color: #667eea;
    background: #f7fafc;
    transform: translateX(4px);
}

.acb-quick-reply-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.acb-restart-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
}

.acb-restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Contact Form */
.acb-contact-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.acb-contact-email,
.acb-contact-phone {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.acb-contact-email:focus,
.acb-contact-phone:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.acb-contact-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 5px;
}

.acb-contact-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Chat Input */
.acb-chat-input {
    padding: 16px 20px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 16px 16px;
}

.acb-input-container {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.acb-text-input,
.acb-textarea-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    transition: border-color 0.2s;
}

.acb-text-input:focus,
.acb-textarea-input:focus {
    outline: none;
    border-color: #667eea;
}

.acb-send-btn {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.acb-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.acb-send-btn svg {
    width: 20px;
    height: 20px;
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .acb-chat-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 120px);
        bottom: 80px;
        right: 10px;
        left: 10px;
        margin: 0 auto;
    }
    
    .acb-position-bottom-left .acb-chat-window,
    .acb-position-top-right .acb-chat-window,
    .acb-position-top-left .acb-chat-window {
        right: 10px;
        left: 10px;
    }
    
    .acb-service-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .acb-message-content {
        max-width: 85%;
    }
}

/* Typing Indicator */
.acb-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 12px;
    width: fit-content;
}

.acb-typing-dot {
    width: 8px;
    height: 8px;
    background: #cbd5e0;
    border-radius: 50%;
    animation: acb-typing 1.4s infinite;
}

.acb-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.acb-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes acb-typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Success Animation */
.acb-success-icon {
    font-size: 48px;
    text-align: center;
    animation: acb-success-bounce 0.6s ease;
}

@keyframes acb-success-bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}
