/*
 * dFLEX Enhancements - formularz decyzji klienta (makro decyzja).
 * Workspace FORGE #7022 redmine-client-decisions, TASK-002 #7066. Specyficznosc z #wrapper i !important, bo motyw
 * Opale nadpisuje style formularzy wiki i opisu zgloszenia.
 * Zestaw pytan: workspace FORGE #7074, TASK-002 #7078 (blok .dfx-decision-question na pytanie). Opale ma tylko jasna
 * palete i nie deklaruje color-scheme, wiec formularz ustawia jawnie color-scheme: light i kolory pol: przy ciemnym
 * schemacie przegladarki (prefers-color-scheme: dark) wyglada tak samo jak reszta strony.
 */

#wrapper .dfx-decision {
  display: grid !important;
  gap: 10px !important;
  max-width: 760px !important;
  margin: 14px 0 !important;
  padding: 14px 16px !important;
  border: 1px solid #c9d6dc !important;
  border-left: 4px solid #0f6b74 !important;
  border-radius: 6px !important;
  background: #f7fafb !important;
  color: #18232b !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  color-scheme: light !important;
}

#wrapper .dfx-decision-head { display: flex !important; align-items: baseline !important; gap: 8px !important; }
#wrapper .dfx-decision-title { font-weight: 600 !important; font-size: 14px !important; }
#wrapper .dfx-decision-key { font-size: 11px !important; color: #55636d !important; background: transparent !important; }

#wrapper .dfx-decision-questions { display: grid !important; gap: 12px !important; }
#wrapper .dfx-decision-question {
  display: grid !important;
  gap: 6px !important;
  padding: 10px 12px !important;
  border: 1px solid #dde6ea !important;
  border-radius: 6px !important;
  background: #ffffff !important;
}
#wrapper .dfx-decision-question-dirty { border-color: #c98a1b !important; box-shadow: inset 3px 0 0 #c98a1b !important; }
#wrapper .dfx-decision-question-error { border-color: #b42318 !important; box-shadow: inset 3px 0 0 #b42318 !important; }
#wrapper .dfx-decision-question-head { display: flex !important; align-items: baseline !important; gap: 8px !important; }
#wrapper .dfx-decision-question-code {
  font-family: ui-monospace, Consolas, monospace !important;
  font-size: 11px !important;
  padding: 0 6px !important;
  border-radius: 4px !important;
  background: #e2f0f1 !important;
  color: #0f6b74 !important;
}
#wrapper .dfx-decision-question-text { font-weight: 600 !important; color: #18232b !important; }
#wrapper .dfx-decision-question-status { color: #55636d !important; font-size: 12px !important; min-height: 1.5em !important; }

#wrapper .dfx-decision-variants { display: grid !important; gap: 6px !important; }
#wrapper .dfx-decision-variant {
  display: grid !important;
  grid-template-columns: auto auto 1fr !important;
  column-gap: 8px !important;
  align-items: baseline !important;
  padding: 6px 8px !important;
  border: 1px solid #dde6ea !important;
  border-radius: 4px !important;
  background: #fbfdfd !important;
  color: #18232b !important;
  cursor: pointer !important;
  font-weight: normal !important;
}
#wrapper .dfx-decision-variant:has(input:checked) { border-color: #0f6b74 !important; background: #e2f0f1 !important; }
#wrapper .dfx-decision-variant input { margin: 0 !important; }
#wrapper .dfx-decision-code { font-family: ui-monospace, Consolas, monospace !important; font-weight: 600 !important; color: #0f6b74 !important; }
#wrapper .dfx-decision-risks { grid-column: 3 !important; color: #8a5300 !important; font-size: 12px !important; }

#wrapper .dfx-decision-label { font-weight: 600 !important; }

#wrapper .dfx-decision-files { display: grid !important; gap: 6px !important; }
#wrapper .dfx-decision-attachments { margin: 0 !important; padding-left: 18px !important; }
#wrapper .dfx-decision-attachments li { margin: 2px 0 !important; }
#wrapper .dfx-decision-size { color: #55636d !important; font-size: 12px !important; }
#wrapper .dfx-decision-remove { margin-left: 6px !important; padding: 0 8px !important; font-size: 12px !important; }
#wrapper .dfx-decision-note {
  width: 100% !important;
  box-sizing: border-box !important;
  resize: vertical !important;
  background: #ffffff !important;
  color: #18232b !important;
}
#wrapper .dfx-decision-note:disabled { background: #f1f4f5 !important; color: #55636d !important; }

#wrapper .dfx-decision-actions { display: flex !important; flex-wrap: wrap !important; align-items: center !important; gap: 10px !important; }
#wrapper .dfx-decision-save { padding: 4px 12px !important; }
#wrapper .dfx-decision-status { color: #55636d !important; }
#wrapper .dfx-decision-status-saved { color: #1f6b3a !important; }
#wrapper .dfx-decision-status-dirty { color: #8a5300 !important; }
#wrapper .dfx-decision-status-error { color: #b42318 !important; }

#wrapper .dfx-decision-invalid,
#wrapper .dfx-decision-notice { border-left-color: #b42318 !important; background: #fdf3f2 !important; display: block !important; }
#wrapper .dfx-decision-notice { border-left-color: #8a5300 !important; background: #fbf5e9 !important; }
#wrapper .dfx-decision-invalid ul { margin: 6px 0 0 18px !important; }

/* Zestawienie decyzji zespolu (TASK-004 #7068). */
#wrapper .dfx-decisions-summary-head { display: flex !important; flex-wrap: wrap !important; align-items: center !important; gap: 12px !important; justify-content: space-between !important; }
#wrapper .dfx-decisions-changed-row > td { background: #fbf5e9 !important; }
#wrapper .dfx-decisions-badge { display: inline-block !important; margin-left: 6px !important; padding: 0 6px !important; border-radius: 8px !important; background: #8a5300 !important; color: #ffffff !important; font-size: 11px !important; }
#wrapper .dfx-decisions-stale { color: #b42318 !important; }
#wrapper .dfx-decisions-changed { color: #8a5300 !important; }
#wrapper .dfx-decisions-note p { margin: 0 !important; }
#wrapper .dfx-decision-manage { font-size: 12px !important; }

/* Zestawienie per pytanie: sekcja pytania ze znacznikiem i historia zmian odpowiedzi (workspace #7074, TASK-003 #7079). */
#wrapper .dfx-decisions-question {
  margin: 16px 0 !important;
  padding: 10px 14px !important;
  border: 1px solid #dde6ea !important;
  border-left: 4px solid #0f6b74 !important;
  border-radius: 6px !important;
  background: #f7fafb !important;
}
#wrapper .dfx-decisions-question h3 { margin: 0 0 6px 0 !important; padding: 0 !important; border: 0 !important; font-size: 14px !important; }
#wrapper .dfx-decisions-question-stale { border-left-color: #b42318 !important; background: #fdf3f2 !important; }
#wrapper .dfx-decisions-files { border-left-color: #55636d !important; }
#wrapper .dfx-decisions-question-code {
  font-family: ui-monospace, Consolas, monospace !important;
  font-size: 11px !important;
  padding: 0 6px !important;
  border-radius: 4px !important;
  background: #e2f0f1 !important;
  color: #0f6b74 !important;
}
#wrapper .dfx-decisions-variants { margin: 0 0 8px 0 !important; padding-left: 18px !important; }
#wrapper .dfx-decisions-variants li { margin: 1px 0 !important; }
#wrapper .dfx-decisions-risks { color: #8a5300 !important; font-size: 12px !important; }
#wrapper .dfx-decisions-ack-line { display: flex !important; flex-wrap: wrap !important; align-items: center !important; justify-content: space-between !important; gap: 8px 12px !important; margin-bottom: 8px !important; }
#wrapper .dfx-decisions-ack-form { margin: 0 !important; }
#wrapper .dfx-decisions-summary td.dfx-decisions-note,
#wrapper .dfx-decisions-history { text-align: left !important; }
#wrapper .dfx-decisions-history summary { cursor: pointer !important; color: #0f6b74 !important; white-space: nowrap !important; }
#wrapper .dfx-decisions-history ol { margin: 4px 0 0 18px !important; padding: 0 !important; }
#wrapper .dfx-decisions-history li { margin: 2px 0 !important; }
#wrapper .dfx-decisions-history-date { color: #55636d !important; font-size: 12px !important; }
