.dt-chat-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 75;
    font-family: "Mulish", sans-serif;
}

.dt-chat-widget__launcher {
    display: flex;
    width: 58px;
    height: 58px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #e3ba67;
    color: #111;
    font-size: 25px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
    cursor: pointer;
}

.dt-chat-widget__panel {
    position: absolute;
    right: 0;
    bottom: 72px;
    width: min(360px, calc(100vw - 32px));
    padding: 24px;
    border: 1px solid #e2e2e2;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .2);
}

.dt-chat-message p, .dt-chat-message strong { color: black}

.dt-chat-widget__panel h2 { margin: 0 28px 8px 0; font-size: 20px; }
.dt-chat-widget__panel p { margin: 0 0 18px; line-height: 1.5; }
.dt-chat-widget__close { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 25px; cursor: pointer; }
.dt-chat-widget__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.dt-chat-widget__actions a { padding: 10px 14px; border-radius: 8px; background: #111; color: #fff; text-decoration: none; font-weight: 700; }
.dt-chat-widget__actions a.is-secondary { border: 1px solid #111; background: #fff; color: #111; }
.dt-chat-widget__phone { color: #111; font-weight: 700; }
.dt-client-chat .dt-client-content { min-width: 0; }

.dt-chat-feedback,
.dt-chat-availability { margin: 0 0 16px; padding: 12px 16px; border-radius: 10px; background: #e8f7ee; color: #126234; }
.dt-chat-feedback--notice,
.dt-chat-availability.is-closed { background: #fff6df; color: #73500b; }
.dt-chat-feedback--error { background: #fff0f0; color: #9c1c1c; }

.dt-chat-toolbar { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.dt-chat-new-toggle { border: 0; border-radius: 9px; padding: 11px 16px; background: #111; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.dt-chat-new { margin-bottom: 16px; border: 1px solid #e2e2e2; border-radius: 14px; background: #fff; padding: 18px; }
.dt-chat-new[hidden] { display: none; }
.dt-chat-new__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.dt-chat-new__header h2 { margin: 0; }
.dt-chat-new form,
/* .dt-chat-reply { display: grid; gap: 8px; } */
/* .dt-chat-new form { grid-template-columns: minmax(180px, .65fr) minmax(260px, 1.35fr) auto; align-items: end; } */
.dt-chat-new form label { align-self: end; }
.dt-chat-new form label:nth-of-type(2) { grid-column: 2; grid-row: 1; }
.dt-chat-new input { grid-column: 1; }
.dt-chat-new textarea { grid-column: 2; grid-row: 2; }
.dt-chat-new form > button { grid-column: 3; grid-row: 2; }
.dt-chat-new input,
.dt-chat-new textarea,
.dt-chat-reply textarea { width: 100%; box-sizing: border-box; border: 1px solid #bbb; border-radius: 8px; padding: 10px; font: inherit; }
.dt-chat-new textarea,
.dt-chat-reply textarea { min-height: 92px; resize: vertical; }
.dt-chat-new form > button,
.dt-chat-reply button { border: 0; border-radius: 8px; background: #111; color: #fff; padding: 11px 14px; font-weight: 700; cursor: pointer; }

.dt-chat-workspace { display: grid; height: clamp(560px, calc(100dvh - 260px), 680px); min-height: 0; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 18px; }
.dt-chat-conversations,
.dt-chat-thread { min-width: 0; min-height: 0; border: 1px solid #e2e2e2; border-radius: 14px; background: #fff; padding: 18px; }
.dt-chat-conversations { overflow-y: auto; overscroll-behavior: contain; }
.dt-chat-thread { position: relative; display: flex; flex-direction: column; overflow: hidden; }
.dt-chat-conversations h2,
.dt-chat-thread h2 { margin: 0 0 14px; }
.dt-chat-conversation { position: relative; display: block; margin-bottom: 8px; padding: 12px; border-radius: 10px; background: #f5f5f5; color: #111; text-decoration: none; }
.dt-chat-conversation.is-active { background: #f4dfad; }
.dt-chat-conversation span,
.dt-chat-conversation time { display: block; margin-top: 4px; font-size: 12px; }
.dt-chat-conversation__preview { overflow: hidden; color: #555; text-overflow: ellipsis; white-space: nowrap; }
.dt-chat-conversation time { color: #777; }

.dt-chat-unread-badge { display: inline-flex !important; width: auto; min-width: 24px; min-height: 22px; align-items: center; justify-content: center; margin-left: auto; padding: 1px 8px; border-radius: 999px; background: #e3ba67; color: #111; font-size: 12px; font-weight: 800; line-height: 20px; }
.dt-chat-unread-badge[hidden] { display: none !important; }
.dt-chat-conversation .dt-chat-unread-badge { position: absolute; top: 9px; right: 9px; margin: 0; }
.dt-client-mobile-navigation__links a:has(.dt-chat-unread-badge) { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.dt-chat-thread__header { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid #eee; padding-bottom: 12px; }
.dt-chat-messages { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; gap: 12px; overflow-y: auto; overscroll-behavior: contain; padding: 18px 4px 18px 0; }
.dt-chat-new-message-indicator { position: absolute; right: 26px; bottom: 154px; z-index: 2; border: 0; border-radius: 999px; padding: 7px 12px; background: #e3ba67; color: #111; font: inherit; font-size: 12px; font-weight: 800; box-shadow: 0 5px 16px rgba(0, 0, 0, .18); cursor: pointer; }
.dt-chat-message { max-width: 82%; padding: 12px 14px; border-radius: 12px; background: #f1f1f1; }
.dt-chat-message--client { align-self: flex-end; background: #f4dfad; }
.dt-chat-message p { margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.dt-chat-message time { font-size: 11px; color: #666; }
.dt-chat-reply { flex: 0 0 auto; border-top: 1px solid #eee; padding-top: 12px; }
.dt-chat-link-button { border: 0; background: none; color: #8a620d; text-decoration: underline; cursor: pointer; }
.dt-chat-empty { color: #666; line-height: 1.5; }

@media (max-width: 900px) {
    .dt-chat-new form { grid-template-columns: 1fr; }
    .dt-chat-new form label,
    .dt-chat-new form label:nth-of-type(2),
    .dt-chat-new input,
    .dt-chat-new textarea,
    .dt-chat-new form > button { grid-column: 1; grid-row: auto; }
    .dt-chat-workspace { grid-template-columns: minmax(200px, 240px) minmax(0, 1fr); }
}

@media (max-width: 700px) {
    .dt-chat-widget { right: 14px; bottom: 14px; }
    .dt-chat-toolbar { justify-content: stretch; }
    .dt-chat-new-toggle { width: 100%; }
    .dt-chat-workspace { display: flex; height: auto; flex-direction: column; }
    .dt-chat-conversations { max-height: 280px; }
    .dt-chat-thread { height: clamp(500px, 72dvh, 640px); }
    .dt-chat-conversations,
    .dt-chat-thread,
    .dt-chat-new { padding: 14px; }
    .dt-chat-message { max-width: 92%; }
    .dt-chat-thread__header { flex-direction: column; }
}
.dt-chat-faq-callout {
    align-items: center;
    background: #f8f2e3;
    border: 1px solid #e3ba67;
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    justify-content: space-between;
    margin: 18px 0;
    padding: 14px 18px;
}

.dt-chat-faq-callout p { margin: 0; }
.dt-chat-faq-callout a { color: #6f5113; font-weight: 800; }
