/* Site chatbot (inc/chatbot.php, assets/js/chatbot.js). */
.etchat {
    --etchat-accent: var(--color-accent, #D13532);
    --etchat-dark: var(--color-dark, #252525);
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9990;
    font-family: 'PP Neue Montreal', 'Neue Montreal', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.45;
    color: var(--etchat-dark);
}

.etchat[hidden] {
    display: none;
}

.etchat__toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 28px;
    padding: 13px 20px;
    background: var(--etchat-accent);
    color: #fff;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

.etchat__toggle:hover {
    background: #B82623;
}

.etchat__toggle:focus-visible,
.etchat__send:focus-visible,
.etchat__close:focus-visible,
.etchat__input:focus-visible {
    outline: 2px solid var(--etchat-dark);
    outline-offset: 2px;
}

.etchat.is-open .etchat__toggle {
    display: none;
}

.etchat__panel {
    display: flex;
    flex-direction: column;
    width: 370px;
    max-width: calc(100vw - 24px);
    height: 540px;
    max-height: calc(100vh - 40px);
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

.etchat__panel[hidden] {
    display: none;
}

.etchat__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--etchat-dark);
    color: #fff;
}

.etchat__close {
    border: 0;
    background: none;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.etchat__log {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    background: #f5f5f5;
}

.etchat__msg {
    max-width: 88%;
    margin: 0 0 10px;
    padding: 9px 12px;
    border-radius: 12px;
    overflow-wrap: anywhere;
}

.etchat__msg--bot {
    background: #fff;
    border: 1px solid #e3e3e3;
}

.etchat__msg--me {
    margin-left: auto;
    background: var(--etchat-dark);
    color: #fff;
}

.etchat__msg a {
    color: var(--etchat-accent);
    text-decoration: underline;
}

.etchat__msg ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

.etchat__msg p {
    margin: 0 0 6px;
}

.etchat__msg p:last-child {
    margin-bottom: 0;
}

.etchat__msg--wait {
    color: #777;
}

.etchat__form {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #e3e3e3;
}

.etchat__input {
    flex: 1;
    min-width: 0;
    border: 1px solid #cfcfcf;
    border-radius: 20px;
    padding: 9px 14px;
    font: inherit;
}

.etchat__send {
    border: 0;
    border-radius: 20px;
    padding: 9px 16px;
    background: var(--etchat-accent);
    color: #fff;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}

.etchat__send:disabled {
    opacity: 0.5;
    cursor: default;
}

.etchat__note {
    margin: 0;
    padding: 0 12px 10px;
    font-size: 12px;
    color: #777;
}

@media (max-width: 480px) {
    .etchat {
        right: 12px;
        bottom: 12px;
    }

    .etchat__panel {
        height: calc(100vh - 24px);
    }
}
