/* Manakin Chat Widget Styles - Modern & Animated */
:root {
    --mc-primary: #0073aa;
    --mc-secondary: #ffffff;
    --mc-text: #333333;
    --mc-bg: #f9f9f9;
    --mc-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    --mc-radius: 16px;
    --mc-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Floating Button */
#manakin-chat-widget-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--mc-primary), #005a87);
    border-radius: 50%;
    box-shadow: var(--mc-shadow);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--mc-transition);
    animation: mcFloat 3s ease-in-out infinite;
}

#manakin-chat-widget-button:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

#manakin-chat-widget-button svg {
    width: 30px;
    height: 30px;
    fill: white;
}

@keyframes mcFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* Chat Window */
.mc-chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: var(--mc-secondary);
    border-radius: var(--mc-radius);
    box-shadow: var(--mc-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: var(--mc-transition);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.mc-chat-window.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Header */
.mc-header {
    background: linear-gradient(135deg, var(--mc-primary), #005a87);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.mc-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.mc-close-btn,
.mc-back-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.mc-close-btn:hover,
.mc-back-btn:hover {
    opacity: 1;
}

.mc-back-btn {
    margin-right: 10px;
    font-size: 20px;
    display: none;
    /* Hidden by default */
}

/* Screens */
.mc-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.mc-screen.hidden {
    display: none;
}

/* Contact Method Screen */
.mc-contact-options {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
}

.mc-contact-btn {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 12px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.mc-contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.mc-contact-btn svg {
    width: 24px;
    height: 24px;
    margin-right: 15px;
    fill: white;
}

.mc-contact-btn .mc-arrow {
    margin-left: auto;
    margin-right: 0;
    opacity: 0.7;
}

/* Button Colors */
.mc-btn-ai {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.mc-btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.mc-btn-telegram {
    background: linear-gradient(135deg, #0088cc, #0077b5);
}

.mc-btn-viber {
    background: linear-gradient(135deg, #7360f2, #5936d5);
}

.mc-btn-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.mc-btn-phone {
    background: linear-gradient(135deg, #059669, #047857);
}

.mc-btn-email {
    background: linear-gradient(135deg, #4b5563, #374151);
}

.mc-btn-custom {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

/* Chat Area */
.mc-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: var(--mc-bg);
}

.mc-message-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 80%;
    animation: mcFadeIn 0.3s ease-out forwards;
}

.mc-message-wrapper.user {
    align-self: flex-end;
    align-items: flex-end;
}

.mc-message-wrapper.bot,
.mc-message-wrapper.agent {
    align-self: flex-start;
    align-items: flex-start;
}

.mc-sender-name {
    font-size: 11px;
    color: #888;
    margin-bottom: 4px;
    margin-left: 4px;
}

.mc-message-wrapper.user .mc-sender-name {
    margin-right: 4px;
    margin-left: 0;
}

.mc-message {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
}

.mc-message.user {
    background: var(--mc-primary);
    color: white;
    border-bottom-right-radius: 2px;
}

.mc-message.bot,
.mc-message.agent {
    background: white;
    color: var(--mc-text);
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

@keyframes mcFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Input Area */
.mc-input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

#mc-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 15px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s;
}

#mc-input:focus {
    border-color: var(--mc-primary);
}

#mc-send-btn {
    background: var(--mc-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

#mc-send-btn:hover {
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 480px) {
    .mc-chat-window {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
}