.tss-chatbot {
    bottom: 1.25rem;
    font-family: var(--font-sans, system-ui, sans-serif);
    position: fixed;
    right: 1.25rem;
    z-index: 9999;
}

/* The mobile nav drawer (z-index 300) sits well below the chat widget
   (z-index 9999), so without this the chat bubble floats on top of the
   open menu and stays clickable over its overlay. */
body.tss-mobile-menu-open .tss-chatbot {
    display: none;
}

.tss-chatbot__greeting {
    align-items: center;
    animation: tss-assistant-greeting-in .45s .6s cubic-bezier(.2, .8, .2, 1) both;
    background: #fff;
    border: 1px solid #d8e2e5;
    border-radius: 14px;
    bottom: calc(100% + .8rem);
    box-shadow: 0 10px 28px rgba(7, 58, 71, .2);
    color: #073a47;
    display: inline-flex;
    font-size: .92rem;
    font-weight: 800;
    gap: .45rem;
    line-height: 1;
    padding: .72rem .85rem;
    pointer-events: none;
    position: absolute;
    right: 0;
    white-space: nowrap;
}

.tss-chatbot__greeting::after {
    background: #fff;
    border-bottom: 1px solid #d8e2e5;
    border-right: 1px solid #d8e2e5;
    content: "";
    height: .65rem;
    position: absolute;
    bottom: -.38rem;
    right: 1.5rem;
    transform: rotate(45deg);
    width: .65rem;
}

.tss-chatbot__greeting svg {
    color: #c59b20;
    height: 1.15rem;
    width: 1.15rem;
}

.tss-chatbot.has-been-opened .tss-chatbot__greeting {
    opacity: 0;
    transform: translateX(.5rem) scale(.96);
    transition: opacity .2s ease, transform .2s ease;
    visibility: hidden;
}

.tss-chatbot .tss-chatbot__toggle {
    align-items: center;
    background: linear-gradient(135deg, #073a47 0%, #00677a 72%, #087f92 100%) !important;
    border: 2px solid #fff !important;
    border-radius: 50%;
    box-shadow: 0 14px 34px rgba(7, 58, 71, .28), inset 0 1px 0 rgba(255, 255, 255, .15);
    color: #fff !important;
    cursor: pointer;
    display: inline-flex;
    height: 4.25rem;
    justify-content: center;
    min-height: 4.25rem;
    padding: .24rem;
    position: relative;
    transform: translateY(0);
    transition: transform .25s ease, box-shadow .25s ease;
    width: 4.25rem;
}

.tss-chatbot .tss-chatbot__toggle::before {
    animation: tss-assistant-ring 2.8s ease-out infinite;
    border: 2px solid rgba(226, 189, 86, .78);
    border-radius: 50%;
    content: "";
    inset: -5px;
    pointer-events: none;
    position: absolute;
}

.tss-chatbot .tss-chatbot__toggle:hover {
    box-shadow: 0 18px 42px rgba(7, 58, 71, .38), inset 0 1px 0 rgba(255, 255, 255, .2);
    transform: translateY(-3px);
}

.tss-chatbot .tss-chatbot__toggle:focus-visible {
    outline: 3px solid #e2bd56;
    outline-offset: 4px;
}

.tss-chatbot.is-open .tss-chatbot__toggle {
    background: linear-gradient(135deg, #052f3a, #00566a) !important;
    box-shadow: 0 10px 26px rgba(7, 58, 71, .26), inset 0 1px 0 rgba(255, 255, 255, .12);
    transform: translateY(0);
}

.tss-chatbot .tss-chatbot__toggle-icon {
    align-items: center;
    background: #fff !important;
    border-radius: 50%;
    display: inline-flex;
    flex: 0 0 auto;
    height: 3.55rem;
    justify-content: center;
    overflow: visible;
    position: relative;
    width: 3.55rem;
}

.tss-chatbot__avatar {
    animation: tss-assistant-float 3.8s ease-in-out infinite;
    border-radius: 50%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.12);
    width: 100%;
}

.tss-chatbot__status {
    animation: tss-assistant-status 2s ease-out infinite;
    background: #50d890;
    border: 2px solid #fff;
    border-radius: 50%;
    bottom: -1px;
    height: .7rem;
    position: absolute;
    right: -1px;
    width: .7rem;
}

.tss-chatbot__panel {
    background: #fff;
    border: 1px solid #dae2fd;
    border-radius: 12px;
    bottom: 5rem;
    box-shadow: 0 22px 54px rgba(19, 27, 46, .22);
    display: flex;
    flex-direction: column;
    max-height: min(620px, calc(100vh - 6rem));
    overflow: hidden;
    position: absolute;
    right: 0;
    width: min(370px, calc(100vw - 2.5rem));
}

.tss-chatbot.is-open .tss-chatbot__panel {
    animation: tss-assistant-panel-in .32s cubic-bezier(.2, .8, .2, 1) both;
    transform-origin: bottom right;
}

@keyframes tss-assistant-float {
    0%, 100% { transform: scale(1.12) translateY(0); }
    50% { transform: scale(1.12) translateY(-1.5px); }
}

@keyframes tss-assistant-ring {
    0% { opacity: .75; transform: scale(.88); }
    70%, 100% { opacity: 0; transform: scale(1.18); }
}

@keyframes tss-assistant-status {
    0% { box-shadow: 0 0 0 0 rgba(80, 216, 144, .65); }
    70%, 100% { box-shadow: 0 0 0 6px rgba(80, 216, 144, 0); }
}

@keyframes tss-assistant-panel-in {
    from { opacity: 0; transform: translateY(12px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes tss-assistant-greeting-in {
    from { opacity: 0; transform: translateX(.65rem) scale(.94); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

.tss-chatbot__panel[hidden] {
    display: none;
}

.tss-chatbot__header {
    align-items: flex-start;
    background: #004e5e;
    color: #fff;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem;
}

.tss-chatbot__header strong,
.tss-chatbot__header span {
    display: block;
}

.tss-chatbot__header strong {
    font-size: 1rem;
}

.tss-chatbot__header span {
    color: rgba(255,255,255,.78);
    font-size: .82rem;
    margin-top: .15rem;
}

.tss-chatbot__close {
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
    font-size: 1.55rem;
    line-height: 1;
    padding: 0;
}

.tss-chatbot__messages {
    background: #faf8ff;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: .65rem;
    min-height: 220px;
    overflow-y: auto;
    padding: 1rem;
}

.tss-chatbot__message {
    border-radius: 12px;
    font-size: .92rem;
    line-height: 1.55;
    max-width: 88%;
    padding: .7rem .85rem;
}

.tss-chatbot__message a {
    color: inherit;
    font-weight: 800;
    text-decoration: underline;
}

.tss-chatbot__message--bot {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #eaedff;
    color: #131b2e;
}

.tss-chatbot__message--user {
    align-self: flex-end;
    background: #006579;
    color: #fff;
}

.tss-chatbot__suggestions {
    background: #fff;
    border-top: 1px solid #eaedff;
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    padding: .75rem 1rem;
}

.tss-chatbot__suggestions button {
    background: #f2f3ff;
    border: 1px solid #dae2fd;
    border-radius: 999px;
    color: #131b2e;
    cursor: pointer;
    font-size: .78rem;
    font-weight: 700;
    padding: .42rem .65rem;
}

.tss-chatbot__form {
    align-items: stretch;
    background: #fff;
    border-top: 1px solid #eaedff;
    display: flex;
    gap: .5rem;
    padding: .8rem;
    position: relative;
}

.tss-chatbot__form .screen-reader-text {
    border: 0 !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    white-space: nowrap !important;
    width: 1px !important;
}

.tss-chatbot__form input {
    border: 1px solid #dae2fd;
    border-radius: 8px;
    flex: 1 1 auto;
    font: inherit;
    min-width: 0;
    padding: .7rem .75rem;
    width: 100%;
}

.tss-chatbot__form input::placeholder {
    color: #66777c;
    opacity: 1;
}

.tss-chatbot__form button {
    background: #d4af37;
    border: 0;
    border-radius: 8px;
    color: #131b2e;
    cursor: pointer;
    flex: 0 0 auto;
    font-weight: 800;
    min-width: 4.75rem;
    padding: .7rem .9rem;
}

.tss-chatbot__suggestions button:disabled,
.tss-chatbot__form input:disabled,
.tss-chatbot__form button:disabled {
    cursor: not-allowed;
    opacity: .58;
}

.tss-chatbot.is-question-limit-reached .tss-chatbot__suggestions {
    display: none;
}

@media (max-width: 520px) {
    .tss-chatbot {
        bottom: .9rem;
        right: .9rem;
    }

    .tss-chatbot__panel {
        bottom: 4.8rem;
        max-height: calc(100vh - 5.5rem);
        width: calc(100vw - 1.8rem);
    }

    .tss-chatbot .tss-chatbot__toggle {
        height: 3.75rem;
        min-height: 3.75rem;
        width: 3.75rem;
    }

    .tss-chatbot .tss-chatbot__toggle-icon {
        height: 3.1rem;
        width: 3.1rem;
    }

    .tss-chatbot__greeting {
        bottom: calc(100% + .7rem);
        font-size: .84rem;
        padding: .65rem .72rem;
        right: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tss-chatbot__avatar,
    .tss-chatbot__status,
    .tss-chatbot__greeting,
    .tss-chatbot .tss-chatbot__toggle::before,
    .tss-chatbot.is-open .tss-chatbot__panel {
        animation: none;
    }

    .tss-chatbot .tss-chatbot__toggle,
    .tss-chatbot__avatar {
        transition: none;
    }
}
