.chipp-chat-toggle {
    position: fixed;
    right: 24px;
    bottom: 28px;
    z-index: 1085;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 10px 18px 10px 12px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--dark-blue, #001e73) 0%, var(--primary-blue, #0046be) 58%, #2563eb 100%);
    box-shadow: 0 18px 45px rgba(0, 30, 115, 0.32), 0 8px 18px rgba(0, 70, 190, 0.2);
    isolation: isolate;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.chipp-chat-toggle::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.22);
    pointer-events: none;
}

.chipp-chat-toggle:hover,
.chipp-chat-toggle:focus-visible {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 22px 55px rgba(0, 30, 115, 0.38), 0 10px 22px rgba(0, 70, 190, 0.24);
}

.chipp-chat-toggle:focus-visible {
    outline: 3px solid rgba(255, 206, 0, 0.55);
    outline-offset: 4px;
}

.chipp-chat-toggle-glow {
    position: absolute;
    inset: auto -28px -38px auto;
    width: 110px;
    height: 110px;
    border-radius: 999px;
    background: rgba(255, 206, 0, 0.28);
    filter: blur(4px);
    z-index: -1;
}

.chipp-chat-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: var(--accent-yellow, #ffce00);
    font-size: 1.1rem;
}

.chipp-chat-toggle-text {
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.chipp-chat-panel {
    position: fixed;
    right: 24px;
    bottom: 104px;
    z-index: 1084;
    display: flex;
    flex-direction: column;
    width: min(390px, calc(100vw - 32px));
    height: min(650px, calc(100vh - 138px));
    max-height: 650px;
    border: 1px solid rgba(0, 70, 190, 0.14);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #f8fbff 100%);
    box-shadow: 0 28px 80px rgba(6, 21, 57, 0.26), 0 8px 24px rgba(0, 70, 190, 0.12);
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px) scale(0.98);
    transform-origin: bottom right;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.chipp-chat-panel.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.chipp-chat-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    color: #ffffff;
    background: radial-gradient(circle at 82% 18%, rgba(255, 206, 0, 0.32) 0, transparent 28%), linear-gradient(135deg, var(--dark-blue, #001e73) 0%, var(--primary-blue, #0046be) 100%);
}

.chipp-chat-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.16);
    color: var(--accent-yellow, #ffce00);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    flex: 0 0 auto;
}

.chipp-chat-meta {
    display: grid;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.chipp-chat-kicker {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.chipp-chat-title {
    display: block;
    color: #ffffff;
    font-size: 1.02rem;
    line-height: 1.2;
}

.chipp-chat-status-wrap {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.8rem;
    line-height: 1.25;
}

.chipp-chat-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-yellow, #ffce00);
    box-shadow: 0 0 0 5px rgba(255, 206, 0, 0.16);
    flex: 0 0 auto;
}

.chipp-chat-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 1.35rem;
    line-height: 1;
    transition: background 0.18s ease, transform 0.18s ease;
}

.chipp-chat-close:hover,
.chipp-chat-close:focus-visible {
    background: rgba(255, 255, 255, 0.24);
    color: #ffffff;
    transform: rotate(4deg);
}

.chipp-chat-body {
    flex: 1;
    min-height: 0;
    padding: 18px;
    overflow-y: auto;
    background:
        radial-gradient(circle at top left, rgba(0, 70, 190, 0.08), transparent 32%),
        linear-gradient(180deg, #f7faff 0%, #ffffff 72%);
}

.chipp-chat-body::-webkit-scrollbar {
    width: 8px;
}

.chipp-chat-body::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(0, 70, 190, 0.2);
}

.chipp-chat-intro {
    padding: 14px;
    margin-bottom: 14px;
    border: 1px solid rgba(0, 70, 190, 0.1);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 10px 28px rgba(0, 70, 190, 0.08);
}

.chipp-chat-intro-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--dark-blue, #001e73);
    background: rgba(255, 206, 0, 0.18);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.chipp-chat-intro p {
    margin: 0;
    color: #475569;
    font-size: 0.88rem;
    line-height: 1.5;
}

.chipp-chat-message {
    width: fit-content;
    max-width: 86%;
    padding: 11px 14px;
    margin: 10px 0;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.45;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
    overflow-wrap: anywhere;
}

.chipp-chat-message p {
    margin: 0;
}

.chipp-chat-message p + p,
.chipp-chat-message ul {
    margin-top: 8px;
}

.chipp-chat-message ul {
    padding-left: 18px;
    margin-bottom: 0;
}

.chipp-chat-message.bot {
    border-bottom-left-radius: 6px;
    color: #1e293b;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.chipp-chat-message.user {
    margin-left: auto;
    border-bottom-right-radius: 6px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-blue, #0046be), #2563eb);
}

.chipp-chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.chipp-chat-suggestion {
    border: 1px solid rgba(0, 70, 190, 0.14);
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--dark-blue, #001e73);
    background: #ffffff;
    font-size: 0.8rem;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(0, 70, 190, 0.07);
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.chipp-chat-suggestion:hover,
.chipp-chat-suggestion:focus-visible {
    border-color: var(--primary-blue, #0046be);
    color: #ffffff;
    background: var(--primary-blue, #0046be);
    transform: translateY(-1px);
}

.chipp-chat-form {
    display: flex;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid rgba(0, 70, 190, 0.1);
    background: rgba(255, 255, 255, 0.96);
}

.chipp-chat-form input {
    min-width: 0;
    flex: 1;
    height: 46px;
    border: 1px solid #dbe7ff;
    border-radius: 999px;
    padding: 0 16px;
    color: #0f172a;
    background: #f8fbff;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.chipp-chat-form input:focus {
    border-color: var(--primary-blue, #0046be);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 70, 190, 0.12);
}

.chipp-chat-form button[type="submit"] {
    height: 46px;
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    color: var(--dark-blue, #001e73);
    background: var(--accent-yellow, #ffce00);
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(255, 206, 0, 0.25);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.chipp-chat-form button[type="submit"]:hover,
.chipp-chat-form button[type="submit"]:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(255, 206, 0, 0.32);
}

.chipp-chat-form button[type="submit"]:disabled {
    cursor: not-allowed;
    opacity: 0.65;
    transform: none;
    box-shadow: none;
}

.chipp-chat-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px 14px;
    color: #64748b;
    background: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
}

.chipp-chat-footer-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--accent-yellow, #ffce00);
}

.chipp-chat-typing {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 56px;
}

.chipp-chat-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(0, 70, 190, 0.44);
    animation: chippTyping 1s ease-in-out infinite;
}

.chipp-chat-typing span:nth-child(2) {
    animation-delay: 0.14s;
}

.chipp-chat-typing span:nth-child(3) {
    animation-delay: 0.28s;
}

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

@media (max-width: 991.98px) {
    .chipp-chat-toggle {
        right: 16px;
        bottom: calc(84px + env(safe-area-inset-bottom, 0px));
        min-height: 54px;
        padding-right: 14px;
    }

    .chipp-chat-panel {
        right: 12px;
        bottom: calc(150px + env(safe-area-inset-bottom, 0px));
        width: calc(100vw - 24px);
        height: min(560px, calc(100vh - 184px));
        border-radius: 24px;
    }
}

@media (max-width: 480px) {
    .chipp-chat-toggle-text {
        display: none;
    }

    .chipp-chat-toggle {
        width: 58px;
        height: 58px;
        padding: 10px;
        justify-content: center;
    }

    .chipp-chat-toggle-icon {
        width: 40px;
        height: 40px;
    }

    .chipp-chat-panel {
        right: 8px;
        bottom: calc(146px + env(safe-area-inset-bottom, 0px));
        width: calc(100vw - 16px);
        height: min(560px, calc(100vh - 176px));
    }

    .chipp-chat-header,
    .chipp-chat-body,
    .chipp-chat-form {
        padding-left: 14px;
        padding-right: 14px;
    }
}
