.intera-ai {
    --deep: #073f4d;
    --sea: #087f8c;
    --aqua: #43c6ac;
    --foam: #f4fbfa;
    --coral: #ef7a64;
    position: fixed;
    right: 20px;
    bottom: 112px;
    z-index: 1030;
    color: #17353d;
    font-family: inherit;
}

.intera-ai--open {
    bottom: 20px;
    z-index: 2147483647;
}

.intera-ai--blocked {
    display: none !important;
}

.intera-ai *,
.intera-ai *::before,
.intera-ai *::after {
    box-sizing: border-box;
}

.intera-ai [hidden] {
    display: none !important;
}

.intera-ai__launcher {
    display: flex;
    align-items: center;
    gap: 9px;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    background: linear-gradient(135deg, var(--deep), var(--sea));
    color: #fff;
    box-shadow: 0 10px 28px rgba(5, 64, 77, .28);
    font-weight: 700;
}

.intera-ai__launcher[aria-expanded="true"] {
    display: none;
}

.intera-ai__fish {
    font-size: 22px;
}

.intera-ai__panel {
    position: absolute;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: min(430px, calc(100vw - 32px));
    height: min(720px, calc(100vh - 40px));
    height: min(720px, calc(100dvh - 40px));
    min-height: 420px;
    overflow: hidden;
    border: 1px solid #cde7e4;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 20px 55px rgba(5, 55, 68, .28);
}

.intera-ai__header,
.intera-ai__composer,
.intera-ai__panel footer {
    flex: 0 0 auto;
}

.intera-ai__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 17px;
    color: #fff;
    background: linear-gradient(135deg, var(--deep), var(--sea) 68%, var(--aqua));
}

.intera-ai__header strong,
.intera-ai__header small {
    display: block;
}

.intera-ai__header small {
    opacity: .85;
}

.intera-ai__header button {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 28px;
    line-height: 1;
}

.intera-ai__scroll {
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #7ca7a7 transparent;
    background: linear-gradient(#f8fdfc, #eef9f7);
}

.intera-ai__messages {
    min-width: 0;
    padding: 14px;
}

.intera-ai__message {
    max-width: 88%;
    margin: 0 0 10px;
    padding: 10px 12px;
    overflow-wrap: anywhere;
    border-radius: 15px;
    white-space: pre-wrap;
    line-height: 1.42;
}

.intera-ai__message--assistant {
    border: 1px solid #d9ece9;
    border-bottom-left-radius: 4px;
    background: #fff;
}

.intera-ai__message--user {
    margin-left: auto;
    border-bottom-right-radius: 4px;
    background: var(--deep);
    color: #fff;
}

.intera-ai__message--error {
    border-color: #facbc2;
    background: #fff0ed;
}

.intera-ai__typing {
    opacity: .68;
}

.intera-ai__quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
    border-top: 1px solid #dceeea;
    background: #eef9f7;
}

.intera-ai__quick button {
    max-width: 100%;
    border: 1px solid #9bd8d1;
    border-radius: 999px;
    padding: 6px 9px;
    background: #fff;
    color: var(--deep);
    font-size: 12px;
    line-height: 1.2;
    white-space: normal;
}

.intera-ai__order {
    padding: 9px 12px;
    border-top: 1px solid #f2ddba;
    background: #fff8ec;
}

.intera-ai__order label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
}

.intera-ai__order input {
    display: block;
    width: 100%;
    border: 1px solid #c7deda;
    border-radius: 8px;
    padding: 7px;
}

.intera-ai__order small {
    font-size: 11px;
}

.intera-ai__consent {
    display: flex;
    gap: 7px;
    padding: 9px 12px;
    border-top: 1px solid #e0eeee;
    background: #f9fcfc;
    font-size: 11px;
    line-height: 1.3;
}

.intera-ai__consent input {
    flex: none;
    margin-top: 2px;
}

.intera-ai__composer {
    display: flex;
    gap: 7px;
    min-width: 0;
    padding: 10px;
    border-top: 1px solid #dbeae8;
    background: #fff;
}

.intera-ai__composer textarea {
    width: 100%;
    min-width: 0;
    min-height: 54px;
    max-height: 112px;
    flex: 1 1 auto;
    resize: vertical;
    border: 1px solid #b9d8d4;
    border-radius: 12px;
    padding: 9px;
}

.intera-ai__composer button {
    flex: 0 0 auto;
    border: 0;
    border-radius: 12px;
    padding: 0 14px;
    background: var(--coral);
    color: #fff;
    font-weight: 700;
}

.intera-ai__panel footer {
    padding: 0 12px 8px;
    background: #fff;
    color: #677;
    font-size: 10px;
    text-align: center;
}

.intera-ai__products {
    display: grid;
    gap: 7px;
    margin: 8px 0;
}

.intera-ai__product {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 8px;
    border: 1px solid #cfe5e2;
    border-radius: 11px;
    padding: 7px;
    background: #fff;
    color: inherit;
    text-decoration: none;
}

.intera-ai__product--no-image {
    grid-template-columns: minmax(0, 1fr);
}

.intera-ai--order-open .intera-ai__quick {
    display: none;
}

.intera-ai__product img {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 8px;
}

.intera-ai__product strong,
.intera-ai__product small {
    display: block;
    overflow-wrap: anywhere;
}

.intera-ai__feedback {
    display: flex;
    gap: 5px;
    margin: -5px 0 10px;
}

.intera-ai__feedback button {
    border: 1px solid #c6deda;
    border-radius: 99px;
    padding: 3px 8px;
    background: #fff;
    font-size: 12px;
}

@media (max-height: 760px) {
    .intera-ai__panel {
        position: fixed;
        top: 8px;
        right: 12px;
        bottom: 8px;
        width: min(430px, calc(100vw - 24px));
        height: auto;
        min-height: 0;
    }
}

@media (max-width: 575px) {
    .intera-ai {
        right: max(8px, env(safe-area-inset-right));
        bottom: max(104px, calc(96px + env(safe-area-inset-bottom)));
    }

    .intera-ai--open {
        bottom: max(8px, env(safe-area-inset-bottom));
    }

    .intera-ai__panel {
        position: fixed;
        top: calc(var(--intera-ai-viewport-top, 0px) + max(8px, env(safe-area-inset-top)));
        right: max(8px, env(safe-area-inset-right));
        bottom: auto;
        left: max(8px, env(safe-area-inset-left));
        width: auto;
        height: calc(var(--intera-ai-viewport-height, 100vh) - 16px);
        height: calc(var(--intera-ai-viewport-height, 100dvh) - 16px);
        min-height: 0;
        border-radius: 17px;
    }

    .intera-ai__launcher span:last-child {
        display: none;
    }

    .intera-ai__messages {
        padding: 12px;
    }

    .intera-ai__message {
        max-width: 94%;
    }

}

@media (max-height: 560px) {
    .intera-ai__header {
        padding: 10px 14px;
    }

    .intera-ai__header small,
    .intera-ai__panel footer {
        display: none;
    }

    .intera-ai__consent {
        padding-block: 6px;
    }

    .intera-ai__composer {
        padding: 7px;
    }
}
