/* Kimberley Universal Chatbox Styles */
.kimberley-chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.kimberley-chat-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a90e2, #1a2633);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(74, 144, 226, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.kimberley-chat-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(74, 144, 226, 0.4);
}

.kimberley-chat-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.kimberley-chat-btn:hover::before {
    left: 100%;
}

.kimberley-chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    border: 1px solid #e0e0e0;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideInUp 0.3s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kimberley-chat-header {
    background: linear-gradient(135deg, #4a90e2, #1a2633);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kimberley-chat-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.kimberley-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.kimberley-chat-close:hover {
    background: rgba(255,255,255,0.2);
}

.kimberley-chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9fa;
}

.kimberley-message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.kimberley-message.user {
    justify-content: flex-end;
}

.kimberley-message.ai {
    justify-content: flex-start;
}

.kimberley-message-content {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
}

.kimberley-message.user .kimberley-message-content {
    background: #4a90e2;
    color: white;
    border-bottom-right-radius: 4px;
}

.kimberley-message.ai .kimberley-message-content {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
}

.kimberley-chat-input-container {
    padding: 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.kimberley-chat-input-form {
    display: flex;
    gap: 10px;
}

.kimberley-chat-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s;
}

.kimberley-chat-input:focus {
    border-color: #4a90e2;
}

.kimberley-chat-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #4a90e2;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.kimberley-chat-send:hover {
    background: #357abd;
}

.kimberley-chat-send:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.kimberley-typing-indicator {
    display: none;
    align-items: center;
    margin-bottom: 15px;
}

.kimberley-typing-dots {
    display: flex;
    gap: 4px;
}

.kimberley-typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    animation: typing 1.4s infinite ease-in-out;
}

.kimberley-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.kimberley-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Responsive design */
@media (max-width: 768px) {
    .kimberley-chat-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 140px);
        bottom: 90px;
        right: 20px;
    }
    
    .kimberley-chat-btn {
        width: 56px;
        height: 56px;
        font-size: 22px;
    }
}

/* Accessibility */
.kimberley-chat-btn:focus,
.kimberley-chat-close:focus,
.kimberley-chat-input:focus,
.kimberley-chat-send:focus {
    outline: 2px solid #4a90e2;
    outline-offset: 2px;
}

/* Status indicator */
.kimberley-status-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #28a745;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}