/* ============================================================
   OME AI Chat Styles
   ============================================================ */

.ome-ai-chat-page {
    /* Ensure full-height layout */
}

.ome-ai-chat-page #page,
.ome-ai-chat-page .site-content,
.ome-ai-chat-page .elementor-section-wrap {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Container */
.ome-ai-chat {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-height: 100vh;
    background: linear-gradient(180deg, #f8f5f0 0%, #f0ece5 100%);
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Header */
.ome-ai-chat__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #ffffff;
    border-bottom: 1px solid #e8e4dc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    flex-shrink: 0;
    z-index: 10;
}

.ome-ai-chat__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b9a6d 0%, #a8b88a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.ome-ai-chat__info {
    flex: 1;
    min-width: 0;
}

.ome-ai-chat__title {
    font-size: 16px;
    font-weight: 600;
    color: #2c2c2c;
    margin: 0;
    line-height: 1.3;
}

.ome-ai-chat__subtitle {
    font-size: 13px;
    color: #8b8b8b;
    margin: 2px 0 0;
    line-height: 1.3;
}

.ome-ai-chat__status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #5a8a5a;
}

.ome-ai-chat__status::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #5a8a5a;
    animation: ome-ai-pulse 2s ease-in-out infinite;
}

@keyframes ome-ai-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

/* Messages Area */
.ome-ai-chat__messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

/* Message */
.ome-ai-message {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    max-width: 85%;
    animation: ome-ai-message-in 0.3s ease-out;
}

@keyframes ome-ai-message-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ome-ai-message--user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.ome-ai-message--bot {
    align-self: flex-start;
}

.ome-ai-message__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.ome-ai-message--bot .ome-ai-message__avatar {
    background: linear-gradient(135deg, #8b9a6d 0%, #a8b88a 100%);
}

.ome-ai-message--user .ome-ai-message__avatar {
    background: #e8e4dc;
}

.ome-ai-message__bubble {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
}

.ome-ai-message--bot .ome-ai-message__bubble {
    background: #ffffff;
    color: #2c2c2c;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.ome-ai-message--user .ome-ai-message__bubble {
    background: linear-gradient(135deg, #8b9a6d 0%, #a8b88a 100%);
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

/* Typing Indicator */
.ome-ai-typing .ome-ai-message__bubble {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ome-ai-typing__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #8b9a6d;
    animation: ome-ai-typing-bounce 1.4s ease-in-out infinite;
}

.ome-ai-typing__dot:nth-child(2) {
    animation-delay: 0.2s;
}

.ome-ai-typing__dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes ome-ai-typing-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}

/* Input Area */
.ome-ai-chat__input-area {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 12px 16px 16px;
    background: #ffffff;
    border-top: 1px solid #e8e4dc;
    flex-shrink: 0;
}

.ome-ai-chat__input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f5f3ef;
    border-radius: 24px;
    padding: 4px 4px 4px 16px;
    border: 1px solid transparent;
    transition: border-color 0.2s;
}

.ome-ai-chat__input-wrapper:focus-within {
    border-color: #8b9a6d;
    background: #ffffff;
}

.ome-ai-chat__input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 8px;
    font-size: 15px;
    line-height: 1.4;
    resize: none;
    outline: none;
    font-family: inherit;
    max-height: 120px;
    min-height: 24px;
}

.ome-ai-chat__input::placeholder {
    color: #aaa;
}

.ome-ai-chat__send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #8b9a6d 0%, #a8b88a 100%);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s, box-shadow 0.15s;
}

.ome-ai-chat__send:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(139, 154, 109, 0.3);
}

.ome-ai-chat__send:active {
    transform: scale(0.95);
}

/* Suggestion chips */
.ome-ai-chat__suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 20px 12px;
    flex-shrink: 0;
}

.ome-ai-suggestion {
    padding: 8px 14px;
    border-radius: 18px;
    border: 1px solid #d4d0c8;
    background: #ffffff;
    color: #5a5a5a;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.ome-ai-suggestion:hover {
    background: #8b9a6d;
    color: #fff;
    border-color: #8b9a6d;
}

/* Clear chat button */
.ome-ai-chat__clear {
    background: none;
    border: none;
    color: #aaa;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s;
}

.ome-ai-chat__clear:hover {
    color: #666;
    background: #f0f0f0;
}

/* Scrollbar */
.ome-ai-chat__messages::-webkit-scrollbar {
    width: 5px;
}

.ome-ai-chat__messages::-webkit-scrollbar-track {
    background: transparent;
}

.ome-ai-chat__messages::-webkit-scrollbar-thumb {
    background: #d4d0c8;
    border-radius: 3px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .ome-ai-message {
        max-width: 92%;
    }

    .ome-ai-chat__header {
        padding: 12px 16px;
    }

    .ome-ai-chat__messages {
        padding: 12px;
    }

    .ome-ai-chat__input-area {
        padding: 8px 12px 12px;
    }
}

/* Dark text support */
.ome-ai-message__bubble strong {
    font-weight: 600;
    color: inherit;
}

/* ============================================================
   Embedded Chat (Shortcode)
   ============================================================ */

.ome-ai-chat--embedded {
    height: 600px;
    max-height: 80vh;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    border: 1px solid #e8e4dc;
}

.ome-ai-chat--embedded .ome-ai-chat__header {
    padding: 12px 16px;
}

.ome-ai-chat--embedded .ome-ai-chat__title {
    font-size: 14px;
}

.ome-ai-chat--embedded .ome-ai-chat__subtitle {
    font-size: 12px;
}

.ome-ai-chat--embedded .ome-ai-chat__messages {
    padding: 12px;
}

.ome-ai-chat--embedded .ome-ai-chat__input-area {
    padding: 8px 12px 12px;
}

@media (max-width: 768px) {
    .ome-ai-chat--embedded {
        height: 70vh;
        max-height: 70vh;
        border-radius: 12px;
    }
}
.ome-ai-message__bubble strong {
    font-weight: 600;
    color: inherit;
}
