.xcraft-project-chat{margin-top:20px;border:1px solid rgba(15,23,42,.12);border-radius:16px;background:var(--bs-body-bg,#fff);overflow:hidden}.xcraft-project-chat__head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:18px 20px;border-bottom:1px solid rgba(15,23,42,.1)}.xcraft-project-chat__head h2{margin:0;font-size:18px;font-weight:700}.xcraft-project-chat__head p{margin:4px 0 0;font-size:13px;opacity:.65}.xcraft-project-chat__status{padding:10px 20px;font-size:13px;opacity:.7}.xcraft-project-chat__status:empty{display:none}.xcraft-project-chat__messages{height:min(52vh,520px);min-height:280px;overflow:auto;padding:18px;background:rgba(148,163,184,.08);display:flex;flex-direction:column;gap:12px}.xcraft-project-chat__empty{margin:auto;text-align:center;opacity:.6;font-size:14px}.xcraft-project-chat__message{display:flex;flex-direction:column;align-items:flex-start;max-width:min(78%,720px)}.xcraft-project-chat__message.is-own{align-self:flex-end;align-items:flex-end}.xcraft-project-chat__meta{display:flex;gap:8px;align-items:center;margin:0 4px 4px;font-size:11px;opacity:.65}.xcraft-project-chat__bubble{max-width:100%;padding:10px 12px;border-radius:14px;background:var(--bs-body-bg,#fff);box-shadow:0 1px 3px rgba(15,23,42,.08);overflow-wrap:anywhere}.xcraft-project-chat__message.is-own .xcraft-project-chat__bubble{background:rgba(37,99,235,.1)}.xcraft-project-chat__text{white-space:pre-wrap;font-size:14px;line-height:1.45}.xcraft-project-chat__media{margin-top:8px;max-width:100%}.xcraft-project-chat__media:first-child{margin-top:0}.xcraft-project-chat__media img,.xcraft-project-chat__media video{display:block;max-width:min(100%,460px);max-height:360px;border-radius:10px;object-fit:contain}.xcraft-project-chat__media audio{display:block;max-width:100%;width:320px}.xcraft-project-chat__file{display:flex;align-items:center;gap:10px;min-width:220px;padding:8px 10px;border:1px solid rgba(15,23,42,.12);border-radius:10px;text-decoration:none;color:inherit}.xcraft-project-chat__file-copy{min-width:0}.xcraft-project-chat__file-copy strong,.xcraft-project-chat__file-copy span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.xcraft-project-chat__file-copy span{font-size:11px;opacity:.65;margin-top:2px}.xcraft-project-chat__composer{padding:12px 14px;border-top:1px solid rgba(15,23,42,.1);background:var(--bs-body-bg,#fff)}.xcraft-project-chat__selected{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 8px;padding:7px 10px;border-radius:10px;background:rgba(148,163,184,.12);font-size:12px}.xcraft-project-chat__selected[hidden]{display:none}.xcraft-project-chat__selected-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.xcraft-project-chat__selected button{border:0;background:transparent;font:inherit;cursor:pointer;opacity:.7}.xcraft-project-chat__row{display:flex;align-items:flex-end;gap:8px}.xcraft-project-chat__action{flex:0 0 auto;min-width:40px;height:40px;border:1px solid rgba(15,23,42,.15);border-radius:10px;background:transparent;color:inherit;cursor:pointer;font:inherit}.xcraft-project-chat__action:hover{background:rgba(148,163,184,.12)}.xcraft-project-chat__action.is-recording{outline:2px solid currentColor;outline-offset:2px}.xcraft-project-chat__input{flex:1;min-height:40px;max-height:120px;resize:vertical;border:1px solid rgba(15,23,42,.16);border-radius:10px;padding:9px 11px;font:inherit;line-height:1.35;background:var(--bs-body-bg,#fff);color:inherit}.xcraft-project-chat__send{flex:0 0 auto;height:40px;padding:0 16px;border:0;border-radius:10px;background:var(--bs-primary,#0d6efd);color:#fff;font:inherit;font-weight:600;cursor:pointer}.xcraft-project-chat__send:disabled,.xcraft-project-chat__action:disabled{cursor:not-allowed;opacity:.5}@media(max-width:720px){.xcraft-project-chat__messages{height:48vh;min-height:260px;padding:12px}.xcraft-project-chat__message{max-width:88%}.xcraft-project-chat__head{padding:14px}.xcraft-project-chat__composer{padding:10px}.xcraft-project-chat__send{padding:0 12px}}
/* Shared project-chat attachment dialogs use the application's overlay controls. */
.xcraft-chat-file-overlay{z-index:100010!important}
.xcraft-chat-file-dialog{width:min(640px,95vw);max-height:92vh;display:flex;flex-direction:column}
.xcraft-chat-file-dialog.is-viewer{width:min(1200px,96vw);height:90vh}
.xcraft-chat-file-dialog .address-edit-header,.xcraft-chat-file-dialog .address-edit-footer{flex-shrink:0}
.xcraft-chat-file-dialog .address-edit-header>div{min-width:0}
.xcraft-chat-file-dialog .address-edit-title{overflow-wrap:anywhere}
.xcraft-chat-file-body{min-height:0;overflow:auto}
.is-viewer .xcraft-chat-file-body{flex:1;display:flex;flex-direction:column;padding:0;position:relative}
.xcraft-chat-file-body .xcraft-pdf-reader{flex:1;min-height:0}
.xcraft-chat-file-error{color:var(--bs-danger,#b91c1c);white-space:pre-wrap;overflow-wrap:anywhere}
.xcraft-chat-file-error:empty{display:none}
.xcraft-chat-file-field{display:flex;flex-direction:column;gap:8px;margin:16px 0}
.xcraft-chat-photo-tools{display:flex;flex-wrap:wrap;gap:8px;padding:10px}
.xcraft-chat-photo-viewport{flex:1;min-height:0;overflow:auto;display:grid;place-items:center;padding:30px}
.xcraft-chat-photo{max-width:100%;max-height:60vh;object-fit:contain;transform-origin:center}
.xcraft-chat-file-dialog .address-edit-footer{flex-wrap:wrap;gap:8px}
button.xcraft-project-chat__file{font:inherit;text-align:left;cursor:pointer;color:inherit;max-width:100%}
.xcraft-project-chat__image-open{border:0;background:transparent;padding:0;cursor:zoom-in}

/* Save-as folder navigation: tree, current directory, path and inline creation. */
.xcraft-chat-file-dialog.is-folder-picker{width:min(900px,96vw)}
.xcraft-folder-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.xcraft-folder-path{flex:1;min-width:160px;display:flex;align-items:center;gap:4px;flex-wrap:wrap;border:1px solid rgba(148,163,184,.35);border-radius:8px;padding:5px}
.xcraft-folder-crumb{border:0;background:transparent;color:inherit;padding:4px;display:flex;align-items:center;gap:4px;font:inherit;cursor:pointer;overflow-wrap:anywhere;text-align:left}
.xcraft-folder-crumb .xcraft-folder-icon{width:18px;height:18px}
.xcraft-folder-explorer{display:grid;grid-template-columns:minmax(180px,30%) minmax(0,1fr);height:340px;max-height:45vh;border:1px solid rgba(148,163,184,.35);border-radius:10px;overflow:hidden}
.xcraft-folder-tree{overflow:auto;padding:8px;border-right:1px solid rgba(148,163,184,.35);background:rgba(148,163,184,.06)}
.xcraft-folder-tree-item{border:0;background:transparent;color:inherit;font:inherit;display:flex;align-items:center;gap:7px;padding:7px 8px;border-radius:6px;text-align:left;cursor:pointer;max-width:100%}
.xcraft-folder-tree-item>span:last-child{overflow-wrap:anywhere;min-width:0}
.xcraft-folder-tree-item.is-current,.xcraft-folder-crumb.is-current{background:rgba(37,99,235,.12);font-weight:600}
.xcraft-folder-tree-children{padding-left:17px}
.xcraft-folder-tree summary{display:list-item;cursor:pointer;margin-left:14px}
.xcraft-folder-tree summary>.xcraft-folder-tree-item{display:inline-flex;vertical-align:middle;max-width:calc(100% - 10px)}
.xcraft-folder-list{overflow:auto;padding:12px;display:flex;flex-direction:column;gap:4px;align-items:stretch}
.xcraft-folder-entry{display:flex;align-items:center;gap:10px;padding:10px;border:0;border-radius:7px;background:transparent;color:inherit;text-align:left;font:inherit;cursor:pointer;overflow-wrap:anywhere}
.xcraft-folder-icon{width:20px;height:16px;flex-shrink:0;stroke:#063f6c;fill:none;stroke-width:1.5;stroke-linejoin:round;stroke-linecap:round}
.xcraft-folder-icon.is-root{stroke:#063f6c;fill:none}
.xcraft-folder-entry:hover,.xcraft-folder-tree-item:hover,.xcraft-folder-crumb:hover{background:rgba(148,163,184,.14)}
.xcraft-folder-empty{margin:auto;text-align:center;opacity:.65;padding:16px}
.xcraft-folder-destination{margin-top:12px;font-size:13px;overflow-wrap:anywhere}
.xcraft-folder-filename{margin-top:10px;overflow-wrap:anywhere}
.xcraft-folder-create{display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap;padding:12px;margin-bottom:12px;border-radius:8px;background:rgba(148,163,184,.1)}
.xcraft-folder-create[hidden]{display:none}
.xcraft-folder-create .xcraft-chat-file-field{flex:1;min-width:160px;margin:0}
.xcraft-folder-explorer button:disabled,.xcraft-folder-path button:disabled{cursor:default;opacity:.65}
@media(max-width:600px){.xcraft-folder-explorer{grid-template-columns:minmax(120px,40%) minmax(0,1fr);height:300px}.xcraft-folder-toolbar>.address-edit-button{font-size:12px;padding:7px}.xcraft-folder-path{order:3;flex-basis:100%}.xcraft-folder-tree{padding:4px}.xcraft-folder-tree-children{padding-left:10px}}

/* Multiline message field with the shared address editor control styling. */
.xcraft-chat-file-dialog .address-edit-field textarea.xcraft-chat-message-input{height:auto!important;min-height:96px!important;max-height:40vh!important;resize:vertical}

/* Einheitliche Eingaben und Aktionsfarben für den Projektchat. */
.xcraft-project-chat__search{position:relative;display:block;padding:12px 16px 4px;margin:0}
.xcraft-project-chat__search>svg{position:absolute;left:26px;top:calc(50% + 4px);transform:translateY(-50%);width:16px;height:16px;fill:none;stroke:#64748b;stroke-width:1.8;stroke-linecap:round;pointer-events:none}
.xcraft-project-chat__search input.address-edit-control{padding-left:32px!important}
.xcraft-project-chat__search-result{padding:0 16px 8px;font-size:12px;color:#64748b}
.xcraft-project-chat__search-result:empty{display:none}
.xcraft-project-chat textarea.xcraft-project-chat__input{min-width:0;min-height:28px!important;height:28px;max-height:none!important;resize:none;overflow-y:hidden;box-sizing:border-box;border:1px solid var(--color-border,#d5dee8)!important;border-radius:2px!important;background:#fafafa!important;box-shadow:none!important;outline:none!important}
.xcraft-project-chat textarea.xcraft-project-chat__input:focus{border-color:var(--color-primary,#063f6c)!important;background:#fff!important;box-shadow:none!important;outline:none!important}
.xcraft-project-chat .xcraft-project-chat__action{display:inline-flex;align-items:center;justify-content:center;color:#063f6c;background:#fff;border-radius:6px;min-width:40px;padding:8px}
.xcraft-project-chat__action svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.xcraft-project-chat .xcraft-project-chat__action.is-recording{color:#b91c1c;background:#fee2e2}
.xcraft-project-chat .xcraft-project-chat__send{background:#063f6c!important;color:#fff!important;border-radius:6px}
.xcraft-project-chat .xcraft-project-chat__send:hover{background:#0a527f!important}
.xcraft-chat-attachment-sources{display:flex;gap:10px;flex-wrap:wrap;padding:10px 0}
.xcraft-chat-file-choices{display:flex;flex-direction:column;gap:4px;min-height:180px;max-height:50vh;overflow:auto;margin-top:12px}
.xcraft-chat-file-choice span{min-width:0;overflow-wrap:anywhere}
@media(max-width:480px){.xcraft-project-chat__row{flex-wrap:wrap}.xcraft-project-chat .xcraft-project-chat__input{flex:1 1 calc(100% - 56px)}.xcraft-project-chat__send{margin-left:auto}}

/* Leere Nachrichtenzeile und ihre Aktionen haben die Standardhöhe. */
.xcraft-project-chat .xcraft-project-chat__action,
.xcraft-project-chat .xcraft-project-chat__send{box-sizing:border-box;height:28px!important;min-height:28px!important;max-height:28px!important;line-height:20px;padding:3px 10px!important}
.xcraft-project-chat .xcraft-project-chat__action{width:28px;min-width:28px;flex:0 0 28px;padding:3px!important}
.xcraft-project-chat__action svg{width:18px;height:18px}

/* Eingabefeld und Aktionen bündig an derselben Oberkante ausrichten. */
.xcraft-project-chat .xcraft-project-chat__row{align-items:flex-start!important}
.xcraft-project-chat .xcraft-project-chat__row>.xcraft-project-chat__input,
.xcraft-project-chat .xcraft-project-chat__row>.xcraft-project-chat__action,
.xcraft-project-chat .xcraft-project-chat__row>.xcraft-project-chat__send{margin-top:0!important;margin-bottom:0!important;align-self:flex-start!important;vertical-align:top}
.xcraft-project-chat .xcraft-project-chat__row>textarea.xcraft-project-chat__input{display:block}
