/* Ask Gabriel - Chat Widget Styles */

.gabriel-chat-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    margin: 20px 0;
}

.gabriel-chat-container {
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background: #fff;
    min-height: 300px;
    max-height: 700px;
}

/* Header */
.gabriel-header {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    color: #fff;
    gap: 12px;
    flex-shrink: 0;
}

.gabriel-header-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gabriel-header-icon svg {
    width: 18px;
    height: 18px;
    color: #fff;
}

.gabriel-header-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gabriel-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

.gabriel-subtitle {
    font-size: 11px;
    opacity: 0.85;
    line-height: 1.2;
    margin-top: 2px;
}

.gabriel-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    opacity: 0.9;
}

.gabriel-status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
    animation: gabriel-pulse 2s infinite;
}

@keyframes gabriel-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Messages Area */
.gabriel-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f9f9f9;
    scroll-behavior: smooth;
}

.gabriel-messages::-webkit-scrollbar {
    width: 4px;
}

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

.gabriel-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

/* Message Bubbles */
.gabriel-message {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    animation: gabriel-fade-in 0.25s ease;
}

@keyframes gabriel-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.gabriel-message-assistant {
    flex-direction: row;
}

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

.gabriel-message-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    background: #e8e0d4;
    color: #7B3F00;
    font-weight: 700;
}

.gabriel-message-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.gabriel-message-assistant .gabriel-message-bubble {
    background: #fff;
    color: #333;
    border: 1px solid #e8e8e8;
    border-bottom-left-radius: 4px;
}

.gabriel-message-user .gabriel-message-bubble {
    color: #fff;
    border-bottom-right-radius: 4px;
}

/* Typing Indicator */
.gabriel-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    width: fit-content;
}

.gabriel-typing span {
    width: 7px;
    height: 7px;
    background: #999;
    border-radius: 50%;
    animation: gabriel-bounce 1.4s infinite ease-in-out;
}

.gabriel-typing span:nth-child(2) { animation-delay: 0.16s; }
.gabriel-typing span:nth-child(3) { animation-delay: 0.32s; }

@keyframes gabriel-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Input Area */
.gabriel-input-area {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid #e8e8e8;
    background: #fff;
    flex-shrink: 0;
}

.gabriel-input {
    flex: 1;
    border: 1px solid #d0d0d0;
    border-radius: 22px;
    padding: 10px 16px;
    font-size: 14px;
    line-height: 1.4;
    resize: none;
    outline: none;
    font-family: inherit;
    background: #f5f5f5;
    max-height: 100px;
    overflow-y: auto;
    transition: border-color 0.2s;
    color: #333;
}

.gabriel-input:focus {
    border-color: #aaa;
    background: #fff;
}

.gabriel-input::placeholder {
    color: #aaa;
}

.gabriel-send-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s, transform 0.1s;
}

.gabriel-send-btn:hover {
    opacity: 0.88;
    transform: scale(1.05);
}

.gabriel-send-btn:active {
    transform: scale(0.95);
}

.gabriel-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.gabriel-send-btn svg {
    width: 18px;
    height: 18px;
    stroke: #fff;
}

/* Footer */
.gabriel-footer {
    text-align: center;
    font-size: 11px;
    color: #aaa;
    padding: 6px 14px 8px;
    border-top: 1px solid #f0f0f0;
    background: #fff;
    flex-shrink: 0;
}

.gabriel-footer a {
    text-decoration: none;
    font-weight: 500;
}

.gabriel-footer a:hover {
    text-decoration: underline;
}

/* Error message */
.gabriel-error-msg {
    background: #fff3f3;
    border: 1px solid #ffcccc;
    color: #c00;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 600px) {
    .gabriel-message-bubble {
        max-width: 90%;
        font-size: 13px;
    }

    .gabriel-status {
        display: none;
    }
}
