/* LCR Product Chat Q&A — стили под дизайн-систему LCUSTOM (Figma + WCAG AA / Bridge-PCA) */

.lcr-qa {
  --qa-bg: #262422;
  --qa-surface: #1C1B1A;
  --qa-accent: #C83E07;
  --qa-accent-text: #FF7A45;
  --qa-success: #72D47F;
  --qa-danger: #FF8A85;
  --qa-muted: #C9C8C8;
  --qa-line: rgba(255, 255, 255, 0.14);

  background: var(--qa-bg);
  border: 1px solid var(--qa-line);
  border-radius: 16px;
  padding: 24px 28px;
  color: #FFFFFF;
  font-family: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.lcr-qa .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lcr-qa__admin-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(200, 62, 7, 0.18);
  border: 1px solid rgba(200, 62, 7, 0.50);
  color: var(--qa-accent-text);
  font-size: 12.5px;
  font-weight: 500;
}

.lcr-qa__admin-banner[hidden] {
  display: none;
}

.lcr-qa__admin-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FF7A45;
  flex-shrink: 0;
}

.lcr-qa__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.lcr-qa__title-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lcr-qa__title {
  margin: 0;
  font-family: 'Geologica', 'Onest', sans-serif;
  font-size: 19px;
  line-height: 1.25;
  font-weight: 700;
  color: #FFFFFF;
}

.lcr-qa__count {
  font-size: 12.5px;
  color: var(--qa-muted);
}

.lcr-qa__sla {
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.lcr-qa__divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.10);
}

.lcr-qa__toast,
.lcr-qa__error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
}

.lcr-qa__toast {
  background: rgba(63, 163, 77, 0.16);
  border: 1px solid rgba(114, 212, 127, 0.45);
  color: #FFFFFF;
}

.lcr-qa__toast-icon {
  color: var(--qa-success);
  font-weight: 700;
}

.lcr-qa__error {
  background: rgba(214, 69, 65, 0.16);
  border: 1px solid rgba(255, 138, 133, 0.5);
  color: var(--qa-danger);
}

.lcr-qa__toast[hidden],
.lcr-qa__error[hidden] {
  display: none;
}

.lcr-qa__list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Пустое состояние */
.lcr-qa__empty {
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.lcr-qa__empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: var(--qa-accent-text);
  font-family: 'Geologica', sans-serif;
  font-size: 20px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lcr-qa__empty-title {
  margin: 0;
  font-family: 'Geologica', sans-serif;
  font-size: 18px;
  color: #FFFFFF;
}

.lcr-qa__empty-desc {
  margin: 0;
  max-width: 440px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--qa-muted);
}

/* Сообщение в ветке Q&A */
.lcr-msg {
  display: flex;
  gap: 12px;
  margin-left: calc(var(--depth, 0) * 18px);
}

.lcr-msg__guide {
  width: 3px;
  border-radius: 2px;
  background: rgba(200, 62, 7, 0.65);
  flex-shrink: 0;
}

.lcr-msg__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lcr-msg__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.lcr-msg__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #3A3632;
  color: #FFFFFF;
  font-family: 'Geologica', sans-serif;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lcr-msg__avatar.is-workshop {
  background: var(--qa-accent);
}

.lcr-msg__author {
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
}

.lcr-msg__badge {
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(200, 62, 7, 0.22);
  border: 1px solid rgba(200, 62, 7, 0.55);
  font-family: 'Unbounded', sans-serif;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #FF7A45;
}

.lcr-msg__time {
  font-size: 12px;
  color: var(--qa-muted);
}

.lcr-msg__status {
  font-size: 12px;
  font-weight: 500;
  color: var(--qa-success);
}

.lcr-msg__quote {
  margin: 0;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 2px solid var(--qa-accent);
  font-size: 12.5px;
  color: var(--qa-muted);
}

.lcr-msg__body {
  font-size: 14.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}

.lcr-msg__body p {
  margin: 0;
}

.lcr-msg__body p + p {
  margin-top: 8px;
}

.lcr-msg__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.lcr-msg__action {
  background: none;
  border: 0;
  padding: 6px 2px;
  min-height: 36px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--qa-muted);
  cursor: pointer;
}

.lcr-msg__action:hover {
  color: #FFFFFF;
}

.lcr-msg__mod--hide {
  color: var(--qa-accent-text);
}

.lcr-msg__mod--spam {
  color: var(--qa-danger);
}

/* Форма вопроса */
.lcr-qa__form {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.lcr-qa__form.is-reply-mode {
  border-color: var(--qa-accent);
}

.lcr-qa__reply-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(200, 62, 7, 0.18);
  border: 1px solid rgba(255, 167, 129, 0.4);
  font-size: 12.5px;
}

.lcr-qa__reply-bar[hidden] {
  display: none;
}

.lcr-qa__reply-label {
  color: var(--qa-accent-text);
  font-weight: 500;
}

.lcr-qa__reply-cancel {
  background: none;
  border: 0;
  padding: 4px 6px;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}

.lcr-qa__form-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lcr-qa__nick-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.lcr-qa__nick-field,
.lcr-qa__nick-admin {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--qa-surface);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 13px;
}

.lcr-qa__nick-field {
  gap: 8px;
  transition: border-color 0.15s ease;
}

.lcr-qa__nick-field:focus-within {
  border-color: var(--qa-accent);
}

.lcr-qa__nick-label {
  font-size: 12.5px;
  color: var(--qa-muted);
  white-space: nowrap;
  cursor: pointer;
}

.lcr-qa__nick-input {
  width: 148px;
  max-width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 13px;
  outline: none;
}

.lcr-qa__nick-input::placeholder {
  color: #B4B2AE;
}

.lcr-qa__nick-admin {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--qa-accent-text);
}

.lcr-qa__nick-field[hidden],
.lcr-qa__nick-admin[hidden] {
  display: none;
}

.lcr-qa__cookie-hint {
  font-size: 12px;
  color: var(--qa-muted);
}

.lcr-qa__textarea-wrap textarea {
  width: 100%;
  min-height: 68px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--qa-surface);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  resize: vertical;
}

.lcr-qa__textarea-wrap textarea::placeholder {
  color: #B4B2AE;
}

.lcr-qa__hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  width: 44px;
  height: 44px;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}

.lcr-qa__hp input {
  width: 44px;
  height: 44px;
}

.lcr-qa__form-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.lcr-qa__tg-notice {
  font-size: 12px;
  color: var(--qa-muted);
}

.lcr-qa__submit {
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 8px;
  border: 0;
  background: var(--qa-accent);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.lcr-qa__submit:hover {
  background: #B63603;
}

.lcr-qa__submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

@media (max-width: 767px) {
  .lcr-qa {
    padding: 18px 16px;
  }

  .lcr-qa__sla {
    display: none;
  }

  .lcr-qa__form-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .lcr-qa__submit {
    width: 100%;
  }

  .lcr-qa__tg-notice {
    text-align: center;
  }

  .lcr-qa__nick-pill {
    min-height: 44px;
    padding: 8px 12px;
  }

  .lcr-msg__action {
    min-height: 44px;
  }
}

.lcr-qa__edit-ico {
  display: inline-block;
  vertical-align: -1px;
  margin-left: 3px;
  opacity: 0.85;
}
