/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */
/* Chat Button */
.keg-chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #0969da;
    color: white;
    padding: 15px 20px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9998;
    transition: all 0.3s ease;
}

.keg-chat-button:hover {
    background: #0550ae;
    transform: scale(1.05);
}

.keg-chat-button svg {
    width: 24px;
    height: 24px;
}

.keg-chat-button-text {
    font-weight: 600;
    font-size: 14px;
}

/* Chat Window */
.keg-chat-window {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    height: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
}

@media (max-width: 768px) {
    .keg-chat-window {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
}

/* Header */
.keg-chat-header {
    background: linear-gradient(135deg, #0969da 0%, #0550ae 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.keg-chat-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.keg-chat-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.keg-chat-status {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

.keg-chat-close {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.keg-chat-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Messages Area */
.keg-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f6f8fa;
}

.keg-chat-welcome {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
}

.keg-chat-welcome p {
    margin: 0;
    color: #666;
}

.keg-chat-message {
    margin-bottom: 16px;
    display: flex;
    gap: 10px;
}

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

.keg-message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    word-wrap: break-word;
}

.keg-chat-message.user .keg-message-content {
    background: #0969da;
    color: white;
    border-bottom-right-radius: 4px;
}

.keg-chat-message.assistant .keg-message-content {
    background: white;
    color: #24292f;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.keg-message-time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
}

/* Typing Indicator */
.keg-chat-typing {
    padding: 12px 20px;
    background: #f6f8fa;
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid #e1e4e8;
    font-size: 13px;
    color: #666;
}

.keg-typing-indicator {
    display: flex;
    gap: 4px;
}

.keg-typing-indicator span {
    width: 8px;
    height: 8px;
    background: #0969da;
    border-radius: 50%;
    animation: keg-typing 1.4s infinite;
}

.keg-typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.keg-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

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

/* Input Area */
.keg-chat-input-area {
    padding: 16px;
    background: white;
    border-top: 1px solid #e1e4e8;
}

#keg-chat-form {
    display: flex;
    gap: 10px;
}

.keg-chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #d0d7de;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.keg-chat-input:focus {
    border-color: #0969da;
}

.keg-chat-send-btn {
    padding: 15px;
    height: 40px;
    background: #0969da;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.keg-chat-send-btn:hover {
    background: #0550ae;
}

.keg-chat-send-btn:disabled {
    background: #d0d7de;
    cursor: not-allowed;
}

/* Scrollbar */
.keg-chat-messages::-webkit-scrollbar {
    width: 6px;
}

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

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

.keg-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #afb8c1;
}