/* Elanlar v4.7.15 — adaptive chat composer on every viewport. */

/* v4.7.3 fixed the textarea to 40px with !important.  Use an inline custom
   property so JavaScript can safely grow it without weakening the isolated UI. */
.elanlar-app .elan-chat-input,
body.elan-chat-shell .elanlar-app .elan-chat-input {
    height: var(--elan-chat-input-height, 40px) !important;
    min-height: 40px !important;
    max-height: 180px !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    white-space: pre-wrap !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    scrollbar-gutter: stable;
}

.elanlar-app .elan-chat-input.elan-chat-input--scroll {
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.elanlar-app .elan-chat-input-wrap,
.elanlar-app .elan-chat-footer {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

/* In the popup the message canvas must give space to the composer instead of
   pushing the growing textarea below the iframe viewport. */
body.elan-chat-shell .elanlar-app .elan-messenger {
    min-height: 0 !important;
    overflow: hidden !important;
}

body.elan-chat-shell .elanlar-app .elan-chat-body {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
}

body.elan-chat-shell .elanlar-app .elan-chat-footer {
    position: relative !important;
    inset: auto !important;
    flex: 0 0 auto !important;
}

body.elan-chat-shell .elanlar-app .elan-chat-input-wrap {
    grid-auto-rows: auto !important;
    align-items: end !important;
}

@media (max-width: 1024px) {
    .elanlar-app .elan-chat-input,
    body.elan-chat-shell .elanlar-app .elan-chat-input {
        max-height: 160px !important;
    }
}

@media (max-width: 767px) {
    .elanlar-app .elan-chat-input,
    body.elan-chat-shell .elanlar-app .elan-chat-input {
        max-height: 144px !important;
    }
}

@media (max-height: 560px) {
    .elanlar-app .elan-chat-input,
    body.elan-chat-shell .elanlar-app .elan-chat-input {
        max-height: 112px !important;
    }
}
