/* Markinity Chatbot CSS - Modern Design */
.markinity-chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 1000;
    width: 360px;
    max-width: 90vw;
    height: 500px;
    max-height: 70vh;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
    border: 1px solid rgba(30, 87, 153, 0.2);
}

.markinity-chatbot-container.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.markinity-chatbot-header {
    background: linear-gradient(135deg, #1e5799 0%, #2989d8 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.markinity-chatbot-header h3 {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 16px;
}

.markinity-chatbot-language-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.markinity-chatbot-language-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.markinity-chatbot-language-btn.active {
    background: #fbbc05;
    color: #333;
}

.markinity-chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.markinity-chatbot-close:hover {
    transform: scale(1.1);
    color: #fbbc05;
}

.markinity-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: #f9f9f9;
}

.markinity-chatbot-message {
    max-width: 80%;
    padding: 12px 15px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    font-family: 'Poppins', sans-serif;
}

.markinity-chatbot-message.bot {
    align-self: flex-start;
    background-color: #e6f2ff;
    border-bottom-left-radius: 5px;
    color: #333;
}

.markinity-chatbot-message.user {
    align-self: flex-end;
    background-color: #1e5799;
    color: white;
    border-bottom-right-radius: 5px;
}

.markinity-chatbot-message.bot::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #e6f2ff;
    bottom: -6px;
    left: 10px;
}

.markinity-chatbot-message.user::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #1e5799;
    bottom: -6px;
    right: 10px;
}

.markinity-chatbot-input-area {
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.markinity-chatbot-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 25px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border 0.2s ease;
}

.markinity-chatbot-input:focus {
    border-color: #1e5799;
}

.markinity-chatbot-send {
    background-color: #fbbc05;
    color: #333;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.markinity-chatbot-send:hover {
    transform: scale(1.05);
    background-color: #fad052;
}

.markinity-chatbot-send i {
    margin-left: 2px;
}

.markinity-chatbot-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1e5799 0%, #2989d8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.markinity-chatbot-button:hover {
    transform: scale(1.05);
}

.markinity-chatbot-button i {
    color: white;
    font-size: 24px;
}

.markinity-chatbot-button.active {
    background: #fbbc05;
}

.markinity-chatbot-button.active i {
    color: #333;
}

/* Position chatbot in place of voice assistant */
.markinity-chatbot-button {
    right: 30px;
}

.markinity-chatbot-container {
    right: 30px;
}

/* Typing indicator */
.markinity-typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background-color: #e6f2ff;
    border-radius: 15px;
    width: fit-content;
    margin-top: 5px;
    align-self: flex-start;
}

.markinity-typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #1e5799;
    display: inline-block;
    animation: typing 1s infinite ease-in-out;
}

.markinity-typing-indicator span:nth-child(1) {
    animation-delay: 0.1s;
}

.markinity-typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.markinity-typing-indicator span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes typing {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

/* Urdu text support */
.urdu-text {
    font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif;
    direction: rtl;
    text-align: right;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .markinity-chatbot-container {
        width: 85vw;
        height: 70vh;
        bottom: 80px;
        right: 20px;
    }
    
    .markinity-chatbot-button {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 80px; /* Move over for voice assistant */
    }
    
    .markinity-chatbot-button i {
        font-size: 20px;
    }
}
