/**
 * New flowsheet UI overrides.
 * Loaded after morestyle-1.0.css; only override rules, no copy of base.
 * All selectors require [data-flowsheet-styles="true"] (set on #ng-app on Whiteboard)
 * so these rules never apply on other pages (e.g. Clinics, admin, Settings).
 */

/*---------------- main table (with procedures) --------------------*/
[data-flowsheet-styles="true"] #patient-table .procedure-table,
[data-flowsheet-styles="true"] #whiteboard-table .procedure-table {
  border: solid 1px #a9a9a9;
  border-bottom: solid 1px #a9a9a9;
  background: #eaeaea;
}

/* Patient flowsheet only; do NOT set row height on #whiteboard-table (breaks whiteboard layout). */
[data-flowsheet-styles="true"] #patient-table .procedure-table tr {
  height: 30px;
  min-height: 30px;
}

[data-flowsheet-styles="true"] #whiteboard-table .date-center {
  font-size: 14px;
}

[data-flowsheet-styles="true"] #patient-table .pr-heading,
[data-flowsheet-styles="true"] #whiteboard-table .pr-heading {
  font-weight: 700;
  width: 160px;
  color: #25282e;
  padding-left: 4px;
}

[data-flowsheet-styles="true"]
  #patient-table
  .pr-heading:not(.disabled)
  a:hover {
  background: none;
}

[data-flowsheet-styles="true"] #patient-table .pr-heading .add-parameter-icon {
  color: #5d6066;
}

[data-flowsheet-styles="true"]
  #patient-table
  .pr-heading:not(.disabled)
  a:hover
  .add-parameter-icon {
  color: #0969d9;
}

[data-flowsheet-styles="true"]
  #patient-table
  .pr-group
  .pr-heading:not(.disabled)
  a:hover {
  background: none;
}

[data-flowsheet-styles="true"]
  #patient-table
  .pr-item
  .pr-heading:hover
  .pr-heading-content,
[data-flowsheet-styles="true"]
  #patient-table
  .pr-item
  .pr-heading:hover
  .pb-name,
[data-flowsheet-styles="true"]
  #patient-table
  .pr-item
  .pr-heading:hover
  .prescription {
  color: #0969d9;
}

[data-flowsheet-styles="true"]
  #patient-table
  .pr-item
  .pr-heading
  .pr-heading-content {
  cursor: pointer;
}

[data-flowsheet-styles="true"] #patient-table .pr-value,
[data-flowsheet-styles="true"] #whiteboard-table .pr-value {
  font-size: 14px;
}

[data-flowsheet-styles="true"] #patient-table .pr-time,
[data-flowsheet-styles="true"] #whiteboard-table .pr-time {
  background: #eaeaea;
}

[data-flowsheet-styles="true"]
  #patient-table
  .pr-time
  td.ampm
  .timeformat-12
  .hour,
[data-flowsheet-styles="true"]
  #whiteboard-table
  .pr-time
  td.ampm
  .timeformat-12
  .hour {
  display: block;
  font-weight: 700;
  color: #25282e;
  font-size: 13px;
  margin-top: 2px;
}

[data-flowsheet-styles="true"]
  #patient-table
  .pr-time
  td.ampm
  .timeformat-12
  .part,
[data-flowsheet-styles="true"]
  #whiteboard-table
  .pr-time
  td.ampm
  .timeformat-12
  .part {
  display: block;
  font-weight: 700;
  color: #5d6066;
  font-size: 11px;
  margin-top: 2px;
}

/* 24h format (no AM/PM): hour number – same size and weight as 12h .hour */
[data-flowsheet-styles="true"] #patient-table .pr-time td:not(.ampm) span,
[data-flowsheet-styles="true"] #whiteboard-table .pr-time td:not(.ampm) span {
  font-size: 13px;
  font-weight: 700;
  color: #25282e;
}

[data-flowsheet-styles="true"] #patient-table .pr-group,
[data-flowsheet-styles="true"] #whiteboard-table .pr-group {
  text-shadow: none;
  border-top: double 1px #9d9d9d;
  border-bottom: double 1px #9d9d9d !important;
}

[data-flowsheet-styles="true"] #patient-table .pr-group td,
[data-flowsheet-styles="true"] #whiteboard-table .pr-group td {
  vertical-align: middle;
}

[data-flowsheet-styles="true"] #patient-table .pr-group .pr-heading,
[data-flowsheet-styles="true"] #whiteboard-table .pr-group .pr-heading {
  color: #25282e;
  font-size: 16px;
  font-weight: 700;
}

[data-flowsheet-styles="true"]
  #patient-table
  .pr-group
  .pr-heading
  .pr-heading-content,
[data-flowsheet-styles="true"]
  #whiteboard-table
  .pr-group
  .pr-heading
  .pr-heading-content {
  display: flex;
  align-items: center;
  height: 100%;
}

[data-flowsheet-styles="true"] #patient-table .pr-group .pr-heading a {
  float: none;
  background: none;
  padding: 0;
  margin-right: 5px;
}

[data-flowsheet-styles="true"]
  #patient-table
  .pr-group
  .pr-heading
  .add-parameter-icon,
[data-flowsheet-styles="true"]
  #whiteboard-table
  .pr-group
  .pr-heading
  .add-parameter-icon {
  vertical-align: middle;
}

/* Workflow panel narrower so sheet can widen without covering last column; fullscreen keeps 40%. */
[data-flowsheet-styles="true"] .general-practice-panel-12 {
  width: 333px;
}

/* SF-2807: Keep patient details (Workflow) panel visible in fullscreen when new UI FF is on.
   Base fullscreen rules in morestyle-1.0.css can make the procedure-table extend and hide the panel;
   these overrides reserve space for the panel and keep it visible. */
[data-flowsheet-styles="true"] .fullscreen .general-practice-panel-12 {
  width: 333px;
  min-width: 333px;
  display: block !important;
  visibility: visible !important;
}
[data-flowsheet-styles="true"] .fullscreen #whiteboard-table .procedure-table {
  margin-right: 333px;
}
[data-flowsheet-styles="true"] .fullscreen #patient-table .procedure-table {
  margin-right: 333px;
}

[data-flowsheet-styles="true"] .fullscreen .pr-heading {
  width: 33.33% !important;
  min-width: auto !important;
}
