/* ═══════════════════════════════════════
   MAVYA CHATBOT – TechBott India
   ═══════════════════════════════════════ */

/* Toggle Button */
#mavya-toggle {
    position: fixed;
    bottom: 225px;
    right: 22px;
    z-index: 99999;
}

.mavya-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ea5100 0%, #ef803a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(234, 81, 0, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.mavya-toggle-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 30px rgba(234, 81, 0, 0.55);
}

#mavya-toggle.mavya-active .mavya-toggle-btn {
    background: linear-gradient(135deg, #c44500 0%, #ea5100 100%);
}

.mavya-pulse {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 16px;
    height: 16px;
    background: #ea5100;
    border-radius: 50%;
    border: 2px solid #fff;
    animation: mavyaPulse 2s infinite;
}

#mavya-toggle.mavya-active .mavya-pulse {
    display: none;
}

@keyframes mavyaPulse {
    0% { box-shadow: 0 0 0 0 rgba(234, 81, 0, 0.6); }
    70% { box-shadow: 0 0 0 10px rgba(234, 81, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(234, 81, 0, 0); }
}

/* Chat Window */
#mavya-chat {
    position: fixed;
    bottom: 295px;
    right: 28px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 520px;
    max-height: calc(100vh - 140px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mavya-chat.mavya-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Header */
.mavya-header {
    background: linear-gradient(135deg, #ea5100 0%, #ef803a 100%);
    color: #fff;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.mavya-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mavya-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 1px;
}

.mavya-name {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.mavya-status {
    font-size: 11px;
    opacity: 0.85;
    display: flex;
    align-items: center;
    gap: 5px;
}

.mavya-status-dot {
    width: 7px;
    height: 7px;
    background: #4cff6e;
    border-radius: 50%;
    display: inline-block;
    animation: mavyaDotPulse 1.5s infinite;
}

@keyframes mavyaDotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.mavya-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.mavya-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Body / Messages */
.mavya-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f4f6fb;
    scroll-behavior: smooth;
}

.mavya-body::-webkit-scrollbar {
    width: 5px;
}

.mavya-body::-webkit-scrollbar-track {
    background: transparent;
}

.mavya-body::-webkit-scrollbar-thumb {
    background: #c5cee0;
    border-radius: 10px;
}

/* Welcome */
.mavya-welcome {
    text-align: center;
    padding: 20px 10px 10px;
}

.mavya-welcome-avatar {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #ea5100, #ef803a);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 24px;
    margin: 0 auto 12px;
}

.mavya-welcome h4 {
    font-size: 17px;
    font-weight: 700;
    color: #ea5100;
    margin: 0 0 6px;
}

.mavya-welcome p {
    font-size: 13px;
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
}

/* Quick Buttons */
.mavya-quick-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 8px 0 12px;
}

.mavya-quick-btn {
    background: #fff;
    border: 1.5px solid #ea5100;
    color: #ea5100;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.mavya-quick-btn:hover {
    background: #ea5100;
    color: #fff;
}

/* Message Bubbles */
.mavya-msg {
    display: flex;
    margin-bottom: 12px;
    animation: mavyaFadeIn 0.3s ease;
}

@keyframes mavyaFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.mavya-msg-user {
    justify-content: flex-end;
}

.mavya-msg-bot {
    justify-content: flex-start;
}

.mavya-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.6;
    word-break: break-word;
}

.mavya-msg-user .mavya-bubble {
    background: linear-gradient(135deg, #ea5100, #ef803a);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.mavya-msg-bot .mavya-bubble {
    background: #fff;
    color: #1a1a2e;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.mavya-bubble strong {
    font-weight: 700;
}

.mavya-bubble .mavya-link {
    color: #ea5100;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed #ea5100;
    transition: color 0.2s;
}

.mavya-bubble .mavya-link:hover {
    color: #c44500;
    border-color: #c44500;
}

.mavya-list {
    list-style: none;
    padding: 0;
    margin: 6px 0;
}

.mavya-list li {
    padding: 2px 0 2px 8px;
    position: relative;
}

.mavya-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ea5100;
}

.mavya-list li.mavya-check::before {
    content: none;
}

/* Typing Indicator */
.mavya-typing {
    display: flex;
    gap: 4px;
    padding: 12px 18px !important;
    align-items: center;
}

.mavya-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #aab4c7;
    animation: mavyaBounce 1.2s infinite;
}

.mavya-typing span:nth-child(2) { animation-delay: 0.2s; }
.mavya-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes mavyaBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

/* Footer / Input */
.mavya-footer {
    padding: 12px 14px;
    background: #fff;
    border-top: 1px solid #eef1f7;
    flex-shrink: 0;
}

#mavya-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

#mavya-input {
    flex: 1;
    border: 1.5px solid #dde3ef;
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 13.5px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

#mavya-input:focus {
    border-color: #ea5100;
}

#mavya-input::placeholder {
    color: #a8b2c1;
}

#mavya-send {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #ea5100, #ef803a);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

#mavya-send:hover {
    transform: scale(1.08);
    box-shadow: 0 3px 12px rgba(234, 81, 0, 0.35);
}

/* ─── Responsive ─── */
@media (max-width: 480px) {
    #mavya-chat {
        right: 10px;
        bottom: 80px;
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        border-radius: 12px;
    }

    #mavya-toggle {
        bottom: 16px;
        right: 16px;
    }

    .mavya-toggle-btn {
        width: 52px;
        height: 52px;
    }
}
