:root {
    --hlc-green: #43a923;
    --hlc-green-dark: #247313;
    --hlc-green-soft: #eef8e9;
    --hlc-ink: #142536;
    --hlc-muted: #5c6974;
    --hlc-line: #dbe4dd;
    --hlc-yellow: #f3c84b;
    --hlc-paper: #ffffff;
    --hlc-canvas: #f4f7f3;
    --hlc-danger: #b9382c;
}

.hostillaLiveChatPage,
.hostillaLiveChatOperatorPage {
    margin: 0;
    background: var(--hlc-canvas) !important;
    color: var(--hlc-ink) !important;
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 0;
}

.hostillaLiveChatPage *,
.hostillaLiveChatOperatorPage * {
    box-sizing: border-box;
}

.hostillaLiveChatApp {
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 42px;
}

.hostillaLiveChatHeader {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.hostillaLiveChatBrand img {
    display: block;
    width: 178px;
    height: auto;
}

.hostillaLiveChatBack {
    color: var(--hlc-green-dark) !important;
    font-weight: 700;
    text-decoration: none;
}

.hostillaLiveChatBack:hover,
.hostillaLiveChatBack:focus-visible {
    text-decoration: underline;
    outline: 3px solid rgba(243, 200, 75, .5);
    outline-offset: 4px;
}

.hostillaLiveChatShell {
    border: 1px solid var(--hlc-line);
    border-radius: 8px;
    overflow: hidden;
    background: var(--hlc-paper);
    box-shadow: 0 18px 50px rgba(20, 37, 54, .1);
}

.hostillaLiveChatIntro {
    min-height: 188px;
    padding: 28px 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: var(--hlc-ink);
    color: #fff;
}

.hostillaLiveChatIntro span {
    color: #b9ed9e;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.hostillaLiveChatIntro h1 {
    margin: 8px 0 10px;
    color: #fff !important;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: 0;
}

.hostillaLiveChatIntro p {
    max-width: 650px;
    margin: 0;
    color: #eaf0f3 !important;
    font-size: 16px;
    line-height: 1.55;
}

.hostillaLiveChatIntro img {
    width: 150px;
    height: 174px;
    object-fit: contain;
    object-position: center;
}

.hostillaLiveChatPanel {
    padding: 0 34px 28px;
}

.hostillaLiveChatToolbar {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--hlc-line);
}

.hostillaLiveChatToolbar strong,
.hostillaLiveChatToolbar span {
    display: block;
}

.hostillaLiveChatToolbar strong {
    font-size: 13px;
    color: var(--hlc-muted);
}

.hostillaLiveChatToolbar span {
    margin-top: 4px;
    font-weight: 800;
}

.hostillaLiveChatToolbar button,
.hostillaOperatorChatHead button {
    min-height: 38px;
    border: 1px solid #d8b241;
    border-radius: 6px;
    background: #fff9e5;
    color: #5f4b0e;
    padding: 8px 14px;
    font-weight: 700;
    cursor: pointer;
}

.hostillaLiveChatMessages,
.hostillaOperatorMessages {
    height: 360px;
    overflow-y: auto;
    padding: 22px 4px;
    scrollbar-gutter: stable;
}

.hostillaLiveChatEmpty,
.hostillaOperatorEmpty {
    min-height: 100%;
    display: grid;
    place-content: center;
    text-align: center;
    color: var(--hlc-muted);
}

.hostillaLiveChatMessage {
    max-width: min(76%, 650px);
    margin: 0 0 13px;
}

.hostillaLiveChatMessage.is-client {
    margin-left: auto;
}

.hostillaLiveChatMessage.is-system {
    max-width: 100%;
    margin: 16px auto;
    text-align: center;
    color: var(--hlc-muted);
    font-size: 13px;
}

.hostillaLiveChatMessageMeta {
    margin: 0 5px 4px;
    color: var(--hlc-muted);
    font-size: 12px;
}

.hostillaLiveChatMessage.is-client .hostillaLiveChatMessageMeta {
    text-align: right;
}

.hostillaLiveChatMessageText {
    padding: 11px 14px;
    border: 1px solid var(--hlc-line);
    border-radius: 8px;
    background: #fff;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.45;
}

.hostillaLiveChatMessage.is-client .hostillaLiveChatMessageText {
    border-color: #9ed48a;
    background: var(--hlc-green-soft);
}

.hostillaLiveChatIdentity {
    margin-top: 6px;
}

.hostillaLiveChatIdentity label,
.hostillaLiveChatComposer label {
    display: block;
    color: var(--hlc-muted);
    font-size: 13px;
    font-weight: 700;
}

.hostillaLiveChatIdentity input,
.hostillaLiveChatComposer textarea,
.hostillaLiveChatOperator input,
.hostillaOperatorComposer textarea {
    width: 100%;
    border: 1px solid #bfcac2;
    border-radius: 6px;
    background: #fff !important;
    color: var(--hlc-ink) !important;
    font: inherit;
}

.hostillaLiveChatIdentity input {
    max-width: 360px;
    min-height: 42px;
    display: block;
    margin-top: 7px;
    padding: 9px 12px;
}

.hostillaLiveChatComposer {
    margin-top: 16px;
}

.hostillaLiveChatComposer > div,
.hostillaOperatorComposer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 130px;
    gap: 10px;
    margin-top: 7px;
}

.hostillaLiveChatComposer textarea,
.hostillaOperatorComposer textarea {
    min-height: 74px;
    resize: vertical;
    padding: 11px 12px;
}

.hostillaLiveChatComposer button,
.hostillaOperatorComposer button {
    min-height: 44px;
    border: 1px solid var(--hlc-green-dark);
    border-radius: 6px;
    background: var(--hlc-green);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.hostillaLiveChatComposer button:hover,
.hostillaOperatorComposer button:hover {
    background: var(--hlc-green-dark);
}

.hostillaLiveChatComposer button:disabled,
.hostillaOperatorComposer button:disabled {
    opacity: .55;
    cursor: wait;
}

.hostillaLiveChatIdentity input:focus,
.hostillaLiveChatComposer textarea:focus,
.hostillaLiveChatOperator input:focus,
.hostillaOperatorComposer textarea:focus,
button:focus-visible {
    outline: 3px solid rgba(243, 200, 75, .7);
    outline-offset: 2px;
}

.hostillaLiveChatSafety {
    margin: 12px 0 0;
    color: var(--hlc-muted);
    font-size: 12px;
    line-height: 1.45;
}

.hostillaLiveChatOperator {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.hostillaLiveChatOperator > header {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 12px 22px;
    border-bottom: 1px solid var(--hlc-line);
    background: #fff;
}

.hostillaLiveChatOperator > header > div {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hostillaLiveChatOperator > header img {
    width: 145px;
    height: auto;
}

.hostillaLiveChatOperator > header span {
    color: var(--hlc-green-dark);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.hostillaLiveChatOperator > header h1 {
    margin: 3px 0 0;
    color: var(--hlc-ink) !important;
    font-size: 20px;
    letter-spacing: 0;
}

.hostillaLiveChatOperator > header label {
    color: var(--hlc-muted);
    font-size: 12px;
    font-weight: 700;
}

.hostillaLiveChatOperator > header input {
    width: 220px;
    min-height: 38px;
    display: block;
    margin-top: 4px;
    padding: 8px 10px;
}

.hostillaLiveChatOperator > main {
    min-height: 0;
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
}

.hostillaLiveChatOperator aside {
    min-height: 0;
    border-right: 1px solid var(--hlc-line);
    background: #fff;
}

.hostillaOperatorListHeader {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--hlc-line);
}

.hostillaOperatorListHeader span {
    min-width: 28px;
    padding: 4px 7px;
    border-radius: 999px;
    background: var(--hlc-green-soft);
    color: var(--hlc-green-dark);
    text-align: center;
    font-size: 12px;
    font-weight: 800;
}

.hostillaOperatorList {
    height: calc(100vh - 166px);
    overflow-y: auto;
    padding: 8px;
}

.hostillaOperatorListItem {
    width: 100%;
    display: block;
    padding: 12px;
    border: 1px solid transparent;
    border-bottom-color: var(--hlc-line);
    background: #fff;
    color: var(--hlc-ink);
    text-align: left;
    cursor: pointer;
}

.hostillaOperatorListItem:hover,
.hostillaOperatorListItem.is-active {
    border-color: #9ed48a;
    background: var(--hlc-green-soft);
}

.hostillaOperatorListItem strong,
.hostillaOperatorListItem span,
.hostillaOperatorListItem small {
    display: block;
}

.hostillaOperatorListItem span {
    margin-top: 4px;
    color: var(--hlc-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hostillaOperatorListItem small {
    margin-top: 5px;
    color: var(--hlc-green-dark);
}

.hostillaOperatorChat {
    min-width: 0;
    min-height: 0;
    background: var(--hlc-canvas);
}

.hostillaOperatorChat > [data-operator-active] {
    height: 100%;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.hostillaOperatorChat > [data-operator-active][hidden] {
    display: none;
}

.hostillaOperatorChat > [data-operator-empty][hidden] {
    display: none;
}

.hostillaOperatorChatHead {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--hlc-line);
    background: #fff;
}

.hostillaOperatorChatHead strong,
.hostillaOperatorChatHead span {
    display: block;
}

.hostillaOperatorChatHead span {
    margin-top: 3px;
    color: var(--hlc-muted);
    font-size: 12px;
}

.hostillaOperatorChatHead > div:last-child {
    display: flex;
    gap: 8px;
}

.hostillaOperatorMessages {
    height: auto;
    padding: 18px;
}

.hostillaOperatorComposer {
    margin: 0;
    padding: 14px 18px;
    border-top: 1px solid var(--hlc-line);
    background: #fff;
}

.hostillaLiveChatOperator > footer {
    padding: 8px 20px;
    border-top: 1px solid var(--hlc-line);
    background: #fff9e5;
    color: #5f4b0e;
    font-size: 12px;
}

@media (max-width: 720px) {
    .hostillaLiveChatApp {
        width: min(100% - 20px, 1040px);
        padding-top: 10px;
    }

    .hostillaLiveChatHeader {
        align-items: flex-start;
    }

    .hostillaLiveChatBrand img {
        width: 142px;
    }

    .hostillaLiveChatBack {
        max-width: 150px;
        text-align: right;
        font-size: 13px;
    }

    .hostillaLiveChatIntro {
        min-height: 0;
        padding: 22px 20px;
    }

    .hostillaLiveChatIntro h1 {
        font-size: 24px;
    }

    .hostillaLiveChatIntro img {
        width: 92px;
        height: 110px;
    }

    .hostillaLiveChatPanel {
        padding: 0 16px 20px;
    }

    .hostillaLiveChatMessages {
        height: 330px;
    }

    .hostillaLiveChatMessage {
        max-width: 90%;
    }

    .hostillaLiveChatComposer > div,
    .hostillaOperatorComposer {
        grid-template-columns: 1fr;
    }

    .hostillaLiveChatComposer button,
    .hostillaOperatorComposer button {
        min-height: 46px;
    }

    .hostillaLiveChatOperator > header {
        align-items: flex-start;
        flex-direction: column;
    }

    .hostillaLiveChatOperator > header input {
        width: min(100%, 340px);
    }

    .hostillaLiveChatOperator > main {
        grid-template-columns: 1fr;
    }

    .hostillaLiveChatOperator aside {
        border-right: 0;
        border-bottom: 1px solid var(--hlc-line);
    }

    .hostillaOperatorList {
        height: 190px;
    }

    .hostillaOperatorChatHead {
        align-items: flex-start;
        flex-direction: column;
    }

    .hostillaOperatorChatHead > div:last-child {
        width: 100%;
        flex-wrap: wrap;
    }
}
