/* Denline Assist - self-hosted website support widget. */
.quick-action-assist {
    border: 0;
    background: #167d72;
    color: #fff;
    font-family: inherit;
    cursor: pointer;
}

.denline-assist {
    position: fixed;
    z-index: 80;
    right: 22px;
    bottom: 82px;
    width: min(400px, calc(100vw - 28px));
    max-height: min(650px, calc(100vh - 112px));
    display: grid;
    grid-template-rows: auto minmax(120px, 1fr) auto;
    overflow: hidden;
    border: 1px solid rgba(10,18,32,0.16);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(4,18,34,0.28);
}

.denline-assist[hidden] { display: none; }

.assist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 17px 18px;
    background: linear-gradient(120deg, #07182a, #123b59);
    color: #fff;
}

.assist-brand {
    display: grid;
    grid-template-columns: 10px 1fr;
    column-gap: 10px;
    align-items: center;
}

.assist-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4dd7ba;
    box-shadow: 0 0 0 4px rgba(77,215,186,0.16);
    grid-row: 1 / span 2;
}

.assist-brand strong { font: 700 16px/1.2 'Inter', sans-serif; }
.assist-brand small { color: #c9d7e3; font-size: 11px; }

.assist-close {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.assist-close:hover { background: rgba(255,255,255,0.16); }

.assist-body {
    min-height: 0;
    overflow-y: auto;
    padding: 18px;
    background: #f4f6f7;
}

.assist-messages { display: grid; gap: 10px; }

.assist-message {
    width: fit-content;
    max-width: 88%;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.5;
    white-space: pre-line;
}

.assist-message.bot {
    justify-self: start;
    border: 1px solid #dde4e8;
    border-bottom-left-radius: 3px;
    background: #fff;
    color: #273442;
}

.assist-message.user {
    justify-self: end;
    border-bottom-right-radius: 3px;
    background: #123b59;
    color: #fff;
}

.assist-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 14px;
}

.assist-option,
.assist-restart {
    border: 1px solid #cdd9df;
    border-radius: 8px;
    background: #fff;
    color: #123b59;
    padding: 10px;
    font: 700 12px/1.35 'Inter', sans-serif;
    cursor: pointer;
    text-align: left;
}

.assist-option:hover,
.assist-restart:hover { border-color: #167d72; background: #edf8f5; }

.assist-form {
    display: grid;
    gap: 11px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #dbe2e6;
}

.assist-form[hidden] { display: none; }
.assist-form label { display: grid; gap: 5px; color: #273442; font-size: 11.5px; font-weight: 700; }

.assist-form input,
.assist-form textarea {
    width: 100%;
    border: 1px solid #ccd7dd;
    border-radius: 7px;
    background: #fff;
    padding: 10px 11px;
    font: 400 13px/1.4 'Inter', sans-serif;
    color: #172535;
}

.assist-form textarea { min-height: 82px; resize: vertical; }
.assist-form input:focus,
.assist-form textarea:focus { outline: 2px solid rgba(22,125,114,0.24); border-color: #167d72; }

.assist-reference[hidden] { display: none; }

.assist-consent {
    display: grid !important;
    grid-template-columns: 17px 1fr;
    align-items: start;
    gap: 8px !important;
    font-weight: 400 !important;
    line-height: 1.4;
}

.assist-consent input { width: 17px; height: 17px; padding: 0; }
.assist-consent a { color: #123b59; text-decoration: underline; }

.assist-submit {
    border: 0;
    border-radius: 8px;
    background: #167d72;
    color: #fff;
    padding: 11px 14px;
    font: 700 13px/1 'Inter', sans-serif;
    cursor: pointer;
}

.assist-submit:hover { background: #10675f; }
.assist-submit:disabled { opacity: 0.6; cursor: wait; }

.assist-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

@media (max-width: 860px) {
    .denline-assist {
        left: 10px;
        right: 10px;
        bottom: 68px;
        width: auto;
        max-height: min(670px, calc(100vh - 86px));
        border-radius: 14px 14px 0 0;
    }
}

@media (max-width: 430px) {
    .assist-options { grid-template-columns: 1fr; }
}
