/* ==========================================================================
   SezTube :: module/comment  (önek: cm-)
   Yorum bölümü: form, liste, yanıtlar. Sadece core.css değişkenlerine bağlıdır.
   ========================================================================== */

.cm-wrap { display: flex; flex-direction: column; gap: 18px; }
.cm-head { display: flex; align-items: center; justify-content: space-between; }
.cm-title { font-size: 17px; font-weight: 740; letter-spacing: -.01em; }

/* ---------- Form ---------- */
.cm-form { display: flex; align-items: flex-start; gap: 12px; }
.cm-form__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.cm-input {
  display: block; width: 100%; min-height: 44px; max-height: 220px; padding: 11px 14px; resize: none; overflow-y: auto;
  border-radius: 16px; border: 1px solid var(--st-border-strong); background: var(--st-surface-2); color: var(--st-text);
  font-size: 16px; line-height: 1.45; outline: 0; -webkit-appearance: none; appearance: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.cm-input::placeholder { color: var(--st-text-3); }
.cm-input:hover { border-color: rgba(139, 108, 255, .4); }
.cm-input:focus { border-color: var(--st-accent); box-shadow: var(--st-ring); background: var(--st-surface); }

.cm-form__row { display: none; align-items: center; justify-content: flex-end; gap: 8px; }
.cm-form:focus-within .cm-form__row, .cm-form.is-filled .cm-form__row, .cm-form--reply .cm-form__row { display: flex; }
.cm-count { margin-right: auto; font-size: 12px; color: var(--st-text-3); font-variant-numeric: tabular-nums; }
.cm-count:empty { display: none; }

.cm-login {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px;
  background: var(--st-surface-2); border: 1px dashed var(--st-border-strong); color: var(--st-text-2); font-size: 14px;
  transition: border-color .2s, background .2s;
}
.cm-login:hover { border-color: var(--st-accent); background: var(--st-accent-soft); }
.cm-login .st-icon { color: var(--st-accent); }
.cm-login b { color: var(--st-text); }

/* ---------- Liste ---------- */
.cm-list, .cm-sub { display: flex; flex-direction: column; gap: 18px; }
.cm-sub { gap: 14px; margin-top: 12px; }

.cm-item { display: flex; align-items: flex-start; gap: 12px; animation: cm-in .4s var(--st-ease) both; }
.cm-item--sub { gap: 10px; }
.cm-item.is-removing { animation: cm-out .25s var(--st-ease) forwards; }
.cm-avatar { flex: none; padding-top: 1px; }
.cm-body { flex: 1; min-width: 0; }

.cm-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: 12.5px; color: var(--st-text-3); }
.cm-name { font-size: 13.5px; font-weight: 680; color: var(--st-text); }
.cm-badge { padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff; background: var(--st-grad); }
.cm-dot { opacity: .6; }
.cm-text { margin-top: 3px; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.cm-text a { color: var(--st-accent); }
.cm-text a:hover { text-decoration: underline; }

.cm-actions { display: flex; align-items: center; gap: 4px; margin: 6px 0 0 -8px; }
.cm-link {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 650; color: var(--st-text-2); transition: background .2s, color .2s, transform .15s var(--st-ease);
}
.cm-link:hover { background: var(--st-surface-2); color: var(--st-text); }
.cm-link:active { transform: scale(.95); }
.cm-link--danger:hover { background: rgba(255, 90, 115, .13); color: var(--st-danger); }

.cm-replybox { margin-top: 8px; }
.cm-replybox:empty { display: none; }

.cm-toggle {
  display: inline-flex; align-items: center; gap: 4px; height: 34px; margin: 4px 0 0 -8px; padding: 0 12px 0 8px; border-radius: 999px;
  font-size: 13px; font-weight: 700; color: var(--st-accent); transition: background .2s;
}
.cm-toggle:hover { background: var(--st-accent-soft); }
.cm-toggle .st-icon { transition: transform .3s var(--st-ease); }
.cm-toggle[aria-expanded="true"] .st-icon { transform: rotate(180deg); }

.cm-more--sub { margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--st-accent); }
.cm-more--sub:hover { text-decoration: underline; }
.cm-morebox { display: flex; justify-content: center; padding: 4px 0 8px; }

.cm-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 12px; text-align: center; font-size: 14px; color: var(--st-text-3); }
.cm-empty .st-icon { color: var(--st-text-3); opacity: .7; }

@keyframes cm-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes cm-out { to { opacity: 0; transform: translateX(-14px); } }
