/* ticket-attachments.css - [8 nov 2026] Bilagor i ärenden (kontaktformulär, ärendesida, admin).
   Används av platinumAttachHtml() och platinumAttachInputHtml() i front-ticket-attachment-functions.php. */

/* ---- Visade bilagor ---- */
.att-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.att-item { display: block; border-radius: 10px; overflow: hidden; border: 1px solid rgba(0, 0, 0, 0.08); background: #f8fafc; }
.att-image { width: 140px; height: 105px; }
.att-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.15s ease; }
.att-image:hover img { transform: scale(1.04); }
.att-video { width: 100%; max-width: 420px; }
.att-video video { width: 100%; max-height: 300px; display: block; background: #000; }
.att-caption { display: block; padding: 6px 10px; font-size: 13px; color: #334155; text-decoration: none; word-break: break-all; }
.att-caption span, .att-file-size { color: #64748b; white-space: nowrap; }
.att-file { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 14px; color: #1c1c1e; text-decoration: none; max-width: 100%; }
.att-file i { color: #c41e3a; font-size: 18px; }
.att-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.att-file:hover, .att-caption:hover { background: #f1f5f9; }

/* ---- Filfältet ---- */
.att-input { margin: 14px 0; }
.att-input input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.att-input .att-drop { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 14px 16px; border: 1.5px dashed #cbd5e1; border-radius: 10px; cursor: pointer; color: #1c1c1e; font-weight: 600; background: #fafafa; transition: border-color 0.15s ease, background 0.15s ease; }
.att-input .att-drop { margin: 0; font-size: 15px; }
.att-drop i { color: #c41e3a; }
.att-input .att-drop small { display: block; flex-basis: 100%; width: 100%; font-weight: 400; font-size: 12px; line-height: 1.5; color: #64748b; }
.att-drop:hover, .att-input.att-dragover .att-drop { border-color: #c41e3a; background: #fff5f6; }
.att-input input[type="file"]:focus-visible + .att-chosen, .att-input input[type="file"]:focus + .att-chosen { outline: none; }
.att-input:focus-within .att-drop { border-color: #c41e3a; }
.att-chosen { list-style: none; margin: 8px 0 0; padding: 0; }
.att-chosen li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; margin-top: 6px; border-radius: 8px; background: #f1f5f9; font-size: 14px; }
.att-chosen li span.att-n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-chosen li span.att-s { color: #64748b; white-space: nowrap; }
.att-chosen li button { border: 0; background: transparent; color: #64748b; cursor: pointer; font-size: 18px; line-height: 1; padding: 0 4px; }
.att-chosen li button:hover { color: #c41e3a; }
.att-error { margin: 8px 0 0; color: #b91c1c; font-size: 14px; }
