.nika-public-assistant,
.nika-public-assistant * {
    box-sizing: border-box;
}

.nika-public-fab {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: auto !important;
    max-width: calc(100vw - 44px);
    z-index: 12001;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 60px;
    padding: 8px 16px 8px 9px;
    border: 1px solid rgba(139, 92, 246, .36);
    border-radius: 21px;
    background: linear-gradient(135deg, #0f172a, #312e81);
    color: #fff;
    box-shadow: 0 18px 46px rgba(15, 23, 42, .34), 0 0 0 6px rgba(124, 92, 246, .07);
    font: inherit;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.nika-public-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 52px rgba(15, 23, 42, .4), 0 0 0 7px rgba(124, 92, 246, .1);
}

.nika-public-fab.is-open {
    opacity: .7;
    transform: scale(.96);
}

.nika-public-fab__icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6d5dfc, #38bdf8);
}

.nika-public-fab__icon img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.nika-public-fab__pulse {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 11px;
    height: 11px;
    border: 2px solid #0f172a;
    border-radius: 50%;
    background: #34d399;
    animation: nikaPublicPulse 2.2s infinite;
}

.nika-public-fab__copy {
    display: grid;
    gap: 2px;
    text-align: left;
}

.nika-public-fab__copy b {
    font-size: 13px;
    line-height: 1.1;
}

.nika-public-fab__copy small {
    max-width: 155px;
    overflow: hidden;
    color: rgba(255, 255, 255, .7);
    font-size: 10px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nika-public-panel {
    position: fixed;
    right: 22px;
    bottom: 94px;
    z-index: 12002;
    width: min(420px, calc(100vw - 28px));
    height: min(610px, calc(100vh - 122px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .62);
    border-radius: 24px;
    background: rgba(248, 250, 252, .98);
    box-shadow: 0 26px 70px rgba(15, 23, 42, .28);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px) scale(.97);
    transform-origin: bottom right;
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.nika-public-panel.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.nika-public-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 17px;
    border-bottom: 1px solid #e6eaf1;
    background: rgba(255, 255, 255, .96);
}

.nika-public-panel__brand {
    display: flex;
    align-items: center;
    gap: 11px;
}

.nika-public-panel__brand img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 12px;
}

.nika-public-panel__brand b,
.nika-public-panel__brand small {
    display: block;
}

.nika-public-panel__brand b {
    color: #172033;
    font-size: 15px;
}

.nika-public-panel__brand small {
    margin-top: 3px;
    color: #667085;
    font-size: 10px;
}

.nika-public-panel__close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 11px;
    background: #eef1f5;
    color: #667085;
    font-size: 20px;
    cursor: pointer;
}

.nika-public-messages {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding: 15px;
    scroll-behavior: smooth;
}

.nika-public-welcome {
    padding: 15px;
    border: 1px solid #e1dcff;
    border-radius: 17px;
    background: linear-gradient(135deg, #f6f3ff, #eff8ff);
    color: #354052;
}

.nika-public-welcome b {
    display: block;
    margin-bottom: 5px;
    color: #312e81;
    font-size: 14px;
}

.nika-public-welcome p {
    margin: 0;
    color: #596579;
    font-size: 12px;
    line-height: 1.5;
}

.nika-public-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.nika-public-suggestion {
    padding: 8px 10px;
    border: 1px solid #d9d3ff;
    border-radius: 999px;
    background: rgba(255, 255, 255, .84);
    color: #564bc7;
    font: inherit;
    font-size: 10px;
    font-weight: 750;
    cursor: pointer;
}

.nika-public-message {
    max-width: 87%;
    padding: 10px 12px;
    border: 1px solid #e2e7ef;
    border-radius: 15px 15px 15px 5px;
    background: #fff;
    color: #273147;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.nika-public-message--user {
    align-self: flex-end;
    border-color: #d7d1ff;
    border-radius: 15px 15px 5px 15px;
    background: linear-gradient(135deg, #6d63ed, #8b5cf6);
    color: #fff;
}

.nika-public-message--typing {
    color: #7b8495;
    font-style: italic;
}

.nika-public-panel__action {
    display: block;
    margin: 0 15px 12px;
    padding: 11px 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #3b82f6);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

.nika-public-composer {
    padding: 12px 14px 14px;
    border-top: 1px solid #e4e8ef;
    background: #fff;
}

.nika-public-composer__box {
    display: grid;
    grid-template-columns: 38px 1fr 38px;
    gap: 7px;
    align-items: end;
    padding: 6px;
    border: 1px solid #dfe4ec;
    border-radius: 15px;
    background: #f8fafc;
}

.nika-public-composer textarea {
    min-height: 38px;
    max-height: 96px;
    resize: none;
    border: 0;
    outline: 0;
    background: transparent;
    color: #1f2937;
    font: inherit;
    font-size: 12px;
    line-height: 1.4;
    padding: 10px 4px 7px;
}

.nika-public-composer button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 11px;
    cursor: pointer;
}

.nika-public-mic {
    background: #eef1f6;
    color: #5d6676;
}

.nika-public-mic.listening {
    background: #ede9fe;
    color: #6d28d9;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, .1);
}

.nika-public-send {
    background: linear-gradient(135deg, #6366f1, #3b82f6);
    color: #fff;
}

@keyframes nikaPublicPulse {
    0%, 55% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .48); }
    100% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
}

@media (max-width: 640px) {
    .nika-public-fab {
        right: 14px;
        bottom: 14px;
        width: 54px !important;
        min-width: 54px;
        max-width: 54px;
        height: 54px;
        min-height: 54px;
        padding: 6px;
        border-radius: 18px;
        justify-content: center;
    }

    .nika-public-fab__copy {
        display: none;
    }

    .nika-public-panel {
        right: 10px;
        bottom: 78px;
        width: calc(100vw - 20px);
        height: min(610px, calc(100vh - 96px));
        border-radius: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nika-public-fab,
    .nika-public-panel,
    .nika-public-fab__pulse {
        animation: none;
        transition: none;
    }
}
