:root {
  --color-accent-primary: #004687;
  --color-accent-secondary: #005a9c;
  --color-accent-tertiary: #6c7b8a;
  --color-accent-light: #005a9c;
  --color-accent-hover: #005a9c;
  --color-background: #f7f7f7;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-border: #e0e0e0;
  --color-success: #2e8b57;
  --color-danger: #c8102e;
  --color-info: #2196f3;
  --color-white: #ffffff;
  --color-gray-light: #f5f5f5;
  --color-gray: #e0e0e0;
}

/* general */
html {
  overflow-y: scroll; /* always show vertical scrollbar to prevent layout shift */
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: "Roboto", sans-serif;
  background-color: var(--color-background);
  color: var(--color-text);
  font-size: 17px;
  line-height: 1.6;
  padding-top: 45px;
}

main {
  flex: 1;
}

.btn,
.heading-font,
.navbar-brand,
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Roboto", sans-serif;
  font-weight: 500;
}

.navbar-brand-logo {
  max-height: 35px;
  border-radius: 4px;
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

footer {
  background-color: var(--color-accent-primary);
  color: var(--color-white);
  padding: 1rem 0;
  font-size: 0.9rem;
}

/* htmx-indicator */
.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: flex;
}

.button-loader {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4); /* translucent black overlay */
  justify-content: center;
  align-items: center;
  border-radius: 4px;
  z-index: 10;
}

.button-loader .spinner {
  width: 24px;
  height: 24px;
  border: 3px solid white;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* nav bar */
.navbar {
  background-color: var(--color-accent-primary);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 0rem 1rem;
  min-height: 44px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.navbar-brand {
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--color-white) !important;
  padding: 0;
  line-height: 1;
}

.nav-link {
  color: var(--color-white) !important;
  font-weight: 500;
  padding: 0rem 1rem;
  opacity: 0.9;
  font-size: 1rem;
}

.navbar-toggler {
  padding: 0.25rem 0.5rem;
  font-size: 0.9rem;
}

.nav-link:hover {
  opacity: 1;
}

.navbar i[class^="fa"] {
  font-size: 0.9em;
}

.dropdown-menu {
  font-size: 0.95rem;
}

.dropdown-item:hover {
  background-color: var(--color-accent-tertiary);
  color: var(--color-white);
}

/* index */
.hero-section {
  padding: 3rem 0;
}

.logo-container {
  padding: 1rem;
  background-color: white;
  border-radius: 8px;
  display: inline-block;
}

.header-logo {
  max-height: 100px;
  transition: transform 0.3s ease;
}

.text-primary {
  color: var(--color-accent-primary) !important;
}

.text-secondary {
  color: #6c757d !important;
}

.card {
  border: none;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  background-color: var(--color-white);
}

.icon-container {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bg-primary {
  background-color: var(--color-accent-primary) !important;
}

.hover-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.dataTables_wrapper .dataTables_scroll {
  overflow: auto;
}














.card {
  border: none;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  background-color: var(--color-white);
}

.card-header {
  background-color: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  padding: 0.5rem 1rem;
  font-weight: 500;
}

.card-header.accent {
  background-color: var(--color-white);

  color: var(--color-accent-primary);
}

.table {
  margin-bottom: 0;
}

.table th {
  font-weight: 500;
  color: var(--color-text);
  border-bottom: 2px solid var(--color-border);
}

.table td {
  vertical-align: middle;
  border-color: var(--color-border);
}

.badge {
  font-weight: 500;
  padding: 0.4em 0.8em;
  border-radius: 4px;
}

/* Make Yes/No values bold */
.badge.bg-danger,
.badge.bg-info,
.badge.bg-success {
  font-weight: 500 !important;
}

.bg-success {
  background-color: var(--color-success) !important;
}

.bg-danger {
  background-color: var(--color-danger) !important;
}

.bg-info {
  background-color: var(--color-info) !important;
}



.btn-primary {
  background-color: var(--color-accent-primary);
  border-color: var(--color-accent-primary);
  font-weight: 500;
  font-size: 1.05rem;
}

.btn-primary:focus,
.btn-primary:hover {
  background-color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.btn-outline-primary {
  color: var(--color-accent-primary);
  border-color: var(--color-accent-primary);
}

.btn-outline-primary:hover {
  background-color: var(--color-accent-primary);
  border-color: var(--color-accent-primary);
}

.form-control,
.form-select {
  border-radius: 4px;
  border-color: var(--color-border);
  padding: 0.5rem 0.75rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--color-accent-secondary);
  box-shadow: 0 0 0 0.25rem #005A9C;
}




.section-title {
  color: var(--color-accent-primary);
  font-weight: 500;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

/* List group styling */
.list-group-item {
  border-color: var(--color-border);
  padding: 0.75rem 1.25rem;
}

.list-group-item-action:hover {
  background-color: var(--color-gray-light);
}

.list-group-item-action:active {
  background-color: var(--color-gray);
}



.spinner-border {
  width: 1rem;
  height: 1rem;
  border-width: 0.15em;
}

/* Symptom tag styling */
.symptom-tag {
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background-color: var(--color-accent-light);
}

/* Mobile responsive for categories */
@media (max-width: 700px) {
  .categories-wrapper {
    position: relative;
  }

  .categories-collapse {
    display: none;
  }

  .categories-collapse.show {
    display: block;
  }

  .toggle-categories {
    width: 100%;
    margin-bottom: 1rem;
  }
}

/* Welcome section styling */
.welcome-section {
  background-color: var(--color-white);
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.welcome-title {
  color: var(--color-accent-primary);
  font-size: 1.75rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

/* Feature box styling */
.feature-box {
  background-color: var(--color-white);
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.feature-icon {
  width: 50px;
  height: 50px;
  background-color: var(--color-accent-primary);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.feature-title {
  color: var(--color-accent-primary);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

/* Section styling */
.content-section {
  background-color: var(--color-white);
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.content-section-title {
  color: var(--color-accent-primary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
}

.content-section-title i {
  margin-right: 0.5rem;
}

/* Notes Panel Styles */
.notes-tab {
  position: fixed;
  right: 0;
  top: 25vh;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: right bottom;
  background-color: var(--color-accent-primary);
  color: var(--color-white);
  padding: 8px 12px;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  z-index: 1000;
  font-weight: 500;
  font-size: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.icd-codes-tab {
  position: fixed;
  right: 0;
  top: 60vh;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: right bottom;
  background-color: #6c757d;
  color: var(--color-white);
  padding: 8px 12px;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  z-index: 1000;
  font-weight: 500;
  font-size: 0.9rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.icd-codes-tab:hover {
  background-color: #5a6268;
  color: var(--color-white);
}

.notes-header {
  padding: 10px 15px;
  background-color: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Update notes panel positioning and size */
.notes-panel {
  position: fixed;
  top: 200px;
  /* Move higher (originally closer to middle) */
  right: 0;
  width: 370px;
  max-height: 70vh;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.notes-panel.active {
  transform: translateX(0);
}

/* Make textarea larger to match new panel width */
#notesContent {
  flex: 1;
  min-height: 250px;
  padding: 12px;
  border: none;
  border-top: 1px solid #e9ecef;
  border-bottom: 1px solid #e9ecef;
  resize: none;
  font-size: 0.9rem;
}

.notes-footer {
  padding: 10px 15px;
  background-color: var(--color-white);
  border-top: 1px solid var(--color-border);
  text-align: right;
}

.notes-footer .btn {
  background-color: var(--color-accent-primary);
  color: var(--color-white);
  border: none;
  font-size: 0.9rem;
}

.notes-footer .btn:hover {
  background-color: var(--color-accent-hover);
}

.form-sid-info {
  background-color: #f8f9fa;
  border-radius: 4px;
  padding: 8px 12px;
  margin: 8px 0 12px;
  font-size: 0.85rem;
  border-left: 3px solid #0d6efd;
  word-break: break-all;
}

.form-sid-info small {
  display: block;
  line-height: 1.4;
}

/* Enhanced Index Page Styles */












.text-success {
  color: #198754 !important;
}



/* Call to action button hover effect */
.btn-light:hover {
  background-color: #f8f9fa;
  border-color: #f8f9fa;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.cta-section {
  padding: 2rem 0;
  border-radius: 4px !important;
}

.container {
  max-width: 1300px;
  margin: 0 auto;
}

.highlight-badge {  
  background-color: var(--color-accent-light);  
  color: white;  
  font-size: 0.7rem;  
  font-weight: 600;  
  padding: 2px 6px;  
  border-radius: 8px;  
  min-width: 18px;  
  text-align: center;  
  margin-left: auto; /* Push to right */  
}  
  
.highlight-badge:empty {  
  display: none;  
}
  
.button-main-content {  
  display: flex;  
  align-items: center;  
  flex: 1;  
}

/* Select2 Single Select Styling */
.select2-container--default .select2-selection--single {
  position: relative;
  height: calc(1.5em + 1rem + 2px);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background-color: white;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  display: flex;
  align-items: center;
}

/* Rendered value & placeholder */
.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: var(--color-text);
  padding-left: 0;
}

/* Dropdown arrow container with custom Bootstrap-style chevron */
.select2-container--default .select2-selection--single .select2-selection__arrow {
  width: 1.5rem;
  height: 100%;
  position: absolute;
  top: 0;
  right: 0.75rem;
  pointer-events: none;
}

/* Insert Font Awesome V (chevron-down) */
.select2-container--default .select2-selection--single .select2-selection__arrow::after {
  content: '\f078'; /* fa-chevron-down */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.75rem;
  color: var(--color-text);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Remove default triangle */
.select2-selection__arrow b {
  border: none !important;
}

/* Focus state */
.select2-container--default.select2-container--focus .select2-selection--single {
  border-color: var(--color-accent-secondary) !important;
  box-shadow: 0 0 0 0.25rem #005A9C;
  outline: none;
}

/* Dropdown styling */
.select2-container .select2-dropdown {
  z-index: 1050;
}

/* Scrollable results */
.select2-container--default .select2-results > .select2-results__options,
.select2-container .select2-results__options {
  max-height: 400px !important;
  overflow-y: auto !important;
}

/* Hovered option */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: var(--color-gray-light);
  color: var(--color-text);
}

/* Search box in dropdown */
.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 1px solid #005A9C;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  font-size: 1rem;
}

/* Increase height of the main Select2 box */
.select2-container .select2-selection--single {
  height: 38px !important;
}

/* Adjust the text vertical alignment */
.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 38px !important;
}

/* Fix the dropdown arrow position */
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 36px !important;
}

/* Make dropdown options taller */
.select2-results__option {
  padding: 8px 12px !important;
}


.notes-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--color-accent-primary);
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 1100;
  font-size: 0.9rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.notes-notification.show {
  opacity: 1;
  transform: translateY(0);
}