/* Development Tracker chat widget. Everything is scoped under .dt-chat. */
.dt-chat {
    --dt-accent: #5b47fb;          /* close to the Azia template's indigo */
    --dt-ink: #1c273c;
    --dt-muted: #7987a1;
    --dt-line: #e3e7ed;
    --dt-bot: #f4f5f8;
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 2000;                 /* above the map (1) and map buttons (999) */
    font-family: inherit;
    color: var(--dt-ink);
}

.dt-chat-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    background: var(--dt-accent);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(28, 39, 60, .25);
    cursor: pointer;
}
.dt-chat-toggle i { font-size: 20px; line-height: 1; }
.dt-chat.open .dt-chat-toggle { display: none; }

.dt-chat-panel {
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 560px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--dt-line);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(28, 39, 60, .2);
    overflow: hidden;
}
.dt-chat-panel[hidden] { display: none; }

.dt-chat-panel header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--dt-line);
    font-size: 14px;
}
.dt-chat-panel header button {
    border: 1px solid var(--dt-line);
    background: #fff;
    border-radius: 6px;
    padding: 2px 8px;
    margin-left: 4px;
    cursor: pointer;
    font-size: 13px;
}

.dt-chat-log {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dt-msg {
    max-width: 90%;
    padding: 8px 11px;
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}
.dt-msg p { margin: 0 0 6px; }
.dt-msg p:last-child { margin: 0; }
.dt-msg ul { margin: 4px 0; padding-left: 18px; }
.dt-msg.user { align-self: flex-end; background: var(--dt-accent); color: #fff; border-bottom-right-radius: 3px; }
.dt-msg.bot { align-self: flex-start; background: var(--dt-bot); border-bottom-left-radius: 3px; }
.dt-msg.tool {
    align-self: flex-start;
    padding: 2px 10px;
    font-size: 12px;
    color: var(--dt-muted);
    border: 1px dashed var(--dt-line);
    border-radius: 999px;
}
.dt-msg.tool::before { content: "\2713  "; }
.dt-msg.error { align-self: stretch; background: #fdecec; color: #8a1c1c; font-size: 13px; }

.dt-dots { display: inline-flex; gap: 4px; }
.dt-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--dt-muted); animation: dt-blink 1s infinite; }
.dt-dots i:nth-child(2) { animation-delay: .15s; }
.dt-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dt-blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }

.dt-chat-suggestions { display: flex; gap: 6px; padding: 0 12px 8px; overflow-x: auto; }
.dt-chat-suggestions button {
    flex: none;
    border: 1px solid var(--dt-line);
    background: #fff;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    white-space: nowrap;
    cursor: pointer;
}
.dt-chat-suggestions button:hover { border-color: var(--dt-accent); color: var(--dt-accent); }

.dt-chat-form { display: flex; gap: 8px; padding: 10px 12px 4px; border-top: 1px solid var(--dt-line); }
.dt-chat-form textarea {
    flex: 1;
    resize: none;
    border: 1px solid var(--dt-line);
    border-radius: 8px;
    padding: 7px 9px;
    font: inherit;
    font-size: 13.5px;
}
.dt-chat-form textarea:focus { outline: 2px solid var(--dt-accent); outline-offset: -1px; }
.dt-chat-form button {
    border: 0;
    background: var(--dt-accent);
    color: #fff;
    border-radius: 8px;
    padding: 0 14px;
    font-weight: 600;
    cursor: pointer;
}
.dt-chat-form button:disabled { opacity: .5; cursor: wait; }
.dt-chat-note { margin: 0; padding: 0 12px 8px; font-size: 11px; color: var(--dt-muted); }

/* Keep the widget out of PDF exports made with html2canvas/html2pdf. */
@media print { .dt-chat { display: none; } }
