/* Elegant & Integrated Chatbot Design */
.mc-chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Archivo', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.mc-chat-button {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #68edcb, #3bf243);
    border-radius: 12px;
    /* Slightly sharp but modern */
    box-shadow: 0 8px 32px rgba(104, 237, 203, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    color: #0d1f2d;
    position: relative;
    overflow: hidden;
}

.mc-chat-button:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 12px 40px rgba(104, 237, 203, 0.4);
}

.mc-chat-button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255, 255, 255, 0.2), transparent);
    pointer-events: none;
}

.mc-chat-button svg {
    width: 30px;
    height: 30px;
    z-index: 1;
}

.mc-chat-window {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 380px;
    height: 520px;
    max-height: calc(100vh - 120px);
    background: rgba(13, 31, 45, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    /* Consistent sharp-modern look */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(147, 250, 228, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Handle GSAP transitions by removing native transitions when active if needed, 
   but for now we just remove the static transform which conflicts with GSAP */
.mc-chat-window.active {
    opacity: 1;
    pointer-events: all;
}

.mc-chat-header {
    background: linear-gradient(to right, #175661, #0d1f2d);
    padding: 20px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(147, 250, 228, 0.1);
}

.mc-chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mc-chat-avatar {
    width: 40px;
    height: 40px;
    background: rgba(104, 237, 203, 0.1);
    border: 1px solid rgba(104, 237, 203, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #68edcb;
}

.mc-chat-header-text h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.mc-chat-header-text span {
    font-size: 11px;
    color: #93fae4;
    opacity: 0.8;
}

.mc-chat-close {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.mc-chat-close:hover {
    background: rgba(255, 0, 0, 0.2);
    color: #ff8e8e;
}

.mc-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: radial-gradient(circle at top right, rgba(104, 237, 203, 0.03), transparent);
    scroll-behavior: smooth;
}

.mc-chat-typing {
    padding: 8px 20px;
    font-size: 12px;
    color: #93fae4;
    font-style: italic;
    background: rgba(13, 31, 45, 0.8);
    border-top: 1px solid rgba(147, 250, 228, 0.05);
    opacity: 0.8;
}

.mc-message {
    max-width: 85%;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    animation: slideIn 0.3s ease-out forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mc-message.assistant {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
    align-self: flex-start;
    border-radius: 0 12px 12px 12px;
}

.mc-message.user {
    background: linear-gradient(135deg, #175661, #006b82);
    color: white;
    align-self: flex-end;
    border-radius: 12px 12px 0 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mc-chat-input-area {
    padding: 15px;
    background: rgba(13, 31, 45, 0.5);
    border-top: 1px solid rgba(147, 250, 228, 0.1);
    display: flex;
    gap: 10px;
}

.mc-chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 8px;
    color: white;
    outline: none;
    font-size: 14px;
    transition: border 0.2s;
}

.mc-chat-input:focus {
    border-color: #68edcb;
}

.mc-chat-send {
    background: #68edcb;
    border: none;
    color: #0d1f2d;
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(104, 237, 203, 0.2);
}

.mc-chat-send:hover {
    transform: scale(1.1) rotate(-5deg);
    background: #3bf243;
    box-shadow: 0 6px 16px rgba(104, 237, 203, 0.4);
}

.mc-chat-send svg {
    width: 20px;
    height: 20px;
    transform: translateX(1px) translateY(-1px);
}

.mc-chat-button.opened {
    background: #175661;
}

.mc-chat-button.opened svg {
    transform: rotate(90deg) scale(0.8);
    opacity: 0.5;
}

/* Custom Scrollbar */
.mc-chat-messages::-webkit-scrollbar {
    width: 4px;
}

.mc-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.mc-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(104, 237, 203, 0.2);
    border-radius: 10px;
}

/* Action Button Inside Chat */
.mc-cta-button {
    display: inline-block;
    margin-top: 5px;
    padding: 10px 18px;
    background: linear-gradient(90deg, #10b981, #3bf243);
    color: #0d1f2d;
    font-weight: 700;
    text-decoration: none;
    border: none;
    border-radius: 12px;
    font-size: 13px;
    cursor: pointer;
    width: fit-content;
    align-self: flex-start;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease-out forwards;
}

.mc-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
    opacity: 1;
}

/* Responsive */
@media (max-width: 480px) {
    .mc-chat-window {
        width: 100vw;
        height: 100vh;
        max-height: none;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }

    .mc-chat-widget {
        bottom: 20px;
        right: 20px;
    }
}