/* Attachments block: tiles with a preview, a drop zone, icon actions and a legend. */

.att { display: flex; flex-direction: column; gap: 10px; }
.att__head { display: flex; align-items: center; gap: 10px; }
.att__title { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--color-text-muted); }
.att__empty { color: var(--color-text-muted); font-size: 13px; padding: 6px 0; }

.att__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }

.att-ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.att-tile { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--color-border); border-radius: 8px; overflow: hidden; background: var(--color-bg-surface); }
.att-tile__pv { height: 92px; display: flex; align-items: center; justify-content: center; background: var(--color-bg-subtle); color: var(--color-text-muted); text-decoration: none; }
.att-tile__pv .att-ic { width: 34px; height: 34px; stroke-width: 1.3; }
.att-tile__pv--img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-tile__pv--pdf { color: #d93025; }
.att-tile__pv--model { color: #0d9488; }
.att-tile__meta { padding: 6px 8px 6px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.att-tile__name { font-size: 13px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.att-tile__sub { font-size: 11.5px; color: var(--color-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-tile__acts { display: flex; gap: 4px; margin-top: 3px; }
.att-inh { font-style: italic; }

.att-src { display: inline-flex; align-items: center; gap: 3px; padding: 0 5px; border-radius: 3px; border: 1px solid color-mix(in srgb, #0d9488 45%, transparent); color: #0d9488; }
.att-src .att-ic { width: 12px; height: 12px; }

.att-btn { width: 26px; height: 26px; border-radius: 6px; border: 0; background: transparent; color: var(--color-text-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; text-decoration: none; }
.att-btn:hover { background: var(--color-bg-hover); color: var(--color-accent); }
.att-btn--del { color: var(--color-danger); }
.att-btn--del:hover { color: var(--color-danger); background: color-mix(in srgb, var(--color-danger) 12%, transparent); }
.att-btn--add { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--color-accent); color: var(--color-accent); }

.att-drop { min-height: 92px; border: 1.5px dashed var(--color-border); border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px; text-align: center; font-size: 12.5px; color: var(--color-text-muted); cursor: pointer; }
.att-drop.is-over { border-color: var(--color-accent); color: var(--color-accent); background: color-mix(in srgb, var(--color-accent) 8%, transparent); }

.att-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; color: var(--color-text-muted); }
.att-legend span { display: inline-flex; align-items: center; gap: 5px; }
.att-legend .att-ic { width: 14px; height: 14px; }
.att-legend__del .att-ic { color: var(--color-danger); }
.att-legend__add .att-ic { color: var(--color-accent); }

.att-menu { position: fixed; z-index: 30000; min-width: 200px; max-width: min(360px, calc(100vw - 16px)); max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; padding: 4px; border-radius: 8px; border: 1px solid var(--color-border); background: var(--color-bg-surface); box-shadow: 0 18px 44px -18px rgba(16, 36, 48, .45); }
.att-menu__item { text-align: left; border: 0; background: transparent; color: inherit; padding: 6px 10px; border-radius: 6px; font-size: 13px; cursor: pointer; white-space: normal; }
.att-menu__item:hover { background: var(--color-bg-hover); }
.att-menu__item.is-current { font-weight: 600; color: var(--color-accent); }

.task-foot .card-action-icon.att-clip { display: inline-flex; align-items: center; gap: 3px; width: auto; padding: 0 6px; color: #0d9488; font-size: 12px; }
.att-modal-body { min-width: min(560px, 80vw); }
.ot-files__body { padding: 12px 16px; overflow-y: auto; }
