/* SwiftHare AI Chat Widget Styles */

#swifthare-ai-chat-widget {
    position: fixed;
    bottom: 0px;
    right: 0px;
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 99999;
    display: flex;
    flex-direction: column;
}

#swifthare-ai-chat-widget.swifthare-ai-chat-minimized {
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    border-radius: 50%;
    cursor: pointer;
}

#swifthare-ai-chat-header {
    padding: 15px 20px;
    background: #1a237e;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#swifthare-ai-chat-widget.swifthare-ai-chat-minimized #swifthare-ai-chat-header,
#swifthare-ai-chat-widget.swifthare-ai-chat-minimized #swifthare-ai-chat-body {
    display: none;
}

#swifthare-ai-chat-icon {
    display: none;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
}

#swifthare-ai-chat-widget.swifthare-ai-chat-minimized #swifthare-ai-chat-icon {
    display: flex;
}

#swifthare-ai-chat-icon .dashicons {
    font-size: 30px;
    width: 30px;
    height: 30px;
    color: #fff;
}

#swifthare-ai-chat-body {
    height: 450px;
    display: flex;
    flex-direction: column;
}

#swifthare-ai-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.swifthare-ai-message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.4;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    word-break: break-all;
}

.swifthare-ai-message-user {
    align-self: flex-end;
    background: #1a237e;
    color: #fff;
    border-bottom-right-radius: 2px;
}

.swifthare-ai-message-ai {
    align-self: flex-start;
    background: #e9ecef;
    color: #333;
    border-bottom-left-radius: 2px;
}

#swifthare-ai-chat-input-area {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

#swifthare-ai-chat-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 15px;
    outline: none;
    transition: border-color 0.2s;
    resize: none;
    min-height: 38px;
    max-height: 120px;
    overflow-y: hidden;
    line-height: 1.4;
    font-family: inherit;
}

#swifthare-ai-chat-input:focus {
    border-color: #1a237e;
}

#swifthare-ai-chat-send {
    background: #1a237e;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    cursor: pointer;
    transition: opacity 0.2s;
}

#swifthare-ai-chat-send:hover {
    opacity: 0.9;
}

#swifthare-ai-chat-toggle {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

/* Typing Indicator - Bouncing Dots */
#swifthare-typing-indicator {
    display: none;
    padding: 10px 15px;
    background: #e9ecef;
    border-radius: 15px;
    border-bottom-left-radius: 2px;
    width: fit-content;
    margin-bottom: 2px;
    align-self: flex-start;
}

.swifthare-typing-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 3px;
    background: #888;
    border-radius: 50%;
    animation: swifthare-bounce 1.4s infinite ease-in-out both;
}

.swifthare-typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

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

@keyframes swifthare-bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* ── Hidden file input (wp_kses strips inline display:none, so use CSS) ── */
#swifthare-ai-chat-image-upload {
    display: none !important;
}

/* ── Branding Logo ─────────────────────────────────────────── */
#swifthare-ai-branding-link {
    display: flex;
    justify-content: flex-end;
    padding: 0 10px 6px;
    opacity: 0.55;
    transition: opacity 0.2s ease;
    text-decoration: none;
}

#swifthare-ai-branding-link:hover {
    opacity: 0.9;
}

#swifthare-ai-branding-logo {
    width: 35px;
    height: 35px;
    object-fit: contain;
    display: block;
    margin-right: 20px;
}

/* Hide logo when widget is minimised (bubble state) */
#swifthare-ai-chat-widget.swifthare-ai-chat-minimized #swifthare-ai-branding-link {
    display: none;
}