/* Manga Подяки — блок під розділом ({thanks-block}), кнопка, вікно списку. Кольори — зі змінних теми MangaNew (темна / світла) */
.mgthx { --mgthx-accent: #ff4d7d; --mgthx-done: #ff4d7d; position: relative; margin: 6px 0; padding: 16px 18px; border-radius: 16px; text-align: left; white-space: normal;
  background: linear-gradient(135deg, rgba(255, 77, 125, .12) 0%, rgba(127, 127, 127, .06) 60%); box-shadow: inset 0 0 0 1px rgba(255, 77, 125, .18); }
.mgthx-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.mgthx-btn { display: inline-flex; align-items: center; gap: 9px; min-height: 46px; padding: 0 20px 0 16px; border: 0; border-radius: 12px; background: var(--mgthx-accent); color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  box-shadow: 0 10px 22px -12px var(--mgthx-accent); transition: transform .15s ease, filter .15s ease, box-shadow .15s ease, background-color .15s ease; }
.mgthx-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.mgthx-btn:active { transform: scale(.97); }
.mgthx-btn.is-done { background: rgba(255, 77, 125, .12); color: var(--mgthx-done); box-shadow: inset 0 0 0 2px var(--mgthx-done); }
.mgthx-btn.is-done:hover .mgthx-txt::after { content: ' · прибрати'; opacity: .7; font-weight: 500; }
.mgthx-btn.is-busy { opacity: .6; pointer-events: none; }
.mgthx-btn[disabled] { cursor: default; }
.mgthx-ico { display: inline-grid; place-items: center; width: 22px; height: 22px; font-size: 17px; line-height: 1; }
.mgthx-btn.is-done .mgthx-ico { animation: mgthx-pop .35s ease; }
@keyframes mgthx-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
.mgthx-total { display: inline-flex; align-items: baseline; gap: 6px; margin-left: auto; }
.mgthx-count { font-family: var(--font-head, inherit); font-size: 26px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text, inherit); }
.mgthx-word { color: var(--muted, inherit); font-size: 14px; font-weight: 600; opacity: .9; }
.mgthx-note { color: var(--muted, inherit); font-size: 14px; font-weight: 600; }
.mgthx-who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(127, 127, 127, .16); font-size: 13px; line-height: 1.5; color: var(--muted, inherit); }
.mgthx-faces { display: inline-flex; flex: none; padding-left: 8px; }
.mgthx-face { display: block; width: 30px; height: 30px; margin-left: -8px; border-radius: 50%; overflow: hidden; background: var(--surface-2, #2a2e37); box-shadow: 0 0 0 2px var(--surface, #1a1d23); transition: transform .15s ease; }
.mgthx-face:hover { transform: translateY(-2px); z-index: 1; }
.mgthx-face img { width: 100%; height: 100%; object-fit: cover; }
.mgthx-users { flex: 1 1 200px; min-width: 0; }
.mgthx-user { color: var(--text, inherit); font-weight: 700; text-decoration: none; }
.mgthx-user:hover { color: var(--mgthx-accent); }
.mgthx-more { color: var(--text, inherit); font-weight: 600; }
.mgthx-empty { color: var(--muted, inherit); }
.mgthx-all { flex: none; margin-left: auto; color: var(--mgthx-accent); font-weight: 700; white-space: nowrap; text-decoration: none; }
.mgthx-all:hover { text-decoration: underline; }
@media (max-width: 560px) {
  .mgthx { padding: 14px; }
  .mgthx-btn { flex: 1 1 auto; justify-content: center; }
  .mgthx-total { margin-left: 0; }
  .mgthx-all { margin-left: 0; }
}

.mgthx-toast { position: fixed; left: 50%; bottom: 24px; z-index: 100000; transform: translate(-50%, 20px); padding: 10px 16px; border-radius: 10px; background: #1f232c; color: #fff; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.3); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.mgthx-toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.mgthx-toast.is-error { background: #b3261e; }

.mgthx-dialog { width: min(560px, calc(100vw - 32px)); max-height: min(70vh, 640px); padding: 0; border: 1px solid var(--line, transparent); border-radius: 14px;
  background: var(--surface, #fff); color: var(--text, #1b2230); box-shadow: 0 20px 60px rgba(0,0,0,.45); color-scheme: dark; }   /* кольори теми MangaNew (темна / світла) */
[data-theme="light"] .mgthx-dialog { color-scheme: light; box-shadow: 0 20px 60px rgba(15,23,42,.25); }
.mgthx-dialog-list a { color: var(--text, inherit); font-weight: 600; text-decoration: none; }
.mgthx-dialog-list a:hover { color: var(--mgthx-accent, #ff4d7d); }
.mgthx-dialog-list .mgthx-sep { color: var(--muted, inherit); }
.mgthx-dialog::backdrop { background: rgba(0,0,0,.55); }
.mgthx-dialog-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: inherit; border-bottom: 1px solid rgba(127,127,127,.2); }
.mgthx-dialog-title { margin: 0; font-size: 16px; }
.mgthx-close { width: 36px; height: 36px; border: 0; border-radius: 8px; background: var(--surface-2, rgba(127,127,127,.15)); color: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.mgthx-dialog-list { padding: 14px 16px; font-size: 14px; line-height: 1.8; }
.mgthx-loadmore[hidden] { display: none; }   /* інакше display:block нижче перебиває атрибут hidden і кнопка не зникає */
.mgthx-loadmore { display: block; width: calc(100% - 32px); margin: 0 16px 16px; min-height: 40px; border: 0; border-radius: 10px; background: var(--surface-2, rgba(127,127,127,.15)); color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
