/* Fred AI Chat Widget Styles */

#fred-chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4a9eff 0%, #357abd 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    color: white;
}

#fred-chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(74, 158, 255, 0.6);
}

#fred-chat-window {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    height: 550px;
    background: var(--card-bg, #1a1f2e);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    z-index: 1001;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color, #2d3748);
}

#fred-chat-window.fred-chat-hidden {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
}

#fred-chat-window.fred-chat-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.fred-chat-header {
    background: linear-gradient(135deg, #4a9eff 0%, #357abd 100%);
    padding: 16px;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.fred-chat-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fred-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.fred-header-text h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.fred-header-text span {
    font-size: 12px;
    opacity: 0.9;
}

.fred-close-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.fred-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.fred-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fred-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.fred-chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.fred-chat-messages::-webkit-scrollbar-thumb {
    background: var(--accent-color, #4a9eff);
    border-radius: 3px;
}

.fred-message {
    display: flex;
    margin-bottom: 8px;
}

.fred-message-user {
    justify-content: flex-end;
}

.fred-message-bot {
    justify-content: flex-start;
}

.fred-message-content {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 12px;
    line-height: 1.4;
    font-size: 14px;
}

.fred-message-user .fred-message-content {
    background: var(--accent-color, #4a9eff);
    color: white;
    border-bottom-right-radius: 4px;
}

.fred-message-bot .fred-message-content {
    background: var(--secondary-bg, #151921);
    color: var(--text-primary, #e4e6eb);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-color, #2d3748);
}

.fred-typing {
    display: flex;
    gap: 4px;
    padding: 12px 14px;
}

.fred-typing span {
    width: 8px;
    height: 8px;
    background: var(--accent-color, #4a9eff);
    border-radius: 50%;
    animation: fred-typing-animation 1.4s infinite;
}

.fred-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.fred-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes fred-typing-animation {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.fred-chat-input-container {
    padding: 16px;
    border-top: 1px solid var(--border-color, #2d3748);
    display: flex;
    gap: 8px;
}

#fred-chat-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border-color, #2d3748);
    border-radius: 8px;
    background: var(--secondary-bg, #151921);
    color: var(--text-primary, #e4e6eb);
    font-size: 14px;
    outline: none;
}

#fred-chat-input:focus {
    border-color: var(--accent-color, #4a9eff);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
}

#fred-chat-input::placeholder {
    color: var(--text-secondary, #b0b3b8);
}

#fred-chat-send {
    width: 40px;
    height: 40px;
    background: var(--accent-color, #4a9eff);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#fred-chat-send:hover {
    background: #357abd;
    transform: scale(1.05);
}

#fred-chat-send:active {
    transform: scale(0.95);
}

/* Quick Reply Buttons */
.fred-quick-replies {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    padding: 0 4px;
}

.fred-quick-reply-btn {
    padding: 10px 16px;
    background: var(--secondary-bg, #151921);
    border: 1px solid var(--accent-color, #4a9eff);
    border-radius: 8px;
    color: var(--accent-color, #4a9eff);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-family: inherit;
}

.fred-quick-reply-btn:hover {
    background: var(--accent-color, #4a9eff);
    color: white;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(74, 158, 255, 0.3);
}

.fred-quick-reply-btn:active {
    transform: translateX(2px);
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    #fred-chat-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 40px);
        bottom: 20px;
        right: 20px;
    }

    #fred-chat-button {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
    }
}
