/* Ảnh & file đính kèm — trang chi tiết */
.sl-att { margin: 28px 0 8px; display: grid; gap: 24px; }
.sl-att__title { font-size: 1.05rem; margin: 0 0 12px; display: flex; align-items: center; gap: 6px; }
.sl-att__title span { color: #64748b; font-weight: 500; font-size: .9em; }

.sl-att-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.sl-att-gallery__item { display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #f1f5f9; }
.sl-att-gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.sl-att-gallery__item:hover img { transform: scale(1.05); }

.sl-att-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sl-att-files__item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; }
.sl-att-files__icon { font-size: 1.6rem; line-height: 1; }
.sl-att-files__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sl-att-files__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-att-files__meta { font-size: 12px; color: #64748b; }
.sl-att-files__btn { flex-shrink: 0; padding: 7px 14px; border-radius: 999px; background: #0f766e; color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; }
.sl-att-files__btn:hover { background: #115e59; color: #fff; }

/* Liên kết file chèn trong nội dung bài (nút 📎 trong Biên tập tin) */
a.sl-file-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; margin: 3px 0; border: 1px solid #99d5d6; border-radius: 999px; background: #eefafa; color: #0f766e; font-weight: 600; font-size: .95em; text-decoration: none; transition: background .2s, border-color .2s; }
a.sl-file-link::after { content: '⬇'; font-size: .85em; opacity: .75; }
a.sl-file-link:hover { background: #d4f0f0; border-color: #55cbcd; color: #115e59; }

/* Lightbox */
.sl-lightbox { position: fixed; inset: 0; z-index: 99999; background: rgba(15, 23, 42, .92); display: flex; align-items: center; justify-content: center; }
.sl-lightbox[hidden] { display: none; }
.sl-lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.sl-lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 999px; width: 44px; height: 44px; font-size: 24px; cursor: pointer; }
.sl-lightbox button:hover { background: rgba(255,255,255,.25); }
.sl-lightbox button[hidden] { display: none; }
.sl-lightbox__close { top: 16px; right: 16px; }
.sl-lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.sl-lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }
.sl-lightbox__count { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); color: #cbd5e1; font-size: 13px; }

/* Ô upload trong form gửi bài */
.sl-att-upload__btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1.5px dashed #94a3b8; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 14px; background: #f8fafc; }
.sl-att-upload__btn:hover { border-color: #0f766e; color: #0f766e; }
.sl-att-upload__hint { font-size: 12px; color: #64748b; margin: 6px 0 0; }
.sl-att-upload__list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.sl-att-upload__list--image { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.sl-att-upload__item { position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 30px 6px 8px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; font-size: 13px; }
.sl-att-upload__list--image .sl-att-upload__item { padding: 0; aspect-ratio: 1; overflow: hidden; }
.sl-att-upload__list--image .sl-att-upload__name { display: none; }
.sl-att-upload__item img { width: 100%; height: 100%; object-fit: cover; }
.sl-att-upload__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-att-upload__remove { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 999px; border: 0; background: rgba(15,23,42,.7); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; }
.sl-att-upload__remove:hover { background: #dc2626; }
