.damane-assistant {
    bottom: 22px;
    color: #17233c;
    font-family: Roboto, Arial, sans-serif;
    position: fixed;
    right: 22px;
    z-index: 9998;
}

.damane-assistant * {
    box-sizing: border-box;
}

.damane-assistant__toggle {
    align-items: center;
    background: #0075c9;
    border: 0;
    border-radius: 6px;
    box-shadow: 0 12px 28px rgba(0, 31, 63, 0.24);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    font-weight: 700;
    gap: 9px;
    min-height: 48px;
    padding: 12px 18px;
}

.damane-assistant__toggle-icon {
    align-items: center;
    background: #2ab0ae;
    border-radius: 50%;
    display: inline-flex;
    font-size: 16px;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.damane-assistant__panel {
    background: #fff;
    border: 1px solid #d7e3ee;
    border-radius: 8px;
    bottom: 62px;
    box-shadow: 0 18px 48px rgba(0, 31, 63, 0.22);
    display: flex;
    flex-direction: column;
    max-height: min(640px, calc(100vh - 112px));
    overflow: hidden;
    position: absolute;
    right: 0;
    width: min(420px, calc(100vw - 28px));
}

.damane-assistant__panel[hidden] {
    display: none;
}

.damane-assistant__header {
    align-items: center;
    background: #f5f9fc;
    border-bottom: 1px solid #d7e3ee;
    display: flex;
    justify-content: space-between;
    padding: 14px 16px;
}

.damane-assistant__eyebrow,
.damane-assistant__hint {
    margin: 0;
}

.damane-assistant__eyebrow {
    color: #0075c9;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.damane-assistant__header h2 {
    color: #17233c;
    font-size: 18px;
    line-height: 1.25;
    margin: 2px 0 0;
}

.damane-assistant__close {
    align-items: center;
    background: transparent;
    border: 0;
    color: #17233c;
    cursor: pointer;
    display: inline-flex;
    font-size: 28px;
    height: 36px;
    justify-content: center;
    line-height: 1;
    width: 36px;
}

.damane-assistant__notice {
    background: #fff8e6;
    border-bottom: 1px solid #f1dfad;
    color: #604600;
    font-size: 12px;
    line-height: 1.35;
    padding: 10px 16px;
}

.damane-assistant__messages {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    min-height: 240px;
    overflow-y: auto;
    padding: 16px;
}

.damane-assistant__message {
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.45;
    max-width: 88%;
    padding: 10px 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

.damane-assistant__message--assistant {
    align-self: flex-start;
    background: #eef6fb;
    color: #17233c;
}

.damane-assistant__message--user {
    align-self: flex-end;
    background: #0075c9;
    color: #fff;
}

.damane-assistant__message--error {
    background: #fff1f1;
    color: #7a1f1f;
}

.damane-assistant__form {
    border-top: 1px solid #d7e3ee;
    padding: 12px;
}

.damane-assistant__label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}

.damane-assistant__input-row {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr auto;
}

.damane-assistant textarea {
    border: 1px solid #c9d8e5;
    border-radius: 6px;
    color: #17233c;
    font-size: 14px;
    line-height: 1.4;
    max-height: 120px;
    min-height: 48px;
    padding: 10px;
    resize: vertical;
    width: 100%;
}

.damane-assistant textarea:focus {
    border-color: #0075c9;
    outline: 2px solid rgba(0, 117, 201, 0.18);
}

.damane-assistant__form button {
    align-self: stretch;
    background: #2ab0ae;
    border: 0;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    min-width: 92px;
    padding: 0 14px;
}

.damane-assistant__form button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.damane-assistant__hint {
    color: #66748a;
    font-size: 12px;
    line-height: 1.35;
    margin-top: 7px;
}

html[lang="ar"] .damane-assistant,
.damane-assistant[data-locale="ar"] {
    direction: rtl;
}

@media (max-width: 767px) {
    .damane-assistant {
        bottom: 72px;
        left: 14px;
        right: 14px;
    }

    .damane-assistant__toggle {
        justify-content: center;
        width: 100%;
    }

    .damane-assistant__panel {
        bottom: 62px;
        max-height: calc(100vh - 150px);
        right: 0;
        width: 100%;
    }

    .damane-assistant__input-row {
        grid-template-columns: 1fr;
    }

    .damane-assistant__form button {
        min-height: 42px;
    }
}
