.landing-chatbot {
    --chatbot-violet: #6557ef;
    --chatbot-violet-dark: #4334bb;
    --chatbot-ink: #17213a;
    --chatbot-muted: #6b7890;
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1200;
    font-family: inherit;
}

.landing-chatbot-launcher {
    position: relative;
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    border: 0;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(145deg, var(--chatbot-violet), var(--chatbot-violet-dark));
    box-shadow: 0 16px 36px rgba(67, 52, 187, .3), 0 0 0 6px rgba(101, 87, 239, .1);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.landing-chatbot-launcher:hover,
.landing-chatbot-launcher:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 20px 42px rgba(67, 52, 187, .38), 0 0 0 8px rgba(101, 87, 239, .14);
}

.landing-chatbot-launcher i { font-size: 1.55rem; }

.landing-chatbot-launcher::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 3px;
    width: 11px;
    height: 11px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #25c69a;
}

.landing-chatbot-panel {
    position: absolute;
    right: 0;
    bottom: 76px;
    display: flex;
    flex-direction: column;
    width: min(390px, calc(100vw - 28px));
    max-height: min(620px, calc(100vh - 112px));
    overflow: hidden;
    border: 1px solid rgba(125, 143, 187, .22);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(22, 31, 57, .22), 0 5px 18px rgba(22, 31, 57, .08);
    animation: landing-chatbot-in .2s ease-out;
}

.landing-chatbot-panel[hidden] { display: none; }

.landing-chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 16px;
    color: #fff;
    background: linear-gradient(140deg, #1a2440 0%, #252e58 58%, #4a3bc4 140%);
}

.landing-chatbot-identity { display: flex; align-items: center; gap: 11px; min-width: 0; }

.landing-chatbot-avatar {
    display: grid;
    flex: 0 0 38px;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 13px;
    color: #dcd8ff;
    background: rgba(139, 128, 255, .2);
    font-size: 1.1rem;
}

.landing-chatbot-title { margin: 0; font-size: .98rem; font-weight: 750; letter-spacing: -.01em; }
.landing-chatbot-subtitle { margin: 3px 0 0; color: rgba(255,255,255,.68); font-size: .71rem; }

.landing-chatbot-close {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 10px;
    color: rgba(255,255,255,.76);
    background: transparent;
    cursor: pointer;
}

.landing-chatbot-close:hover,
.landing-chatbot-close:focus-visible { color: #fff; background: rgba(255,255,255,.1); }

.landing-chatbot-messages {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 12px;
    min-height: 220px;
    padding: 18px 16px 12px;
    overflow-y: auto;
    background: linear-gradient(180deg, #fbfcff 0%, #f5f7fc 100%);
}

.landing-chatbot-message { display: flex; max-width: 89%; animation: landing-chatbot-message-in .18s ease-out; }
.landing-chatbot-message.user { align-self: flex-end; }

.landing-chatbot-bubble {
    padding: 11px 13px;
    border: 1px solid #e3e8f2;
    border-radius: 15px 15px 15px 5px;
    color: var(--chatbot-ink);
    background: #fff;
    font-size: .82rem;
    line-height: 1.52;
}

.landing-chatbot-message.user .landing-chatbot-bubble {
    border: 0;
    border-radius: 15px 15px 5px 15px;
    color: #fff;
    background: var(--chatbot-violet);
}

.landing-chatbot-bubble p { margin: 0; }
.landing-chatbot-bubble p + p { margin-top: 7px; }

.landing-chatbot-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 7px 10px;
    border: 1px solid rgba(101,87,239,.22);
    border-radius: 9px;
    color: var(--chatbot-violet-dark);
    background: #f1efff;
    font-size: .75rem;
    font-weight: 700;
    text-decoration: none;
}

.landing-chatbot-link:hover { background: #e6e2ff; }

.landing-chatbot-typing { display: inline-flex; align-items: center; gap: 4px; min-width: 48px; }
.landing-chatbot-typing span { width: 5px; height: 5px; border-radius: 50%; background: #8995a9; animation: landing-chatbot-bounce 1s infinite ease-in-out; }
.landing-chatbot-typing span:nth-child(2) { animation-delay: .12s; }
.landing-chatbot-typing span:nth-child(3) { animation-delay: .24s; }

.landing-chatbot-quick { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 16px 11px; background: #f5f7fc; }
.landing-chatbot-quick button {
    padding: 7px 10px;
    border: 1px solid #dfe4ef;
    border-radius: 999px;
    color: #44516c;
    background: #fff;
    font: inherit;
    font-size: .71rem;
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.landing-chatbot-quick button:hover,
.landing-chatbot-quick button:focus-visible { border-color: #a59cff; color: var(--chatbot-violet-dark); background: #f5f3ff; }

.landing-chatbot-form { display: flex; align-items: center; gap: 8px; padding: 12px; border-top: 1px solid #e7ebf3; background: #fff; }
.landing-chatbot-input { min-width: 0; flex: 1; padding: 10px 11px; border: 1px solid #dfe5ef; border-radius: 12px; color: var(--chatbot-ink); background: #f9faff; font: inherit; font-size: .8rem; outline: none; }
.landing-chatbot-input:focus { border-color: #9287ff; box-shadow: 0 0 0 3px rgba(101,87,239,.11); }
.landing-chatbot-send { display: grid; flex: 0 0 38px; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 11px; color: #fff; background: var(--chatbot-violet); cursor: pointer; }
.landing-chatbot-send:hover, .landing-chatbot-send:focus-visible { background: var(--chatbot-violet-dark); }
.landing-chatbot-send:disabled { cursor: not-allowed; opacity: .5; }

@keyframes landing-chatbot-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes landing-chatbot-message-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes landing-chatbot-bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-3px); } }

@media (max-width: 600px) {
    .landing-chatbot { right: 14px; bottom: 14px; }
    .landing-chatbot-launcher { width: 56px; height: 56px; border-radius: 18px; }
    .landing-chatbot-panel { right: -1px; bottom: 68px; max-height: calc(100vh - 92px); border-radius: 21px; }
}

@media (prefers-reduced-motion: reduce) {
    .landing-chatbot *, .landing-chatbot *::before, .landing-chatbot *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Tautan di dalam teks jawaban chatbot */
.landing-chatbot-inline-link { color: #5b4cf0; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; word-break: break-word; }
.landing-chatbot-inline-link:hover { color: #3d2fd0; }
.landing-chatbot-message.user .landing-chatbot-inline-link { color: #fff; }
