.edena-sia-root {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 99998;
    font-family: inherit;
}

.edena-sia-toggle {
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 50%;
    background: #24342f;
    color: #ffffff;
    box-shadow: 0 12px 34px rgba(24, 32, 29, 0.22);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.edena-sia-root.is-open .edena-sia-toggle {
    display: none;
}

.edena-sia-toggle:focus-visible,
.edena-sia-send:focus-visible,
.edena-sia-feedback:focus-visible,
.edena-sia-human-contact:focus-visible,
.edena-sia-expand:focus-visible,
.edena-sia-close:focus-visible {
    outline: 3px solid rgba(136, 169, 152, 0.55);
    outline-offset: 2px;
}

.edena-sia-panel {
    position: absolute;
    right: 0;
    bottom: 68px;
    width: min(380px, calc(100vw - 28px));
    height: min(620px, calc(100vh - 104px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(44, 58, 52, 0.14);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(23, 31, 28, 0.24);
}

.edena-sia-root.is-expanded .edena-sia-panel {
    width: min(720px, calc(100vw - 28px));
    height: min(760px, calc(100vh - 104px));
}

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

.edena-sia-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(44, 58, 52, 0.1);
    background: #f6f8f5;
}

.edena-sia-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.edena-sia-title {
    margin: 0;
    color: #24342f;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
}

.edena-sia-subtitle {
    margin: 2px 0 0;
    color: #65756d;
    font-size: 12px;
}

.edena-sia-expand,
.edena-sia-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #364941;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.edena-sia-expand {
    font-size: 18px;
}

.edena-sia-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    background: #fbfbf9;
}

.edena-sia-message {
    max-width: 88%;
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #20302b;
    font-size: 14px;
    line-height: 1.42;
    white-space: pre-wrap;
}

.edena-sia-message-user {
    margin-left: auto;
    background: #dfece5;
}

.edena-sia-message-assistant {
    margin-right: auto;
    border: 1px solid rgba(44, 58, 52, 0.1);
    background: #ffffff;
}

.edena-sia-feedbacks {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin: -6px 0 12px 2px;
}

.edena-sia-feedback-group {
    display: flex;
    gap: 6px;
}

.edena-sia-human-contact,
.edena-sia-feedback {
    min-width: 32px;
    height: 30px;
    border: 1px solid rgba(44, 58, 52, 0.16);
    border-radius: 999px;
    background: #ffffff;
    color: #24342f;
    cursor: pointer;
    font-size: 12px;
}

.edena-sia-human-contact {
    border-color: rgba(126, 85, 14, 0.22);
    background: #fff8e8;
    color: #6d4a08;
    white-space: nowrap;
}

.edena-sia-feedback.is-selected {
    border-color: #24342f;
    background: #24342f;
    color: #ffffff;
}

.edena-sia-status {
    min-height: 20px;
    padding: 0 14px 8px;
    color: #66756e;
    font-size: 12px;
}

.edena-sia-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid rgba(44, 58, 52, 0.1);
    background: #ffffff;
}

.edena-sia-input {
    min-height: 42px;
    max-height: 96px;
    resize: none;
    border: 1px solid rgba(44, 58, 52, 0.2);
    border-radius: 8px;
    padding: 10px 11px;
    color: #24342f;
    font: inherit;
    font-size: 14px;
}

.edena-sia-send {
    min-width: 78px;
    height: 42px;
    border: 0;
    border-radius: 8px;
    background: #24342f;
    color: #ffffff;
    cursor: pointer;
    font-weight: 700;
}

.edena-sia-send:disabled,
.edena-sia-input:disabled {
    cursor: not-allowed;
    opacity: 0.62;
}

@media (max-width: 640px) {
    .edena-sia-root {
        right: 12px;
        bottom: 12px;
    }

    .edena-sia-root.is-open {
        inset: 0;
        pointer-events: none;
    }

    .edena-sia-panel {
        position: fixed;
        top: calc(var(--edena-sia-viewport-top, 0px) + 8px);
        right: 8px;
        bottom: calc(var(--edena-sia-keyboard-offset, 0px) + max(8px, env(safe-area-inset-bottom)));
        left: 8px;
        width: auto;
        height: auto;
        max-height: calc(var(--edena-sia-viewport-height, 100dvh) - 16px);
        pointer-events: auto;
    }

    .edena-sia-root.is-expanded .edena-sia-panel {
        width: auto;
        height: auto;
    }

    .edena-sia-header {
        padding: 11px 12px;
    }

    .edena-sia-messages {
        padding: 12px;
    }

    .edena-sia-form {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px 10px max(10px, env(safe-area-inset-bottom));
    }

    .edena-sia-send {
        width: 100%;
    }

    .edena-sia-input {
        font-size: 16px;
    }
}
