/* Set base font size to 12px */
body {
  font-size: 0.8rem; /* 0.75 * 16px = 12px */
  line-height: 1.5;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #212529;
  background-color: #fff;
}

/* Headings scaled from 12px */
h1 {
  font-size: 1.75rem; /* ~21px */
  margin-bottom: 0.75rem;
}
h2 {
  font-size: 1.5rem; /* ~18px */
  margin-bottom: 0.65rem;
}
h3 {
  font-size: 1.25rem; /* ~15px */
  margin-bottom: 0.6rem;
}
h4 {
  font-size: 1.1rem;  /* ~13px */
}
h5, h6 {
  font-size: 1rem;    /* ~12px */
}

/* Table, form, and UI text 
table,
.form-control,
.btn,
label,
input,
select,
textarea {
  font-size: 0.8rem; 
}
  */

/* Smaller text utility */
small,
.small,
.text-muted {
  font-size: 0.66rem; /* ~10px */
  color: #6c757d;
}

.badge.fw-medium {
  font-weight: 500;
}


body.login-page {
  background: radial-gradient(circle at center, #004687 20%, #002040 90%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  color: #2d3748;
}

#mainContentArea {
    background-color: #f7f7f7;
}

img.login-logo {
  width: 220px;
  margin-bottom: 1rem;
}

.sidebar-wrapper {
  background-color: #002040 !important;
  min-height: 100vh;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.1);
  border-right: 1px solid #001830;
}

.nav-link {
  color: #ffffff;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
  font-weight: 500;
}

.nav > .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-weight: 800;
}

.nav-item > .nav-link:hover {
  color: #ffffff;
  font-weight: 800;
}

.nav-link img {
  display: block;
  margin: 0 auto;
}

.nav-link div {
  font-size: 0.8rem;
  margin-top: 0.3rem;
  color: #ffffff;
}

.top-bar {
  background-color: #002040;
}

.logo-img {
  width: 160px;
}

.alerts-icon {
  width: 24px;
  height: 24px;
}

.user-initials {
  width: 32px;
  height: 32px;
  font-size: 0.85rem;
}

.small-toggle {
  font-size: 0.75rem;
}

.invert-icon {
  filter: invert(1) !important;
}

.toggle-chevron svg {
  transition: transform 0.2s ease;
}
.toggle-chevron.collapsed svg {
  transform: rotate(180deg); /* flips it up */
}

.form-switch .form-check-input {
  width: 3em;
  height: 2em;
}

.clickable-row {
  cursor: pointer;
}

#autocomplete-list li {
    cursor: pointer;
}

.text-navy { color: #002040; }

.text-bg-navy {
    background-color: #002040;
    color: #fff;
}
.text-bg-light2 {
    background-color: rgb(226, 227, 229);
    color: rgb(33, 37, 41);
}

.icon-16 { width: 16px; height: 16px; }

#careNotesList {
    width: 100%;
    padding: 2rem;
}

.btn-cat{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  border:1px solid var(--c);
  color:var(--c);
  font-weight:600;
  line-height:1;
  white-space: nowrap;
  transition:background-color .15s, color .15s, border-color .15s, box-shadow .15s;
}

.btn-cat.active{
  background-color:var(--bs-primary) !important;
  border-color:var(--bs-primary) !important;
  color:#fff !important;
}

.btn-check:checked + .btn-cat {
  background-color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
  color: #fff !important;
}

.provider-display:hover .edit-provider-link {
  display: inline-block !important;
}

/* Checked switch track */
.form-switch .form-check-input:checked {
  background-color: #003366; /* pick your color */
  border-color: #003366;     /* keep border same as fill */
}



/* Caret & clear button layout so they don't overlap */
.ts-control {
  position: relative;
  padding-right: 3.25rem; /* room for clear + caret */
}

/* caret */
.ts-control::after {
  content: "";
  position: absolute;
  top: 50%;
  right: .5rem;
  width: 0;
  height: 0;
  border-left: .35em solid transparent;
  border-right: .35em solid transparent;
  border-top: .45em solid #666;
  transform: translateY(-50%);
  pointer-events: none;
}

/* clear button from plugin */
.ts-control .clear-button {
  position: absolute;
  right: 1.6rem;          /* sits left of caret */
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1;
  opacity: .6;
  cursor: pointer;
}
.ts-control .clear-button:hover { opacity: 1; }



#careNoteCats.is-invalid .btn-cat{
  border-color:var(--bs-danger) !important;
  box-shadow:0 0 0 .15rem rgba(220,53,69,.15);
}

/* optional: better keyboard focus */
.btn-cat:focus-visible{
  outline:0;
  box-shadow:0 0 0 .2rem rgba(13,110,253,.25);
}

.care-note-actions .btn { white-space: nowrap; }



/* Default: when expanded, keep header bottom square */
.card > .card-header {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* When the collapse is hidden, round the header bottom corners */
.card:has(> .collapse:not(.show)) > .card-header {
  border-bottom-left-radius: var(--bs-card-border-radius);
  border-bottom-right-radius: var(--bs-card-border-radius);
}

/* Helpful to avoid radius/border bleed */
.card {
  overflow: hidden;
}

/* Hide both by default (safety) */
.collapse-toggle [data-icon="plus"],
.collapse-toggle [data-icon="minus"] {
  display: none;
}

/* When collapsed (aria-expanded="false"), show PLUS */
.collapse-toggle[aria-expanded="false"] [data-icon="plus"] {
  display: inline-block;
}

/* When expanded (aria-expanded="true"), show MINUS */
.collapse-toggle[aria-expanded="true"] [data-icon="minus"] {
  display: inline-block;
}

/* patients table hover color */
.patients-table, .forms-table {
  --bs-table-hover-bg: rgba(0, 32, 64, 0.08); /* subtle brand tint */
  --bs-table-hover-color: inherit;            /* keep text color */
  --bs-table-striped-bg: rgba(0, 32, 64, 0.04);
  --bs-table-border-color: #e6e9ef;
}

.pagination-floating {
    margin: 2rem 0;
}

.pagination-floating .page-link {
    border: none;
    padding: 0.75rem 1rem;
    margin: 0 10px;
    border-radius: 6px;
    background: #fff;
    color: #002040;
    font-weight: 500;
    border: 1px solid #e6e9ef;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.pagination-floating .page-item.active .page-link {
    background: #002040;
    color: #fff;
    border: 1px solid #002040;
}

.pagination-floating .page-link:hover {
    background: #e6e9ef;
    color: #002040;
    border: 1px solid #e6e9ef;
}

.drag-col a {
  z-index: 2;
  position: relative;
}

.search-filter {
  width: 100%;          /* full width on mobile */
  max-width: 100%;
}

@media (min-width: 768px) { /* tablet */
  .search-filter {
    max-width: 320px;
  }
}

@media (min-width: 992px) { /* desktop+ */
  .search-filter {
    max-width: 240px;
  }
}




/* OFFCANVAS (tablet & mobile shared) */
@media (max-width: 1199.98px) {
  #sidebar {
    background-color: #002040 !important;
  }

  .offcanvas-backdrop.show {
    background-color: rgba(255, 255, 255, 0.8) !important;
  }

  #sidebar .btn-close {
    filter: invert(1);
  }
}

/* MOBILE: Sidebar width = 50% */
@media (max-width: 767.98px) {
  #sidebar {
    width: 50% !important;
  }
}

/* TABLET: Sidebar width = 25% */
@media (min-width: 768px) and (max-width: 1199.98px) {
  #sidebar {
    width: 25% !important;
  }
}

@media (min-width: 768px) {
    #desktop-sidebar {
        min-width: 106px;
    }
    
     
    .patients-table th,
    .patients-table td {
      white-space: nowrap;
      border-left: none !important;
      border-right: none !important;
      border-top: 1px solid #dee2e6;    /* or lighter #e6e9ef */
      border-bottom: 1px solid #dee2e6;
    }

    .forms-table th,
    .forms-table td {
      white-space: nowrap;
      border-left: none !important;
      border-right: none !important;
      border-top: 1px solid #dee2e6;    /* or lighter #e6e9ef */
      border-bottom: 1px solid #dee2e6;
    }

    .patients-table th:nth-child(1),
    .patients-table td:nth-child(1) { width: 15%; }
    .patients-table th:nth-child(2),
    .patients-table td:nth-child(2) { width: 15%; }
    .patients-table th:nth-child(3),
    .patients-table td:nth-child(3) { width: 15%; }
    .patients-table th:nth-child(4),
    .patients-table td:nth-child(4) { width: 15%; }
    .patients-table th:nth-child(5),
    .patients-table td:nth-child(5) { width: 15%; }
    .patients-table th:nth-child(6),
    .patients-table td:nth-child(6) { width: 25%; }
  }

  @media (max-width: 767.98px) {
    .patients-table thead {
      display: none;
    }

    .forms-table thead {
      display: none;
    }

    .patients-table tr {
      display: block;
      margin-bottom: 1rem;
      border: 1px solid #dee2e6;
      border-radius: 0.25rem;
      padding: 0.5rem;
    }

    .patients-table td {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0.5rem;
    }

    .patients-table td::before {
      content: attr(data-label);
      font-weight: 600;
      color: #555;
      flex: 0 0 40%;
    }

    .forms-table tr {
      display: block;
      margin-bottom: 1rem;
      border: 1px solid #dee2e6;
      border-radius: 0.25rem;
      padding: 0.5rem;
    }

    .forms-table td {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0.5rem;
    }

    .forms-table td::before {
      content: attr(data-label);
      font-weight: 600;
      color: #555;
      flex: 0 0 40%;
    }
  }



.edit-icon {
    display: inline-flex;
    align-items: center;
    color: #dcdddd;
    text-decoration: none;
}

.edit-icon:hover {
    color: #0d6efd; /* Bootstrap primary */
}

.name-block .edit-profile-btn {
  visibility: hidden;
  color: #dcdddd;
}
.name-block:hover .edit-profile-btn {
  visibility: visible;
  color: #0d6efd;
}

.drop-indicator {
  display: block;
  width: 100%;          /* span the full container */
  height: 4px;
  background: #0d6efd;  /* Bootstrap blue */
  margin: 2px 0;
  border-radius: 2px;
}

/* Workflow Builder Canvas */
#workflow-canvas {
  position: relative;
  padding: 30px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px; /* spacing between steps */
}

/* Each step card */
.workflow-step {
  position: relative;
  background: #fff;
  border: 2px solid #003366;
  border-radius: 12px;
  padding: 16px 20px;
  width: 320px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.15s ease-in-out;
}
.workflow-step:hover {
  transform: translateY(-2px);
}

/* Connector line + arrow */
.workflow-step::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 2px;
  height: 40px;
  background: #003366;
  transform: translateX(-50%);
}
.workflow-step::before {
  content: "";
  position: absolute;
  top: calc(100% + 40px); /* place at bottom of connector */
  left: 50%;
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 10px solid #003366; /* arrowhead color */
}

/* Hide connector+arrow on last card */
.workflow-step:last-child::after,
.workflow-step:last-child::before {
  display: none;
}

/* Step number */
.workflow-step .step-number {
  font-size: 0.9rem;
  color: #666;
}

/* Step label */
.workflow-step .step-label {
  font-weight: 600;
  color: #003366;
  margin-bottom: 4px;
}

/* Step actions (duplicate/delete) */
.workflow-step .step-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

/* Drop indicator for drag/drop */
.drop-indicator {
  width: 60px;
  height: 10px;
  background: #66a3e0;
  border-radius: 4px;
  margin: 0 auto;
}

/* Placeholder (empty canvas) */
#canvas-placeholder {
  text-align: center;
  font-size: 0.95rem;
  color: #003366;
  padding: 20px;
  border: 2px dashed #66a3e0;
  border-radius: 10px;
  background: #f8fbfd;
}

.ts-wrapper {
  width: 100%;
}
.ts-control {
  border-radius: .375rem;
  min-height: calc(1.5em + .5rem + 2px);
  padding: .25rem .5rem;
}

.form-field {
    cursor: pointer;
}

/* --- Whiteboard Card Styling --- */
.grid-stack {
  background: #f8f9fa;
  border-radius: 0.75rem;
  padding: 10px;
  min-height: 900px; /* extra space for 2 rows of large boxes */
}

.grid-stack-item-content {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.75rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.grid-stack-item-content:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.10);
  transform: translateY(-1px);
}

.grid-header {
  background: #f1f3f5;
  border-bottom: 1px solid #dee2e6;
  padding: .6rem .9rem;
  font-weight: 600;
  color: #212529;
  font-size: 0.95rem;
}

.grid-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
  font-size: .9rem;
  padding: 1rem;
}


