/* ===============================
   OneZoro AI Chat Widget (Dark Pro)
   =============================== */

/* Reset for widget only */
#oz-ai-btn,
#oz-ai-box,
#oz-ai-box * {
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Inline Link Styling (Replaced Button Style) */
.oz-link-text {
    color: #D32F2F; /* Red text color */
    font-weight: 600;
    text-decoration: underline; /* Keep underline so it's clearly a link */
    transition: color 0.2s ease;
    background: transparent;
    padding: 0;
    margin: 0;
    display: inline;
}

.oz-link-text:hover {
    color: #b71c1c; /* Slightly darker red on hover */
    text-decoration: none;
}

/* Floating Chat Button */
#oz-ai-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #D32F2F;
    color: #ffffff;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999998;
    font-size: 28px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#oz-ai-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

/* Main Chat Container */
#oz-ai-box {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 400px;
    height: 75vh;
    max-height: 650px;
    background: #1e1e24;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
    display: none;
    flex-direction: column;
    z-index: 9999999;
    overflow: hidden;
    border: 1px solid #333;
}

/* Header */
#oz-ai-header {
    background: #1e1e24;
    color: #ffffff;
    padding: 16px 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.oz-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Avatar & Status Dot Setup */
.oz-avatar-wrapper {
    position: relative;
    display: flex;
}

.bot-avatar {
    background: #2b2b30; /* Dark fallback background */
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Ensures image stays perfectly circular */
}

.bot-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Keeps logo professional and proportional */
}

.oz-online-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background-color: #00e676; /* Vibrant status green */
    border: 2px solid #1e1e24; /* Creates cutout effect against header */
    border-radius: 50%;
}

/* Header Text Styling */
.oz-header-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.oz-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.oz-subtitle {
    font-size: 12px;
    color: #a0a0a5;
    margin-top: 3px;
    font-weight: 400;
}

.oz-close-btn {
    cursor: pointer;
    font-size: 20px;
    color: #aaa;
    transition: color 0.2s ease;
}

.oz-close-btn:hover {
    color: #ffffff;
}

/* Messages Area */
#oz-ai-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #121212;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Custom Scrollbar */
#oz-ai-messages::-webkit-scrollbar {
    width: 6px;
}

#oz-ai-messages::-webkit-scrollbar-track {
    background: #121212;
}

#oz-ai-messages::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 10px;
}

#oz-ai-messages::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Message Layout */
.oz-msg-user {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.oz-msg-ai {
    display: flex;
    justify-content: flex-start;
    width: 100%;
}

.oz-msg-user span,
.oz-msg-ai span {
    padding: 12px 16px;
    border-radius: 20px;
    font-size: 15px;
    line-height: 1.5;
    max-width: 80%;
    word-wrap: break-word;
}

/* User Bubble */
.oz-msg-user span {
    background: #D32F2F;
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

/* AI Bubble */
.oz-msg-ai span {
    background: #2b2b30;
    color: #e0e0e0;
    border: 1px solid #3a3a40;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border-bottom-left-radius: 4px;
}

/* Footer */
#oz-ai-footer {
    padding: 15px 20px;
    background: #1e1e24;
    border-top: 1px solid #333;
}

.input-wrapper {
    display: flex;
    background: #2b2b30;
    border-radius: 30px;
    padding: 6px 10px;
    border: 1px solid #3a3a40;
    align-items: center;
    transition: border-color 0.3s ease;
}

.input-wrapper:focus-within {
    border-color: #D32F2F;
}

#oz-ai-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 12px;
    outline: none;
    font-size: 15px;
    color: #ffffff;
}

#oz-ai-input::placeholder {
    color: #888;
}

#oz-ai-send {
    width: 40px;
    height: 40px;
    background: #D32F2F;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease;
}

#oz-ai-send:hover {
    transform: scale(1.05);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    align-items: center;
    height: 20px;
}

.typing-indicator div {
    width: 6px;
    height: 6px;
    background: #aaa;
    border-radius: 50%;
    animation: oz-bounce 1.4s infinite ease-in-out both;
}

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

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

@keyframes oz-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #oz-ai-box {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
        border: none;
    }

    #oz-ai-btn {
        bottom: 15px;
        right: 15px;
        width: 60px;
        height: 60px;
    }
}