/* App-specific tweaks on top of metronic-theme.css */

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.2rem rgba(0, 158, 247, 0.25);
}

.btn-icon {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.flex-stack {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

#patient-select + .ts-wrapper {
  width: 100%;
}

#patient-select + .ts-wrapper .ts-control {
  min-height: calc(1.5em + 0.75rem + 2px);
  border-radius: var(--bs-border-radius);
}

#patient-select + .ts-wrapper .ts-control .item {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#patient-select + .ts-wrapper .ts-dropdown .option {
  white-space: normal;
  line-height: 1.35;
}

.refills-due-table {
  table-layout: fixed;
  width: 100%;
}

.refills-due-table th,
.refills-due-table td {
  vertical-align: top;
}

.refills-due-col-patient { width: 14%; }
.refills-due-col-provider { width: 16%; }
.refills-due-col-order { width: 28%; }
.refills-due-col-schedule { width: 16%; }
.refills-due-col-status { width: 18%; }
.refills-due-col-actions { width: 8%; }

.refills-due-meds {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}

.refills-due-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.refills-due-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem;
}

.medical-justification-group {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.65rem;
  background: var(--bs-body-bg);
}

.medical-justification-group legend {
  float: none;
  width: auto;
  margin: 0;
  color: var(--bs-emphasis-color);
  font-size: 0.875rem;
  font-weight: 600;
}

.medical-justification-label {
  color: var(--bs-emphasis-color);
  font-size: 0.875rem;
  font-weight: 600;
}

.medical-justification-help {
  margin: 0.2rem 0 0.8rem;
  color: var(--bs-secondary-color);
  font-size: 0.8rem;
}

.medical-justification-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.medical-justification-option {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  background: #fff;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.medical-justification-option:hover {
  border-color: rgba(0, 158, 247, 0.55);
  background: rgba(0, 158, 247, 0.04);
}

.medical-justification-option:has(.form-check-input:focus-visible) {
  border-color: #009ef7;
  box-shadow: 0 0 0 0.2rem rgba(0, 158, 247, 0.14);
}

.medical-justification-option.is-selected,
.medical-justification-option:has(.form-check-input:checked) {
  border-color: #009ef7;
  background: rgba(0, 158, 247, 0.08);
}

.medical-justification-option .form-check-input {
  flex: 0 0 auto;
  margin: 0.1rem 0 0;
}

.medical-justification-option-title {
  color: var(--bs-emphasis-color);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
}

.medical-justification-preview {
  margin-top: 0.75rem;
  padding: 0.8rem 0.9rem;
  border-left: 3px solid #009ef7;
  border-radius: 0.35rem;
  background: rgba(0, 158, 247, 0.06);
  color: var(--bs-body-color);
  font-size: 0.8rem;
  line-height: 1.5;
}

.medical-justification-preview.is-empty {
  border-left-color: var(--bs-border-color);
  background: var(--bs-tertiary-bg);
  color: var(--bs-secondary-color);
}

.medical-justification-preview-label {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--bs-secondary-color);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.medical-justification-preview p {
  white-space: pre-wrap;
}

@media (max-width: 767.98px) {
  .medical-justification-options {
    grid-template-columns: 1fr;
  }
}

/* Provider New Order workflow */
.new-order-page {
  --order-navy: #17243d;
  --order-blue: #1677ff;
  --order-teal: #16a394;
  --order-border: #e3e8ef;
  --order-muted: #667085;
  max-width: 1500px;
  margin: 0 auto;
  color: var(--order-navy);
}

.new-order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 29%);
  gap: 1.25rem;
  align-items: start;
}

.new-order-main {
  min-width: 0;
}

.new-order-section {
  margin-bottom: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--order-border);
  border-radius: 0.7rem;
  background: #fff;
}

.new-order-section--medications {
  border-color: #d5e5ff;
}

.new-order-section-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.new-order-section-heading--actions {
  flex-wrap: wrap;
}

.new-order-section-heading h2,
.new-order-summary h2 {
  margin: 0;
  color: var(--order-navy);
  font-size: 1rem;
  font-weight: 700;
}

.new-order-section-heading p,
.new-order-summary-header p {
  margin: 0.12rem 0 0;
  color: var(--order-muted);
  font-size: 0.78rem;
}

.new-order-step {
  display: inline-flex;
  flex: 0 0 1.9rem;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: #e4f6f3;
  color: #087d70;
  font-size: 0.8rem;
  font-weight: 800;
}

.new-order-segmented {
  /* Containing block for Bootstrap's absolutely positioned .btn-check radios. Without it they
     resolve against the initial containing block, add scrollable overflow to <html>, and
     focusing one (clicking its label) scrolls the whole page even under overflow: hidden. */
  position: relative;
  display: inline-flex;
  max-width: 100%;
  padding: 0.2rem;
  border: 1px solid var(--order-border);
  border-radius: 0.55rem;
  background: #f5f7fa;
}

.new-order-segment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.4rem 0.85rem;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: #5d6678;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.new-order-segment:hover {
  color: var(--order-blue);
}

.new-order-segment.active,
.btn-check:checked + .new-order-segment {
  background: #fff;
  color: var(--order-blue);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.1);
}

.new-order-search-field {
  position: relative;
}

.new-order-search-field > i {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 0.85rem;
  color: #8992a3;
  transform: translateY(-50%);
}

.new-order-search-field .form-control {
  min-height: 2.7rem;
  padding-left: 2.5rem;
}

.new-order-patient-search #patient-search-results {
  max-height: 19rem;
  overflow-y: auto;
  border-radius: 0.55rem;
}

.new-order-patient-search #patient-search-results .list-group-item {
  padding: 0.7rem 0.85rem;
  border-color: var(--order-border);
  font-size: 0.8rem;
}

.new-order-patient-panel {
  margin-top: 0.9rem;
  padding: 0.9rem;
  border: 1px solid var(--order-border);
  border-radius: 0.6rem;
  background: #fafbfc;
}

.new-order-patient-summary,
.new-order-address-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.new-order-patient-avatar,
.new-order-address-icon,
.new-order-medication-icon {
  display: inline-flex;
  flex: 0 0 2.25rem;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.55rem;
  background: #eaf3ff;
  color: var(--order-blue);
}

.new-order-patient-meta,
.new-order-patient-address {
  margin-top: 0.12rem;
  color: var(--order-muted);
  font-size: 0.78rem;
}

.new-order-clinical-fields {
  padding: 0.9rem;
  border-radius: 0.55rem;
  background: #f4f7fa;
}

.new-order-info-badge {
  background: #e5f7f3;
  color: #087d70;
}

.soap-note-callout {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid #d7e6fb;
  border-radius: 0.75rem;
  background: #f3f8ff;
  color: #334155;
  font-size: 0.82rem;
  line-height: 1.45;
}

.soap-note-callout i {
  flex: 0 0 auto;
  margin-top: 0.1rem;
  color: #2563eb;
  font-size: 1rem;
}

.soap-note-callout--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.soap-note-callout--warning i {
  color: #d97706;
}

.soap-note-callout--danger {
  border-color: #fecaca;
  background: #fef2f2;
}

.soap-note-callout--danger i {
  color: #dc2626;
}

.soap-note-templates {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.soap-note-template-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--order-border);
  border-radius: 0.75rem;
  background: #fff;
  cursor: pointer;
  user-select: none;
  transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.soap-note-template-card:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}

.soap-note-template-card.is-selected {
  border-color: #3b82f6;
  background: #f4f8ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.soap-note-template-card .form-check-input {
  flex: 0 0 auto;
  margin: 0;
  width: 1.05rem;
  height: 1.05rem;
}

.soap-note-template-icon {
  display: inline-flex;
  flex: 0 0 2.35rem;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.55rem;
  background: #e8f1ff;
  color: #2563eb;
  font-size: 1.05rem;
}

.soap-note-template-body {
  min-width: 0;
  flex: 1 1 auto;
}

.soap-note-template-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  color: var(--order-navy);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.3;
}

.soap-note-selected-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  background: #ecfdf3;
  color: #15803d;
  font-size: 0.68rem;
  font-weight: 700;
}

.soap-note-template-desc,
.soap-note-template-instructions {
  display: block;
  margin-top: 0.18rem;
  color: var(--order-muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.soap-note-template-instructions {
  color: #475569;
}

.soap-note-template-chevron {
  flex: 0 0 auto;
  padding: 0.2rem;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}

.soap-note-template-chevron:hover,
.soap-note-template-chevron:focus-visible {
  color: #2563eb;
}

.soap-note-preview-actions {
  margin-top: 0.85rem;
}

.soap-note-preview-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  border: 0;
  background: none;
  color: #2563eb;
  font-size: 0.84rem;
  font-weight: 650;
  cursor: pointer;
}

.soap-note-preview-link:hover,
.soap-note-preview-link:focus-visible {
  color: #1d4ed8;
  text-decoration: underline;
}

.soap-note-preview-link:disabled {
  color: #94a3b8;
  text-decoration: none;
}

.soap-note-preview-hint {
  margin: 0.28rem 0 0;
  color: var(--order-muted);
  font-size: 0.74rem;
}

.offcanvas.soap-note-preview-panel {
  --bs-offcanvas-width: min(42rem, 42vw);
  top: calc(62px + 0.75rem);
  right: 0.75rem;
  bottom: 0.75rem;
  width: var(--bs-offcanvas-width);
  height: auto;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.12);
}

.soap-note-preview-panel .offcanvas-header {
  align-items: flex-start;
  padding: 1.1rem 1.35rem 0.85rem;
  border-bottom: 1px solid #eef1f5;
  background: #fff;
}

.soap-note-preview-panel .offcanvas-title {
  color: var(--order-navy, #0f172a);
  font-size: 1.15rem;
  font-weight: 800;
}

.soap-note-preview-panel .btn-close {
  margin: 0;
  padding: 0.55rem;
  border-radius: 50%;
  opacity: 0.55;
}

.soap-note-preview-panel .btn-close:hover,
.soap-note-preview-panel .btn-close:focus-visible {
  background-color: #f1f5f9;
  opacity: 0.85;
}

.soap-note-preview-subtitle {
  margin: 0.2rem 0 0;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.4;
}

.soap-note-preview-panel .offcanvas-body {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1.35rem 0;
}

.soap-note-blocks {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.85rem;
}

.soap-note-block {
  padding: 0.85rem 1rem 1rem;
  border: 1px solid #e6eaf0;
  border-radius: 0.8rem;
  background: #fff;
}

.soap-note-block-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.soap-note-letter {
  display: inline-flex;
  flex: 0 0 1.9rem;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 800;
}

.soap-note-letter--s { background: #e7f0fe; color: #2563eb; }
.soap-note-letter--o { background: #e6f6ec; color: #16a34a; }
.soap-note-letter--a { background: #fdf1e1; color: #d97706; }
.soap-note-letter--p { background: #fdeaea; color: #dc2626; }

.soap-note-block-title {
  flex: 1 1 auto;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 800;
}

.soap-note-block--s .soap-note-block-title { color: #2563eb; }
.soap-note-block--o .soap-note-block-title { color: #16a34a; }
.soap-note-block--a .soap-note-block-title { color: #d97706; }
.soap-note-block--p .soap-note-block-title { color: #dc2626; }

.soap-note-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #fff;
  color: #64748b;
  font-size: 0.73rem;
  font-weight: 600;
}

.soap-note-edit-btn:hover,
.soap-note-edit-btn:focus-visible {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #334155;
}

.soap-note-block-body {
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.6;
}

.soap-note-block-body p {
  margin: 0 0 0.55rem;
}

.soap-note-block-body p:last-child {
  margin-bottom: 0;
}

.soap-note-block-body ul {
  margin: 0;
  padding-left: 1.1rem;
}

.soap-note-block-body li + li {
  margin-top: 0.2rem;
}

.soap-note-empty {
  color: #94a3b8;
}

.soap-note-preview-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.1rem;
  padding: 0.85rem 0 1.1rem;
  border-top: 1px solid var(--order-border, #e2e8f0);
  background: #fff;
}

.soap-note-preview-footer .btn {
  border-radius: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.soap-note-details-card .card-header {
  border-bottom: 1px solid var(--order-border, #e2e8f0);
}

.new-order-medication-card {
  margin-bottom: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--order-border);
  border-radius: 0.65rem;
  background: #fff;
}

.new-order-medication-card-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--order-border);
  background: #fafcff;
}

.new-order-medication-card-body {
  padding: 0.85rem 0.9rem;
}

.new-order-medication-price {
  flex: 0 0 auto;
  color: var(--order-navy);
  font-size: 0.88rem;
  font-weight: 700;
}

.order-addon-card {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.75rem 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid #b7e4c7;
  border-radius: 0.55rem;
  background: #edf8f0;
}

.order-addon-card .form-check-input {
  margin-top: 0.2rem;
}

.order-addon-card-body {
  flex: 1 1 auto;
  min-width: 0;
}

.order-addon-title {
  font-weight: 600;
  color: #1b4332;
}

.order-addon-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: #d8f3dc;
  color: #1b4332;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
}

.order-addon-badge.is-required {
  background: #fff3cd;
  color: #664d03;
}

.order-addon-desc {
  margin: 0.15rem 0 0;
  color: #40916c;
  font-size: 0.78rem;
}

.order-addon-amount {
  flex: 0 0 auto;
  color: #2d6a4f;
  font-weight: 700;
  white-space: nowrap;
}

.new-order-line-totals {
  margin: 0.35rem 0 0.85rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--order-border);
}

.new-order-dose-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.new-order-compact-field {
  flex: 0 1 11rem;
  min-width: 9rem;
}

.new-order-compact-field .form-label {
  margin-bottom: 0.3rem;
}

.new-order-compact-field .input-group-text {
  color: var(--order-muted);
  font-size: 0.75rem;
}

.new-order-med-subsection {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid #edf0f4;
}

.new-order-page .medical-justification-group {
  min-width: 0;
  padding-right: 0;
  padding-bottom: 0;
  padding-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
  background: transparent;
}

.new-order-page .medical-justification-label {
  color: var(--order-navy);
  font-size: 0.82rem;
  font-weight: 700;
}

.new-order-page .medical-justification-help {
  margin: 0.15rem 0 0.55rem;
  font-size: 0.74rem;
}

.new-order-page .medical-justification-options {
  gap: 0.4rem;
}

.new-order-page .medical-justification-option {
  min-height: 2.65rem;
  align-items: center;
  padding: 0.45rem 0.6rem;
  border-color: #dce3ec;
  border-radius: 0.45rem;
  background: #fff;
}

.new-order-page .medical-justification-option.is-selected,
.new-order-page .medical-justification-option:has(.form-check-input:checked) {
  border-color: #75adff;
  background: #edf5ff;
}

.new-order-page .medical-justification-option-title {
  font-size: 0.76rem;
  line-height: 1.25;
}

.new-order-page .medical-justification-preview {
  margin-top: 0.55rem;
  padding: 0.55rem 0.7rem;
  border-left-width: 3px;
  background: #f0f6ff;
  font-size: 0.75rem;
  line-height: 1.4;
}

.new-order-page .medical-justification-preview-label {
  margin-bottom: 0.18rem;
  font-size: 0.62rem;
}

.medical-justification-complete {
  display: none;
  align-items: center;
  gap: 0.45rem;
  min-height: 2rem;
  color: #526072;
  font-size: 0.76rem;
}

.medical-justification-complete > i {
  color: #15936d;
}

.medical-justification-complete-label {
  font-weight: 600;
}

.medical-justification-complete strong {
  color: var(--order-navy);
  font-size: 0.76rem;
}

.medical-justification-group.is-compact {
  padding-top: 0.65rem;
}

.medical-justification-group.is-compact .medical-justification-complete {
  display: flex;
}

.medical-justification-group.is-compact .medical-justification-editor,
.medical-justification-group.is-compact .medical-justification-preview {
  display: none;
}

.medical-justification-group.is-compact .js-justification-explanation:not(.d-none) {
  display: block;
  margin-top: 0.55rem;
}

.medical-justification-group .js-justification-explanation.d-none {
  display: none !important;
}

.new-order-pharmacy-instructions textarea {
  min-height: 4.25rem;
}

.new-order-address-summary {
  padding: 0.8rem;
  border: 1px solid var(--order-border);
  border-radius: 0.55rem;
  background: #fafbfc;
}

.new-order-optional-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--order-border);
}

.new-order-optional-row .form-switch .form-check-input {
  width: 2.5rem;
  height: 1.3rem;
}

.new-order-signature-disclosure {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.85rem;
  border: 1px solid #cde9e4;
  border-radius: 0.55rem;
  background: #f0faf8;
  color: #315d59;
  font-size: 0.8rem;
}

.new-order-signature-disclosure i {
  color: var(--order-teal);
  font-size: 1.1rem;
}

.new-order-signature-input {
  min-height: 3rem;
  font-family: "Segoe Script", "Brush Script MT", cursive;
  font-size: 1.2rem;
}

.pay-at-order-card-capture {
  padding: 0.9rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.65rem;
  background: #fff;
}

.pay-at-order-card-capture .form-label {
  margin-bottom: 0.2rem;
}
}

.new-order-summary {
  position: sticky;
  top: 1rem;
  overflow: hidden;
  border: 1px solid var(--order-border);
  border-radius: 0.7rem;
  background: #fff;
}

.new-order-summary-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid var(--order-border);
}

.new-order-progress {
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: #edf4ff;
  color: var(--order-blue);
  font-size: 0.7rem;
  font-weight: 700;
}

.new-order-summary-block {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #edf0f4;
  font-size: 0.78rem;
}

.new-order-summary-label {
  margin-bottom: 0.25rem;
  color: #8a93a3;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.new-order-summary-medication + .new-order-summary-medication {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid #edf0f4;
}

.new-order-checklist {
  padding: 0.8rem 1rem;
}

.new-order-check-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.35rem 0;
  color: #7a8495;
  font-size: 0.75rem;
}

.new-order-check-item.is-complete {
  color: #18794e;
}

.new-order-summary > .btn {
  width: calc(100% - 2rem) !important;
  margin: 0 1rem 1rem;
}

.new-order-mobile-bar {
  display: none;
}

.new-order-picker {
  --order-navy: var(--sp-text-primary, #17243d);
  --order-blue: var(--sp-blue-600, #2563ff);
  --order-border: var(--sp-border, #e3e8ef);
  --order-muted: var(--sp-text-secondary, #667085);
  border: 0;
  border-radius: 0.9rem;
}

.new-order-picker-results {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--order-border);
  border-radius: 0.7rem;
}

.new-order-picker-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 3.9rem;
  padding: 0.68rem 0.75rem;
  border: 0;
  border-bottom: 1px solid var(--order-border);
  border-radius: 0;
  background: #fff;
  color: var(--order-navy);
  text-align: left;
}

.new-order-picker-item:last-child {
  border-bottom: 0;
}

.new-order-picker-item:hover,
.new-order-picker-item:focus-visible {
  background: #f6faff;
  box-shadow: inset 0 0 0 2px rgba(37, 99, 255, .42);
  outline: 0;
}

.new-order-picker-item.is-selected {
  border-color: var(--order-blue);
  background: #edf5ff;
}

.new-order-picker-med-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 650;
  line-height: 1.35;
}

.new-order-picker-med-detail {
  display: block;
  margin-top: 0.15rem;
  color: var(--order-muted);
  font-size: 0.73rem;
}

.new-order-picker-med-detail strong {
  color: var(--order-blue);
  font-weight: 650;
}

.new-order-picker-copy {
  display: block;
  min-width: 0;
  flex: 1 1 auto;
}

.new-order-picker-price {
  flex: 0 0 auto;
  margin-left: .5rem;
  color: var(--order-navy);
  font-size: .78rem;
  font-weight: 650;
  white-space: nowrap;
}

.new-order-picker-chevron {
  flex: 0 0 auto;
  color: #8796aa;
}

.new-order-all-medications-heading {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 1.1rem 0 .55rem;
}

.new-order-all-medications-heading h3,
.new-order-frequent-heading h3 {
  margin: 0;
  color: var(--order-navy);
  font-size: .83rem;
  font-weight: 680;
}

.new-order-all-medications-heading > span,
.new-order-frequent-context {
  padding: .22rem .48rem;
  border-radius: 999px;
  color: var(--order-muted);
  background: #f1f4f8;
  font-size: .65rem;
  font-weight: 550;
}

.new-order-frequent {
  margin: .35rem 0 1rem;
}

.new-order-frequent-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.new-order-frequent-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  color: #fff;
  background: var(--order-blue);
  font-size: .65rem;
}

.new-order-frequent-context {
  border: 1px solid #d8e5ff;
  color: #52647a;
  background: #f8faff;
}

.new-order-frequent-why {
  flex: 0 0 auto;
  padding: .2rem;
  border: 0;
  color: var(--order-blue);
  background: transparent;
  font-size: .69rem;
  font-weight: 600;
}

.new-order-frequent-why:focus-visible {
  border-radius: .3rem;
  box-shadow: var(--sp-focus);
  outline: 0;
}

.new-order-frequent > p {
  margin: .22rem 0 .55rem 2rem;
  color: var(--order-muted);
  font-size: .71rem;
}

.new-order-frequent-list {
  overflow: hidden;
  border: 1px solid #d8e5ff;
  border-radius: .7rem;
  background: #f8faff;
}

.new-order-picker-item--frequent {
  background: rgba(248, 250, 255, .78);
}

.new-order-picker-item--frequent .new-order-medication-icon {
  background: #eaf2ff;
}

.new-order-category-chip {
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--order-border);
  border-radius: 999px;
  background: #fff;
  color: #596274;
  font-size: 0.72rem;
}

.new-order-category-chip.active {
  border-color: #9fc5ff;
  background: #eaf3ff;
  color: var(--order-blue);
}

@media (max-width: 1199.98px) {
  .new-order-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
  }
}

@media (max-width: 991.98px) {
  .new-order-layout {
    display: block;
  }

  .new-order-summary-column {
    margin-top: 1rem;
  }

  .new-order-summary {
    position: static;
  }
}

@media (max-width: 767.98px) {
  #medication-picker-modal .modal-dialog {
    max-width: none;
    margin: .5rem;
  }

  #medication-picker-modal .modal-content {
    max-height: calc(100vh - 1rem);
  }

  .new-order-picker-item {
    align-items: flex-start;
  }

  .new-order-picker-price,
  .new-order-picker-chevron {
    margin-top: .15rem;
  }

  .new-order-frequent-heading {
    align-items: flex-start;
  }

  .new-order-frequent-why {
    white-space: nowrap;
  }

  .new-order-section {
    padding: 1rem;
  }

  .new-order-medication-card-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .new-order-medication-card-header .new-order-medication-icon {
    margin-top: 0.1rem;
  }

  .new-order-medication-price {
    margin-left: 3rem;
  }

  .soap-note-template-card {
    align-items: flex-start;
  }

  .soap-note-template-icon {
    margin-top: 0.1rem;
  }

  .offcanvas.soap-note-preview-panel {
    --bs-offcanvas-width: 100vw;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    border-radius: 0;
  }

  .soap-note-preview-footer {
    flex-wrap: wrap;
  }

  .new-order-dose-row {
    flex-direction: column;
  }

  .new-order-compact-field {
    flex-basis: auto;
    width: 100%;
    min-width: 0;
  }

  .medical-justification-complete {
    flex-wrap: wrap;
  }

  .medical-justification-complete .js-change-justification {
    margin-left: 1.6rem !important;
  }

  .new-order-segmented {
    display: flex;
    width: 100%;
  }

  .new-order-segment {
    flex: 1 1 0;
  }

  .new-order-patient-summary,
  .new-order-address-summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .new-order-patient-summary .js-toggle-patient-edit,
  .new-order-address-summary .js-edit-shipping-address {
    width: 100%;
  }

  .new-order-mobile-bar {
    position: sticky;
    z-index: 1020;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0 -0.75rem;
    padding: 0.7rem 0.8rem;
    border-top: 1px solid var(--order-border);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
  }
}
