/* GoodVibesOnly Chat Widget Frontend Styles */

.gvo-chat-widget {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.gvo-chat-widget[data-position="bottom-right"] {
    bottom: 20px;
    right: 20px;
}

.gvo-chat-widget[data-position="bottom-left"] {
    bottom: 20px;
    left: 20px;
}

.gvo-chat-widget[data-position="top-right"] {
    top: 20px;
    right: 20px;
}

.gvo-chat-widget[data-position="top-left"] {
    top: 20px;
    left: 20px;
}

.gvo-chat-bubble {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gvo-header-bg, #18181b);
    color: var(--gvo-header-text, #ffffff);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
}

.gvo-chat-bubble:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.gvo-chat-window {
    width: var(--gvo-chat-width, 400px);
    height: var(--gvo-chat-height, 600px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: gvo-slideIn 0.3s ease-out;
}

@keyframes gvo-slideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.gvo-chat-header {
    background: var(--gvo-header-bg, #18181b);
    color: var(--gvo-header-text, #ffffff);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px 12px 0 0;
}

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

.gvo-chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

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

.gvo-chat-header-info {
    flex: 1;
}

.gvo-chat-bot-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.gvo-chat-bot-status {
    font-size: 13px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gvo-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: gvo-pulse 2s infinite;
}

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

.gvo-chat-close-btn {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.gvo-chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.gvo-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gvo-chat-message {
    display: flex;
    gap: 10px;
    animation: gvo-messageIn 0.3s ease-out;
}

@keyframes gvo-messageIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.gvo-message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: var(--gvo-border-radius, 12px);
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.gvo-bot-message .gvo-message-bubble {
    background: var(--gvo-bot-bubble, #f4f4f5);
    color: var(--gvo-bot-text, #18181b);
    border-bottom-left-radius: 4px;
}

.gvo-user-message .gvo-message-bubble {
    background: var(--gvo-user-bubble, #18181b);
    color: var(--gvo-user-text, #ffffff);
    border-bottom-right-radius: 4px;
}

.gvo-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: var(--gvo-bot-bubble, #f4f4f5);
    border-radius: var(--gvo-border-radius, 12px);
    border-bottom-left-radius: 4px;
    width: fit-content;
}

.gvo-typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #71717a;
    animation: gvo-typing 1.4s infinite;
}

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

.gvo-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

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

.gvo-chat-input-container {
    padding: 16px;
    background: white;
    border-top: 1px solid #e4e4e7;
    display: flex;
    gap: 8px;
}

.gvo-chat-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.gvo-chat-input:focus {
    border-color: var(--gvo-header-bg, #18181b);
}

.gvo-chat-send-btn {
    width: 44px;
    height: 44px;
    background: var(--gvo-header-bg, #18181b);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.gvo-chat-send-btn:hover:not(:disabled) {
    opacity: 0.9;
}

.gvo-chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .gvo-chat-window {
        width: calc(100vw - 40px) !important;
        height: calc(100vh - 100px) !important;
        max-width: 400px;
    }
    
    .gvo-chat-widget[data-position="bottom-right"],
    .gvo-chat-widget[data-position="bottom-left"] {
        bottom: 10px;
    }
    
    .gvo-chat-widget[data-position="bottom-right"] {
        right: 10px;
    }
    
    .gvo-chat-widget[data-position="bottom-left"] {
        left: 10px;
    }
}
