/* Сообщество (с 2026-10-24): комментарии, альбомы, жалобы. Разметку строит community.js,
   формы и кнопки — community-ui.js. Подключается в самих блоках (страница покупателя, отзывы на
   карточке товара), шаблоны страниц не правятся. Правите файл — поднимите CSS_VER в community.js. */

/* лента комментариев */
.cm-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:14px}
.cm-list:empty{display:none}
.cm{display:flex;gap:10px;align-items:flex-start}
.cm__ava{flex:none;display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;color:#fff;font:700 14px/1 Inter,system-ui,sans-serif}
.cm__ava--shop{background:var(--ink)}
.cm__body{min-width:0;flex:1}
.cm__head{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;font-size:13.5px}
.cm__nick{font-weight:700;color:var(--ink)}
a.cm__nick:hover{color:var(--brand)}
.cm__badge{padding:1px 8px;border-radius:999px;background:var(--brand-50);color:var(--brand);font-size:11.5px;font-weight:700}
.cm__date{color:var(--muted);font-size:12.5px}
.cm__text{margin:3px 0 0;font-size:14.5px;line-height:1.5;white-space:pre-line;overflow-wrap:anywhere}
.cm__acts{display:flex;gap:12px;margin-top:4px}
.cm__acts:empty{display:none}
.cm-act,.cm-report{padding:0;border:0;background:none;color:var(--muted);font:inherit;font-size:12.5px;font-weight:600;cursor:pointer}
.cm-act:hover,.cm-report:hover{color:var(--brand);text-decoration:underline}
.cm-report{font-size:13px}
.cm-empty{margin-bottom:6px}
.cm-note{margin:12px 0 0;font-size:13.5px;color:var(--muted)}
.cm-note a{color:var(--brand);font-weight:600}
.cm-error{margin:8px 0 0;padding:8px 12px;border-radius:8px;background:#FDECEC;color:#B3261E;font-size:13.5px}
.cm-error[hidden]{display:none}

/* форма */
.cm-form{margin-top:14px;display:flex;flex-direction:column;gap:8px}
.cm-form textarea{width:100%;box-sizing:border-box;min-height:64px;padding:10px 12px;border:1.5px solid var(--line);border-radius:10px;font:inherit;font-size:14.5px;resize:vertical;background:#fff}
.cm-form textarea:focus{outline:none;border-color:var(--brand)}
.cm-form__row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.cm-form__hint,.cm-form__shop{font-size:12.5px;color:var(--muted)}
.cm-form__shop{display:flex;align-items:center;gap:6px;font-weight:600;color:var(--ink-2)}
.cm-form__send{height:38px;padding:0 18px;font-size:14px}

/* под отзывом о товаре — свёрнуто */
.pr-item{display:flex;flex-direction:column;gap:8px;min-width:0}
.pr-item .review{flex:1}
.cm-thread--compact{padding:0 4px}
.cm-thread--compact>summary{display:inline-block;cursor:pointer;list-style:none;color:var(--brand);font-size:13.5px;font-weight:600}
.cm-thread--compact>summary::-webkit-details-marker{display:none}
.cm-thread--compact>summary:hover{text-decoration:underline}
.cm-thread--compact[open]>summary{margin-bottom:12px}
.pf-review .cm-thread--compact{margin-top:2px}

/* альбомы на странице покупателя */
.al-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px}
.al{display:flex;flex-direction:column;gap:4px;min-width:0;color:var(--ink)}
.al__cover{display:block;aspect-ratio:1;border-radius:12px;overflow:hidden;background:var(--line-2)}
.al__cover img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .2s}
.al:hover .al__cover img{transform:scale(1.04)}
.al__empty{display:flex;align-items:center;justify-content:center;height:100%;color:var(--muted);font-size:13px}
.al__title{font-weight:700;font-size:14.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.al:hover .al__title{color:var(--brand)}
.al__count{font-size:12.5px;color:var(--muted)}
.al-new{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}
.al-new input{flex:1 1 200px;min-width:0;height:42px;padding:0 14px;border:1.5px solid var(--line);border-radius:10px;font:inherit;font-size:14.5px}
.al-new input:focus{outline:none;border-color:var(--brand)}
.al-new .btn{height:42px;padding:0 18px;font-size:14px}

/* страница альбома */
.al-tools{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.al-tools .btn{height:42px;padding:0 18px;font-size:14px}
.al-upload{cursor:pointer}
.al-upload.is-busy{opacity:.7;pointer-events:none}
.al-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:10px}
.al-tile{position:relative;aspect-ratio:1;border-radius:10px;overflow:hidden;background:var(--line-2)}
.al-tile a,.al-tile img{display:block;width:100%;height:100%}
.al-tile img{object-fit:cover}
.al-tile--off img{opacity:.55}
.al-tile__badge{position:absolute;left:8px;bottom:8px;padding:2px 8px;border-radius:999px;background:rgba(16,20,24,.78);color:#fff;font-size:11.5px;font-weight:700}
.al-tile__badge--bad{background:#B3261E}
.al-tile__del{position:absolute;top:6px;right:6px;width:28px;height:28px;padding:0;border:0;border-radius:50%;background:rgba(16,20,24,.7);color:#fff;font-size:18px;line-height:28px;cursor:pointer}
.al-tile__del:hover{background:var(--hot)}

/* окно жалобы */
.cm-dialog{width:min(440px,calc(100vw - 32px));padding:0;border:0;border-radius:16px;box-shadow:0 20px 60px rgba(0,0,0,.3)}
.cm-dialog::backdrop{background:rgba(16,20,24,.55)}
.cm-dialog__form{position:relative;padding:22px 22px 20px;display:flex;flex-direction:column;gap:12px}
.cm-dialog__title{margin:0;padding-right:28px;font-size:18px}
.cm-dialog__close{position:absolute;top:12px;right:12px;width:32px;height:32px;padding:0;border:0;border-radius:50%;background:var(--bg-alt);font-size:22px;line-height:32px;cursor:pointer}
.cm-dialog__reasons{margin:0;padding:0;border:0;display:flex;flex-direction:column;gap:8px;font-size:14.5px}
.cm-dialog__reasons label{display:flex;gap:8px;align-items:center;cursor:pointer}
.cm-dialog__reasons input{accent-color:var(--brand)}
.cm-dialog textarea{width:100%;box-sizing:border-box;padding:10px 12px;border:1.5px solid var(--line);border-radius:10px;font:inherit;font-size:14px;resize:vertical}
.cm-dialog__row{display:flex;justify-content:flex-end}
.cm-dialog__row .btn{height:42px;padding:0 20px;font-size:14px}
.cm-dialog .cm-note{margin:0}
