/* Карточка в главных настройках + модалка контроля отклонений */

/* Поверх #settingsModal (z-index: 3000) */
#feedQualitySettingsModal.modal.wesp-shell-modal {
  z-index: 3100;
}

.modal.wesp-shell-modal .modal-dialog.modal-dialog--shell-fq {
  max-width: min(760px, calc(100vw - 1rem));
}

#feedQualitySettingsModal .modal-content.fq-settings-modal__content {
  max-height: min(94vh, 900px);
  display: flex;
  flex-direction: column;
}

#feedQualitySettingsModal .wesp-shell-bsmodal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: min(calc(94vh - 8rem), 760px);
}

#feedQualitySettingsModal .wesp-shell-bsmodal-actions {
  flex-shrink: 0;
  margin-top: 0;
  padding-top: 12px;
  border-top: 1px solid var(--border-light, #e2e8f0);
}

.settings-feed-quality-card {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  border: 1px solid #e2e8f0;
}

.settings-feed-quality-card--clickable {
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-feed-quality-card--clickable:hover {
  background: rgba(var(--primary-rgb), 0.05);
  border-color: var(--primary-color, #2196f3);
}

.settings-feed-quality-card .settings-card-title {
  margin: 0;
  justify-content: center;
  position: relative;
}

.settings-feed-quality-card .settings-card-title > i:first-child {
  position: absolute;
  left: 0;
}

.settings-feed-quality-card .settings-card-title .settings-chevron {
  position: absolute;
  right: 0;
}

.fq-settings-modal .fq-settings-section {
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
  background: var(--bg-light, #f8fafc);
}

.fq-settings-modal .fq-settings-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.fq-settings-modal .fq-settings-section__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark, #1e293b);
}

.fq-settings-modal .fq-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem 1rem;
}

.fq-settings-modal .fq-settings-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted, #64748b);
  margin-bottom: 0.25rem;
}

.fq-settings-modal .fq-settings-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 0.5rem;
}

.fq-settings-modal .fq-settings-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: var(--text-dark, #334155);
  margin: 0;
  cursor: pointer;
}

html[data-theme="dark"] .settings-feed-quality-card {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--dm-border, rgba(255, 255, 255, 0.12));
}

html[data-theme="dark"] .settings-feed-quality-card--clickable:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

html[data-theme="dark"] .fq-settings-modal .fq-settings-section {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .fq-settings-modal .fq-settings-section__title,
html[data-theme="dark"] .fq-settings-modal .fq-settings-check {
  color: #f1f5f9;
}
