.aiden-chatbot {
    --aiden-chatbot-accent: #6c63ff;
    --aiden-chatbot-accent-dark: #574fe0;
    --aiden-chatbot-bg: #ffffff;
    --aiden-chatbot-soft: #fafbff;
    --aiden-chatbot-muted: #64748b;
    --aiden-chatbot-text: #172033;
    --aiden-chatbot-border: #e8edf7;
    --aiden-chatbot-shadow: 0 18px 60px rgba(15, 23, 42, 0.18);
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 1200;
}

.aiden-chatbot[hidden] {
    display: none !important;
}

.aiden-chatbot-panel {
    width: 420px;
    max-width: calc(100vw - 32px);
    background: var(--aiden-chatbot-bg);
    border: 1px solid var(--aiden-chatbot-border);
    border-radius: 22px;
    box-shadow: var(--aiden-chatbot-shadow);
    overflow: hidden;
    display: none;
    flex-direction: column;
}

.aiden-chatbot.is-open .aiden-chatbot-panel {
    display: flex;
}

.aiden-chatbot.is-open .aiden-chatbot-launcher {
    display: none;
}

.aiden-chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--aiden-chatbot-border);
    background: #fff;
}

.aiden-chatbot-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.aiden-chatbot-launcher-icon {
    position: relative;
    overflow: visible;
}

.aiden-chatbot-sparkle-icon {
    position: relative;
    overflow: visible;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--aiden-chatbot-accent), #9b7cff);
    flex: 0 0 auto;
    animation: aiden-launcher-sparkle-glow 2.6s ease-in-out infinite;
}

.aiden-chatbot-sparkle-icon--sm {
    width: 34px;
    height: 34px;
    box-shadow: 0 6px 18px rgba(108, 99, 255, 0.25);
}

.aiden-chatbot-sparkle-icon--lg,
.aiden-chatbot-logo-circle {
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    box-shadow: 0 10px 30px rgba(108, 99, 255, 0.22);
}

.aiden-chatbot-sparkle-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 1;
    position: relative;
    z-index: 1;
    animation: aiden-launcher-sparkle-star 2.6s ease-in-out infinite;
}

.aiden-chatbot-sparkle-icon--sm .aiden-chatbot-sparkle-glyph {
    font-size: 16px;
}

.aiden-chatbot-sparkle-icon--lg .aiden-chatbot-sparkle-glyph,
.aiden-chatbot-logo-circle .aiden-chatbot-sparkle-glyph {
    font-size: 32px;
}

.aiden-chatbot-sparkle-icon::before,
.aiden-chatbot-sparkle-icon::after {
    content: '✦';
    position: absolute;
    color: #fff;
    line-height: 1;
    pointer-events: none;
    z-index: 2;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.75);
}

.aiden-chatbot-sparkle-icon--sm::before {
    top: 3px;
    right: 2px;
    font-size: 7px;
    animation: aiden-launcher-sparkle-dot 2.6s ease-in-out infinite;
}

.aiden-chatbot-sparkle-icon--sm::after {
    bottom: 4px;
    left: 3px;
    font-size: 6px;
    animation: aiden-launcher-sparkle-dot 2.6s ease-in-out infinite 1.3s;
}

.aiden-chatbot-sparkle-icon--lg::before,
.aiden-chatbot-logo-circle::before {
    top: 8px;
    right: 6px;
    font-size: 12px;
    animation: aiden-launcher-sparkle-dot 2.6s ease-in-out infinite;
}

.aiden-chatbot-sparkle-icon--lg::after,
.aiden-chatbot-logo-circle::after {
    bottom: 10px;
    left: 8px;
    font-size: 10px;
    animation: aiden-launcher-sparkle-dot 2.6s ease-in-out infinite 1.3s;
}

.aiden-chatbot-launcher-label {
    white-space: nowrap;
}

.aiden-chatbot-brand h2 {
    font-size: 16px;
    line-height: 1.2;
    margin: 0;
    color: var(--aiden-chatbot-text);
    font-weight: 800;
}

.aiden-chatbot-brand p {
    font-size: 12px;
    line-height: 1.2;
    margin: 3px 0 0;
    color: var(--aiden-chatbot-muted);
}

.aiden-chatbot-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.aiden-chatbot-icon-btn {
    border: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 18px;
    line-height: 1;
    border-radius: 10px;
    min-width: 30px;
    height: 30px;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
}

.aiden-chatbot-icon-btn[data-aiden-chatbot-clear] {
    font-size: 12px;
    font-weight: 700;
    width: auto;
    padding: 0 8px;
}

.aiden-chatbot-icon-btn:hover,
.aiden-chatbot-icon-btn:focus-visible {
    background: #f1f5ff;
    color: var(--aiden-chatbot-accent);
    outline: none;
}

.aiden-chatbot-body {
    background: var(--aiden-chatbot-soft);
    min-height: 430px;
    max-height: min(58vh, 500px);
    padding: 24px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: hidden;
}

.aiden-chatbot-intro {
    text-align: center;
    color: var(--aiden-chatbot-muted);
    font-size: 14px;
    line-height: 1.5;
    padding: 8px 8px 0;
}

.aiden-chatbot-logo-circle {
    position: relative;
    overflow: visible;
}

.aiden-chatbot-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    padding: 2px 8px 2px 0;
    flex: 1 1 auto;
    scrollbar-width: thin;
    scrollbar-color: #c4c5f6 transparent;
}

.aiden-chatbot-message {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    width: 100%;
}

.aiden-chatbot-message.is-bot.is-appearing {
    opacity: 0;
    transform: translateY(6px);
}

.aiden-chatbot-message.is-bot.is-appearing.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.12s ease, transform 0.12s ease;
}

.aiden-chatbot-message.is-typing.is-leaving {
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.12s ease, transform 0.12s ease;
}

.aiden-chatbot-message.is-user {
    justify-content: flex-end;
}

.aiden-chatbot-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--aiden-chatbot-accent);
    font-size: 14px;
    flex: 0 0 auto;
}

.aiden-chatbot-bubble {
    max-width: 86%;
    padding: 11px 14px;
    border-radius: 17px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--aiden-chatbot-text);
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.75);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    word-break: break-word;
}

.aiden-chatbot-message.is-user .aiden-chatbot-bubble {
    color: #fff;
    background: var(--aiden-chatbot-accent);
    border-color: var(--aiden-chatbot-accent);
    border-bottom-right-radius: 6px;
}

.aiden-chatbot-message.is-bot .aiden-chatbot-bubble {
    border-bottom-left-radius: 6px;
}

.aiden-chatbot-content p {
    margin: 0 0 10px;
}

.aiden-chatbot-content p:last-child {
    margin-bottom: 0;
}

.aiden-chatbot-content ul {
    margin: 8px 0 10px;
    padding: 0;
    list-style: none;
}

.aiden-chatbot-content li {
    position: relative;
    margin: 0 0 8px;
    padding-left: 14px;
    line-height: 1.45;
}

.aiden-chatbot-content li:last-child {
    margin-bottom: 0;
}

.aiden-chatbot-content li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--aiden-chatbot-accent);
    transform: translateY(-50%);
}

.aiden-chatbot-content li strong {
    font-weight: 800;
    color: var(--aiden-chatbot-text);
}

.aiden-chatbot-message.is-user .aiden-chatbot-content li strong {
    color: #fff;
}

.aiden-chatbot-routes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.aiden-chatbot-route {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #d9defc;
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--aiden-chatbot-accent-dark);
    background: #f7f7ff;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.aiden-chatbot-route:hover,
.aiden-chatbot-route:focus-visible {
    color: #fff;
    background: var(--aiden-chatbot-accent);
    border-color: var(--aiden-chatbot-accent);
    outline: none;
}

.aiden-chatbot-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.aiden-chatbot-suggestions[hidden] {
    display: none !important;
}

.aiden-chatbot-suggestion {
    border: 1px solid #e0e5ff;
    border-radius: 999px;
    padding: 9px 12px;
    color: var(--aiden-chatbot-accent-dark);
    background: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.aiden-chatbot-suggestion:hover,
.aiden-chatbot-suggestion:focus-visible {
    border-color: var(--aiden-chatbot-accent);
    background: #f4f3ff;
    transform: translateY(-1px);
    outline: none;
}

.aiden-chatbot-followups {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.aiden-chatbot-followup {
    border: 1px dashed #c9d0fb;
    border-radius: 999px;
    padding: 6px 11px;
    color: var(--aiden-chatbot-accent-dark);
    background: #fbfbff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.16s ease, background 0.16s ease;
}

.aiden-chatbot-followup:hover,
.aiden-chatbot-followup:focus-visible {
    border-style: solid;
    border-color: var(--aiden-chatbot-accent);
    background: #f1f0ff;
    outline: none;
}

.aiden-chatbot-input-row {
    position: relative;
    padding: 14px 16px 16px;
    background: #fff;
    border-top: 1px solid var(--aiden-chatbot-border);
}

.aiden-chatbot-security-fields {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.aiden-chatbot-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.aiden-chatbot-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    height: 44px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0 15px;
    font-size: 14px;
    color: var(--aiden-chatbot-text);
    background: #f8fafc;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.aiden-chatbot-input:focus {
    border-color: var(--aiden-chatbot-accent);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.14);
    background: #fff;
}

.aiden-chatbot-send {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--aiden-chatbot-accent);
    background: #f4f3ff;
    cursor: pointer;
    flex: 0 0 44px;
    transition: transform 0.16s ease, background 0.16s ease;
}

.aiden-chatbot-send:hover,
.aiden-chatbot-send:focus-visible {
    transform: translateY(-1px);
    background: #ebe9ff;
    outline: none;
}

.aiden-chatbot-send:disabled,
.aiden-chatbot-input:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.aiden-chatbot-launcher {
    border: 0;
    border-radius: 22px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.14);
    padding: 12px 18px 12px 12px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--aiden-chatbot-text);
    background: #fff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.aiden-chatbot-launcher:hover,
.aiden-chatbot-launcher:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(108, 99, 255, 0.2);
    outline: none;
}

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

.aiden-chatbot-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #a5b4fc;
    animation: aiden-chatbot-dot 1s infinite ease-in-out;
}

.aiden-chatbot-typing span:nth-child(2) {
    animation-delay: 0.15s;
}

.aiden-chatbot-typing span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes aiden-chatbot-dot {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
    40% { transform: translateY(-4px); opacity: 1; }
}

@keyframes aiden-launcher-sparkle-glow {
    0%, 100% {
        box-shadow: 0 8px 28px rgba(108, 99, 255, 0.35), 0 0 0 0 rgba(155, 124, 255, 0.45);
    }
    50% {
        box-shadow: 0 12px 36px rgba(108, 99, 255, 0.55), 0 0 0 10px rgba(155, 124, 255, 0);
    }
}

@keyframes aiden-launcher-sparkle-star {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.14) rotate(14deg); opacity: 0.88; }
}

@keyframes aiden-launcher-sparkle-dot {
    0%, 100% { transform: scale(0.4) rotate(0deg); opacity: 0; }
    35% { transform: scale(1) rotate(20deg); opacity: 0.9; }
    70% { transform: scale(0.5) rotate(40deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .aiden-chatbot-message.is-bot.is-appearing,
    .aiden-chatbot-message.is-bot.is-appearing.is-visible,
    .aiden-chatbot-message.is-typing.is-leaving {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .aiden-chatbot-launcher-icon,
    .aiden-chatbot-launcher-icon.aiden-chatbot-sparkle-icon,
    .aiden-chatbot-sparkle-icon,
    .aiden-chatbot-sparkle-glyph,
    .aiden-chatbot-sparkle-icon::before,
    .aiden-chatbot-sparkle-icon::after,
    .aiden-chatbot-logo-circle::before,
    .aiden-chatbot-logo-circle::after {
        animation: none !important;
    }
}

@media (max-width: 640px) {
    .aiden-chatbot {
        right: 16px;
        bottom: 16px;
        left: auto;
    }

    .aiden-chatbot.is-open {
        left: 12px;
        right: 12px;
    }

    .aiden-chatbot-panel {
        width: 100%;
        max-width: none;
        border-radius: 18px;
    }

    .aiden-chatbot-body {
        max-height: 56vh;
        min-height: 360px;
    }

    .aiden-chatbot-launcher {
        width: 56px;
        height: 56px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
        gap: 0;
        background: transparent;
        box-shadow: none;
    }

    .aiden-chatbot-launcher:hover,
    .aiden-chatbot-launcher:focus-visible {
        transform: translateY(-2px);
        box-shadow: none;
    }

    .aiden-chatbot-launcher-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .aiden-chatbot-launcher-icon.aiden-chatbot-sparkle-icon--sm {
        width: 56px;
        height: 56px;
    }

    .aiden-chatbot-launcher-icon .aiden-chatbot-sparkle-glyph {
        font-size: 22px;
    }

    .aiden-chatbot-launcher-icon.aiden-chatbot-sparkle-icon--sm::before {
        top: 6px;
        right: 4px;
        font-size: 10px;
    }

    .aiden-chatbot-launcher-icon.aiden-chatbot-sparkle-icon--sm::after {
        bottom: 8px;
        left: 6px;
        font-size: 8px;
    }
}
