#aekassist-widget-root {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999999;
    font: 15px/1.5 system-ui, sans-serif;
    color: #172033;
}

.aekassist-launcher {
    border: 0;
    border-radius: 999px;
    padding: 13px 20px;
    background: #3157d5;
    color: #fff;
    box-shadow: 0 8px 28px rgba(20, 35, 75, .25);
    cursor: pointer;
    font-weight: 650;
}

.aekassist-panel {
    position: absolute;
    right: 0;
    bottom: 60px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: min(380px, calc(100vw - 32px));
    height: min(540px, calc(100vh - 120px));
    border: 1px solid #dbe1ee;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 16px 48px rgba(20, 35, 75, .24);
    overflow: hidden;
}

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

.aekassist-panel header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #3157d5;
    color: #fff;
}

.aekassist-close {
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 25px;
    line-height: 1;
}

.aekassist-messages {
    flex: 1 1 auto;
    min-height: 0;
    padding: 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #f7f9fd;
}

.aekassist-message {
    max-width: 88%;
    margin: 0 0 12px;
    padding: 11px 13px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(20, 35, 75, .08);
    overflow-wrap: anywhere;
}

.aekassist-message-body {
    display: block;
}

.aekassist-message-body p {
    margin: 0 0 9px;
}

.aekassist-message-body p:last-child {
    margin-bottom: 0;
}

.aekassist-message-body ol,
.aekassist-message-body ul {
    margin: 8px 0 10px 22px;
    padding: 0;
}

.aekassist-message-body li {
    margin: 0 0 6px;
    padding-left: 2px;
}

.aekassist-message-body li:last-child {
    margin-bottom: 0;
}

.aekassist-user {
    margin-left: auto;
    background: #3157d5;
    color: #fff;
}

.aekassist-user .aekassist-message-body p {
    margin-bottom: 0;
}

.aekassist-error {
    color: #9b1c1c;
}

.aekassist-feedback {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    color: #59647a;
    font-size: 12px;
}

.aekassist-feedback button {
    border: 1px solid #b8c2d8;
    border-radius: 999px;
    padding: 4px 9px;
    background: #fff;
    color: #37445e;
    cursor: pointer;
    font: inherit;
}

.aekassist-feedback textarea {
    box-sizing: border-box;
    flex-basis: 100%;
    width: 100%;
    border: 1px solid #b8c2d8;
    border-radius: 8px;
    padding: 7px;
    resize: vertical;
    font: inherit;
}

.aekassist-panel form {
    display: flex;
    flex: 0 0 auto;
    box-sizing: border-box;
    gap: 10px;
    padding: 10px 12px 12px;
    border-top: 1px solid #dbe1ee;
    background: #f8faff;
}

.aekassist-panel form[hidden],
.aekassist-messages[hidden] {
    display: none;
}

.aekassist-support-link {
    display: inline;
    margin: 8px 0 0;
    border: 0;
    padding: 0;
    background: transparent;
    color: #3157d5;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.aekassist-panel .aekassist-lead-form {
    flex: 1 1 auto;
    min-height: 0;
    padding: 18px;
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
}

.aekassist-lead-form input:not([type="checkbox"]),
.aekassist-lead-form select,
.aekassist-lead-form textarea {
    box-sizing: border-box;
    width: 100%;
    border: 1px solid #b8c2d8;
    border-radius: 8px;
    padding: 9px;
    background: #fff;
    font: inherit;
}

.aekassist-consent {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 13px;
}

.aekassist-lead-form > div {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.aekassist-lead-form .aekassist-lead-cancel {
    background: #eef1f8;
    color: #172033;
}

.aekassist-lead-error {
    color: #9b1c1c;
    margin: 0;
}

.aekassist-panel textarea {
    flex: 1;
    box-sizing: border-box;
    min-height: 52px;
    resize: none;
    border: 1px solid #ccd5e6;
    border-radius: 14px;
    padding: 12px 14px;
    background: #fff;
    color: #172033;
    font: inherit;
    line-height: 1.4;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.aekassist-panel form button {
    align-self: stretch;
    min-width: 76px;
    border: 0;
    border-radius: 14px;
    padding: 0 16px;
    background: #3157d5;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 650;
    transition: background-color .16s ease, transform .16s ease;
}

.aekassist-panel form button:hover:not(:disabled) {
    background: #2749bd;
}

.aekassist-panel form button:active:not(:disabled) {
    transform: translateY(1px);
}

.aekassist-panel textarea:focus-visible {
    border-color: #3157d5;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(49, 87, 213, .14);
}

.aekassist-panel button:focus-visible,
.aekassist-launcher:focus-visible {
    outline: 2px solid #3157d5;
    outline-offset: 2px;
}

@media (max-width: 480px) {
    #aekassist-widget-root {
        right: 16px;
        bottom: 16px;
    }

    .aekassist-panel {
        position: fixed;
        inset: 16px;
        width: auto;
        height: auto;
    }
}
