/* Ajambary Chatbot Stylesheet */

:root {
    --ajambary-skin: #1ebfc1;
    --ajambary-skin-hover: #179ea0;
    --ajambary-dark: #17171d;
    --ajambary-grey: #f3f0ef;
    --ajambary-light-teal: rgba(30, 191, 193, 0.08);
    --ajambary-white: #ffffff;
    --ajambary-text-dark: #222222;
    --ajambary-text-muted: #666666;
    --ajambary-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
    --ajambary-font: 'Epilogue', 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Chatbot Wrapper */
.ajambary-chatbot-widget {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 999999;
    font-family: var(--ajambary-font);
}

/* Launcher Button */
.ajambary-chatbot-launcher {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ajambary-skin), var(--ajambary-skin-hover));
    color: var(--ajambary-white);
    border: none;
    cursor: pointer;
    box-shadow: var(--ajambary-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    outline: none;
    padding: 0;
}

.ajambary-chatbot-launcher:hover {
    transform: scale(1.08) rotate(5deg);
    box-shadow: 0 12px 35px rgba(30, 191, 193, 0.4);
}

.ajambary-chatbot-launcher svg {
    width: 28px;
    height: 28px;
    transition: transform 0.3s ease;
}

.ajambary-chatbot-launcher:hover svg {
    transform: scale(1.1);
}

/* Badge Alert */
.ajambary-launcher-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #ff3f35;
    color: var(--ajambary-white);
    font-size: 11px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--ajambary-white);
    animation: ajambary-bounce 2s infinite;
}

/* Hidden Utility */
.ajambary-hidden {
    display: none !important;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
}

/* Chat Window */
.ajambary-chatbot-window {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 380px;
    height: 600px;
    max-height: calc(100vh - 120px);
    background: var(--ajambary-white);
    border-radius: 16px;
    box-shadow: var(--ajambary-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 1;
    transform: translateY(0) scale(1);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Header styling */
.ajambary-chat-header {
    background: linear-gradient(135deg, var(--ajambary-skin), var(--ajambary-skin-hover));
    color: var(--ajambary-white);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.ajambary-bot-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ajambary-bot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ajambary-bot-avatar svg {
    color: var(--ajambary-white);
}

.ajambary-bot-status-dot {
    width: 10px;
    height: 10px;
    background: #00d084;
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    right: 0;
    border: 2px solid var(--ajambary-skin);
    animation: ajambary-pulse 2s infinite;
}

.ajambary-bot-details {
    display: flex;
    flex-direction: column;
}

.ajambary-bot-details h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--ajambary-white);
    line-height: 1.2;
}

.ajambary-bot-status-text {
    font-size: 11px;
    opacity: 0.9;
    font-weight: 300;
}

.ajambary-chatbot-close {
    background: transparent;
    border: none;
    color: var(--ajambary-white);
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ajambary-chatbot-close:hover {
    opacity: 1;
}

/* Chat Messages Area */
.ajambary-chat-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
.ajambary-chat-messages::-webkit-scrollbar {
    width: 6px;
}
.ajambary-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}
.ajambary-chat-messages::-webkit-scrollbar-thumb {
    background: #dddddd;
    border-radius: 3px;
}
.ajambary-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #cccccc;
}

/* Message Bubble Styles */
.ajambary-message {
    max-width: 85%;
    display: flex;
    flex-direction: column;
    animation: ajambary-fade-in 0.3s ease forwards;
}

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

.ajambary-message.user {
    align-self: flex-end;
}

.ajambary-message-content {
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.45;
}

.bot .ajambary-message-content {
    background: var(--ajambary-white);
    color: var(--ajambary-text-dark);
    border-radius: 14px 14px 14px 2px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.user .ajambary-message-content {
    background: var(--ajambary-skin);
    color: var(--ajambary-white);
    border-radius: 14px 14px 2px 14px;
    box-shadow: 0 2px 6px rgba(30, 191, 193, 0.15);
}

/* Typing Indicator */
.ajambary-typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: var(--ajambary-white);
    border-radius: 14px 14px 14px 2px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    align-self: flex-start;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
}

.ajambary-typing-indicator span {
    width: 6px;
    height: 6px;
    background: #bbb;
    border-radius: 50%;
    animation: ajambary-typing 1.4s infinite ease-in-out both;
}

.ajambary-typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.ajambary-typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

/* Interactive options list */
.ajambary-options-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    animation: ajambary-fade-in 0.4s ease forwards;
    max-width: 100%;
}

.ajambary-option-btn {
    background: var(--ajambary-white);
    color: var(--ajambary-skin);
    border: 1.5px solid var(--ajambary-skin);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    text-align: left;
}

.ajambary-option-btn:hover {
    background: var(--ajambary-skin);
    color: var(--ajambary-white);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(30, 191, 193, 0.2);
}

/* Persistent Bottom Quick Action Bar */
.ajambary-chat-persistent-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 10px 15px;
    background: #f9f9f9;
    border-top: 1px solid #eeeeee;
}

.ajambary-cta-btn {
    background: var(--ajambary-white);
    color: var(--ajambary-dark);
    border: 1px solid #e0e0e0;
    padding: 8px 5px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ajambary-cta-btn:hover {
    background: var(--ajambary-dark);
    color: var(--ajambary-white);
    border-color: var(--ajambary-dark);
}

/* Text Input container at the very bottom */
.ajambary-chat-input-container {
    display: flex;
    align-items: center;
    border-top: 1px solid #eeeeee;
    padding: 10px 15px;
    background: var(--ajambary-white);
}

.ajambary-chat-input-container input {
    flex-grow: 1;
    border: none;
    padding: 8px 12px;
    font-size: 14px;
    outline: none;
    color: var(--ajambary-text-dark);
    background: transparent;
}

.ajambary-chat-input-container button {
    background: transparent;
    border: none;
    color: var(--ajambary-skin);
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, color 0.2s ease;
}

.ajambary-chat-input-container button:hover {
    color: var(--ajambary-skin-hover);
    transform: scale(1.1);
}

/* Hidden elements class */
.ajambary-chat-input-container.disabled {
    display: none;
}

/* Animations Definitions */
@keyframes ajambary-bounce {
    0%, 20%, 53%, 80%, 100% { transform: translateY(0); }
    40%, 43% { transform: translateY(-8px); }
    70% { transform: translateY(-4px); }
}

@keyframes ajambary-pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 208, 84, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(0, 208, 84, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 208, 84, 0); }
}

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

@keyframes ajambary-typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

/* Mobile Responsiveness */
@media screen and (max-width: 480px) {
    .ajambary-chatbot-widget {
        bottom: 15px;
        right: 15px;
    }
    
    .ajambary-chatbot-window {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        z-index: 9999999;
    }
    
    .ajambary-chatbot-launcher {
        width: 50px;
        height: 50px;
    }
}
