/* ==========================================================================
   SD CORE Friendly Website Chatbot
   ========================================================================== */
.sd-chatbot-root {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9999;
    font-family: Inter, Sora, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sd-chatbot-button {
    width: 64px;
    height: 64px;
    border: 0;
    border-radius: 22px;
    cursor: pointer;
    color: #ffffff;
    background: linear-gradient(135deg, #0d2d5f 0%, #06b6c9 100%);
    box-shadow: 0 18px 45px rgba(13, 45, 95, 0.28);
    display: grid;
    place-items: center;
    transition: transform .22s ease, box-shadow .22s ease;
}

.sd-chatbot-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 60px rgba(13, 45, 95, 0.36);
}

.sd-chatbot-button svg {
    width: 30px;
    height: 30px;
}

.sd-chatbot-pulse {
    position: absolute;
    right: -2px;
    top: -2px;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #20e3b2;
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 0 rgba(32, 227, 178, .55);
    animation: sdPulse 1.7s infinite;
}

@keyframes sdPulse {
    0% { box-shadow: 0 0 0 0 rgba(32, 227, 178, .55); }
    70% { box-shadow: 0 0 0 12px rgba(32, 227, 178, 0); }
    100% { box-shadow: 0 0 0 0 rgba(32, 227, 178, 0); }
}

.sd-chatbot-panel {
    position: absolute;
    right: 0;
    bottom: 82px;
    width: 390px;
    max-width: calc(100vw - 28px);
    height: min(650px, calc(100vh - 110px));
    background: #ffffff;
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: 28px;
    box-shadow: 0 28px 100px rgba(2, 11, 23, 0.26);
    overflow: hidden;
    display: none;
    grid-template-rows: auto 1fr auto;
}

.sd-chatbot-root.sd-open .sd-chatbot-panel {
    display: grid;
    animation: sdChatIn .22s ease both;
}

@keyframes sdChatIn {
    from { opacity: 0; transform: translateY(14px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.sd-chatbot-header {
    position: relative;
    padding: 18px 18px 16px;
    color: #ffffff;
    background:
        radial-gradient(circle at 20% 10%, rgba(0, 212, 255, .28), transparent 35%),
        linear-gradient(135deg, #061528 0%, #0d2d5f 55%, #07a7b6 100%);
}

.sd-chatbot-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sd-chatbot-avatar {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    flex: 0 0 auto;
}

.sd-chatbot-avatar img {
    width: 34px;
    height: auto;
    display: block;
}

.sd-chatbot-title {
    min-width: 0;
    flex: 1 1 auto;
}

.sd-chatbot-title strong {
    display: block;
    font-size: 16px;
    line-height: 1.2;
}

.sd-chatbot-title span {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 12px;
    color: rgba(255,255,255,.78);
}

.sd-chatbot-title span::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #20e3b2;
}

.sd-chatbot-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(255,255,255,.10);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.sd-chatbot-intro {
    margin: 14px 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: rgba(255,255,255,.82);
}

.sd-chatbot-messages {
    padding: 18px;
    background:
        radial-gradient(circle at 10% 0%, rgba(7, 184, 199, .08), transparent 28%),
        linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    overflow-y: auto;
    scroll-behavior: smooth;
}

.sd-chat-message {
    display: flex;
    margin-bottom: 12px;
}

.sd-chat-message.sd-bot {
    justify-content: flex-start;
}

.sd-chat-message.sd-user {
    justify-content: flex-end;
}

.sd-chat-bubble {
    max-width: 86%;
    border-radius: 18px;
    padding: 12px 14px;
    font-size: 13.5px;
    line-height: 1.58;
    white-space: pre-line;
    word-break: break-word;
}

.sd-bot .sd-chat-bubble {
    color: #26384d;
    background: #ffffff;
    border: 1px solid rgba(203, 213, 225, .9);
    border-top-left-radius: 8px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .06);
}

.sd-user .sd-chat-bubble {
    color: #ffffff;
    background: linear-gradient(135deg, #0d2d5f, #07a7b6);
    border-top-right-radius: 8px;
    box-shadow: 0 12px 26px rgba(13, 45, 95, .18);
}

.sd-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 14px;
}

.sd-quick-replies button {
    border: 1px solid rgba(7, 167, 182, .28);
    border-radius: 999px;
    background: #ffffff;
    color: #0d2d5f;
    padding: 8px 11px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.sd-quick-replies button:hover {
    transform: translateY(-1px);
    background: #e8fbff;
    border-color: rgba(7, 167, 182, .44);
}

.sd-chatbot-footer {
    padding: 14px;
    border-top: 1px solid rgba(203, 213, 225, 0.8);
    background: #ffffff;
}

.sd-chatbot-form {
    display: grid;
    grid-template-columns: 1fr 46px;
    gap: 10px;
    align-items: center;
}

.sd-chatbot-input {
    min-height: 46px;
    border: 1px solid rgba(203, 213, 225, .95);
    border-radius: 16px;
    padding: 0 14px;
    outline: none;
    color: #061528;
    background: #f8fbff;
    font-size: 14px;
}

.sd-chatbot-input:focus {
    border-color: rgba(7, 167, 182, .58);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(7, 167, 182, .10);
}

.sd-chatbot-send {
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 16px;
    cursor: pointer;
    color: #ffffff;
    background: linear-gradient(135deg, #0d2d5f, #07a7b6);
    display: grid;
    place-items: center;
}

.sd-chatbot-send svg {
    width: 20px;
    height: 20px;
}

.sd-chatbot-small {
    margin-top: 9px;
    color: #64748b;
    font-size: 11px;
    line-height: 1.4;
    text-align: center;
}

.sd-typing {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.sd-typing i {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #06b6c9;
    animation: sdTyping 1s infinite ease-in-out;
}

.sd-typing i:nth-child(2) { animation-delay: .15s; }
.sd-typing i:nth-child(3) { animation-delay: .3s; }

@keyframes sdTyping {
    0%, 80%, 100% { transform: scale(.75); opacity: .45; }
    40% { transform: scale(1); opacity: 1; }
}

@media (max-width: 720px) {
    .sd-chatbot-root {
        right: 16px;
        bottom: 16px;
    }

    .sd-chatbot-button {
        width: 58px;
        height: 58px;
        border-radius: 20px;
    }

    .sd-chatbot-panel {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 84px;
        width: auto;
        max-width: none;
        height: min(620px, calc(100vh - 116px));
        border-radius: 24px;
    }

    .sd-chatbot-header {
        padding: 16px;
    }

    .sd-chatbot-messages {
        padding: 15px;
    }

    .sd-chat-bubble {
        max-width: 92%;
        font-size: 13px;
    }
}

@media (max-width: 420px) {
    .sd-chatbot-panel {
        left: 8px;
        right: 8px;
        bottom: 78px;
        height: min(590px, calc(100vh - 100px));
        border-radius: 22px;
    }

    .sd-chatbot-title strong {
        font-size: 15px;
    }

    .sd-chatbot-intro {
        font-size: 12px;
    }

    .sd-chatbot-footer {
        padding: 12px;
    }
}


/* V35 WhatsApp contact inside chatbot */
.sd-chatbot-wa{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:7px 10px;
    border-radius:999px;
    background:#20c997;
    color:#052b20;
    font-size:11px;
    font-weight:800;
    text-decoration:none;
    border:1px solid rgba(255,255,255,.35);
    margin-left:auto;
}
.sd-chatbot-wa:hover{filter:brightness(.96);}
.sd-quick-replies a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:1px solid rgba(0,184,216,.25);
    background:#e8fbff;
    color:#064e5f;
    border-radius:999px;
    padding:8px 12px;
    font-size:12px;
    font-weight:800;
    text-decoration:none;
}
