/**
 * Miraai HMIS — Berry shell theme (assets served from /public/miraai-ui/assets).
 * Primary brand: #12963B
 */
body.miraai-ui[data-pc-preset='preset-1'] {
  --pc-sidebar-active-color: #12963b;
  --bs-blue: #12963b;
  --bs-primary: #12963b;
  --bs-primary-rgb: 18, 150, 59;
  --bs-primary-light: #e8f5ec;
  --bs-secondary: #0e5a2d;
  --bs-secondary-rgb: 14, 90, 45;
  --bs-secondary-light: #e5f0e8;
  --bs-link-color: #12963b;
  --bs-link-color-rgb: 18, 150, 59;
  --bs-link-hover-color: #0d6829;
  --dt-row-selected: 18, 150, 59;
}

body.miraai-ui[data-pc-preset='preset-1'] .bg-primary-dark {
  background: #0f7a32;
  color: #0f7a32;
}

body.miraai-ui[data-pc-preset='preset-1'] .bg-secondary-dark {
  background: #0a4a24;
  color: #0a4a24;
}

body.miraai-ui[data-pc-preset='preset-1'] .pc-sidebar .pc-item.active > .pc-link,
body.miraai-ui[data-pc-preset='preset-1'] .pc-sidebar .pc-item:focus > .pc-link,
body.miraai-ui[data-pc-preset='preset-1'] .pc-sidebar .pc-item:hover > .pc-link {
  color: #12963b;
}

body.miraai-ui[data-pc-preset='preset-1'] .pc-sidebar .pc-item.active > .pc-link .pc-micon i,
body.miraai-ui[data-pc-preset='preset-1'] .pc-sidebar .pc-item.active > .pc-link .pc-micon svg,
body.miraai-ui[data-pc-preset='preset-1'] .pc-sidebar .pc-item:focus > .pc-link .pc-micon i,
body.miraai-ui[data-pc-preset='preset-1'] .pc-sidebar .pc-item:focus > .pc-link .pc-micon svg,
body.miraai-ui[data-pc-preset='preset-1'] .pc-sidebar .pc-item:hover > .pc-link .pc-micon i,
body.miraai-ui[data-pc-preset='preset-1'] .pc-sidebar .pc-item:hover > .pc-link .pc-micon svg {
  color: #12963b;
}

body.miraai-ui[data-pc-preset='preset-1'] .pc-sidebar .pc-submenu .pc-item:hover:before,
body.miraai-ui[data-pc-preset='preset-1'] .pc-sidebar .pc-submenu .pc-item.active:before {
  background: #12963b;
}

/* Sidebar submenu links: labels only (hide row icons; top-level .pc-navbar > .pc-item icons stay) */
body.miraai-ui .pc-sidebar .pc-submenu .pc-micon {
  display: none !important;
}

body.miraai-ui .pc-sidebar .pc-navbar > .pc-item .pc-submenu .pc-link {
  padding: 12px 30px 12px 32px;
}

body.miraai-ui .pc-sidebar .pc-navbar > .pc-item .pc-submenu .pc-submenu .pc-link {
  padding: 12px 30px 12px 44px;
}

body.miraai-ui .pc-sidebar .pc-navbar > .pc-item .pc-submenu .pc-submenu .pc-submenu .pc-link {
  padding: 12px 30px 12px 56px;
}

/* Sidebar: Tabler icons in .pc-arrow (Berry CSS only sized feather SVGs) */
body.miraai-ui .pc-sidebar .pc-arrow > i {
  display: inline-block;
  font-size: 14px;
  line-height: 1;
  vertical-align: middle;
  color: inherit;
}

/* Keep menu label + icons above decorative .pc-link::after highlight */
body.miraai-ui .pc-sidebar .pc-navbar > .pc-item > .pc-link > .pc-micon,
body.miraai-ui .pc-sidebar .pc-navbar > .pc-item > .pc-link > .pc-mtext,
body.miraai-ui .pc-sidebar .pc-navbar > .pc-item > .pc-link > .pc-arrow {
  position: relative;
  z-index: 1;
}

body.miraai-ui[data-pc-preset='preset-1'] .btn-link {
  --bs-btn-color: #12963b;
  --bs-btn-hover-color: #0d6829;
  --bs-btn-active-color: #0d6829;
}

body.miraai-ui[data-pc-preset='preset-1'] .nav-pills {
  --bs-nav-pills-link-active-bg: #12963b;
}

body.miraai-ui[data-pc-preset='preset-1'] .pagination {
  --bs-pagination-hover-color: #0d6829;
  --bs-pagination-focus-color: #0d6829;
  --bs-pagination-focus-box-shadow: 0 0 0 0.2rem rgba(18, 150, 59, 0.25);
  --bs-pagination-active-bg: #12963b;
  --bs-pagination-active-border-color: #12963b;
}

body.miraai-ui[data-pc-preset='preset-1'] .progress {
  --bs-progress-bar-bg: #12963b;
}

body.miraai-ui[data-pc-preset='preset-1'] .pc-header .pc-head-link.head-link-primary {
  background: rgba(18, 150, 59, 0.14);
  color: #12963b;
}

body.miraai-ui[data-pc-preset='preset-1'] .pc-header .pc-head-link.head-link-primary > i {
  color: #12963b;
}

body.miraai-ui[data-pc-preset='preset-1'] .pc-header .pc-head-link.head-link-primary:hover {
  background: #12963b;
  color: #fff;
}

body.miraai-ui[data-pc-preset='preset-1'] .pc-header .pc-head-link.head-link-primary:hover > i {
  color: #fff;
}

body.miraai-ui[data-pc-preset='preset-1'] .bg-light-primary {
  background: rgba(18, 150, 59, 0.12);
  color: #12963b;
}

body.miraai-ui[data-pc-preset='preset-1'] .link-primary {
  color: #12963b !important;
}

body.miraai-ui[data-pc-preset='preset-1'] .link-primary:hover,
body.miraai-ui[data-pc-preset='preset-1'] .link-primary:focus {
  color: #0d6829 !important;
}

body.miraai-ui[data-pc-preset='preset-1'] .btn-primary {
  --bs-btn-color: #ffffff;
  --bs-btn-bg: #12963b;
  --bs-btn-border-color: #12963b;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: #0f7a32;
  --bs-btn-hover-border-color: #0d6829;
  --bs-btn-focus-shadow-rgb: 18, 150, 59;
  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: #0d6829;
  --bs-btn-active-border-color: #0a5c24;
  --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
  --bs-btn-disabled-color: #ffffff;
  --bs-btn-disabled-bg: #12963b;
  --bs-btn-disabled-border-color: #12963b;
}

body.miraai-ui[data-pc-preset='preset-1'] .btn-outline-primary {
  --bs-btn-color: #12963b;
  --bs-btn-border-color: #12963b;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: #12963b;
  --bs-btn-hover-border-color: #12963b;
  --bs-btn-focus-shadow-rgb: 18, 150, 59;
  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: #12963b;
  --bs-btn-active-border-color: #12963b;
  --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
  --bs-btn-disabled-color: #12963b;
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: #12963b;
  --bs-gradient: none;
}

body.miraai-ui[data-pc-preset='preset-1'] .text-bg-primary {
  color: #ffffff !important;
  background-color: rgba(18, 150, 59, var(--bs-bg-opacity, 1)) !important;
}

body.miraai-ui[data-pc-preset='preset-1'] .alert-primary {
  --bs-alert-color: #0a4a24;
  --bs-alert-bg: #e8f5ec;
  --bs-alert-border-color: #c5e6d1;
  --bs-alert-link-color: #07381a;
}

body.miraai-ui[data-pc-preset='preset-1'] .list-group-item-primary {
  color: #12963b;
  background-color: #e8f5ec;
}

body.miraai-ui[data-pc-preset='preset-1'] .list-group {
  --bs-list-group-active-bg: #12963b;
  --bs-list-group-active-border-color: #12963b;
}

body.miraai-ui[data-pc-preset='preset-1'] .nav {
  --bs-nav-link-hover-color: #0d6829;
}

body.miraai-ui[data-pc-preset='preset-1'] .btn-light-primary {
  background: rgba(18, 150, 59, 0.12);
  color: #12963b;
  border-color: rgba(18, 150, 59, 0.2);
}

body.miraai-ui[data-pc-preset='preset-1'] .btn-light-primary:hover {
  background: #12963b;
  color: #fff;
  border-color: #12963b;
}

/* Header Quick menu: keep panel hidden until open (Berry .pc-header .dropdown-menu animation can fight BS5) */
body.miraai-ui .pc-header .miraai-header-quick-menu:not(.show) {
  display: none !important;
  animation: none !important;
  pointer-events: none;
}

body.miraai-ui .pc-header .miraai-header-quick-menu.show {
  display: block !important;
}

body.miraai-ui[data-pc-preset='preset-1'] .material-icons-two-tone.text-primary {
  background-color: #12963b;
}

body.miraai-ui[data-pc-preset='preset-1'] a.b-b-primary {
  border-bottom: 2px solid #12963b;
  text-decoration: none;
  padding-bottom: 2px;
}

/* Legacy Dexign class names used in HMIS blades */
body.miraai-ui .pc-content .font-w600 {
  font-weight: 600;
}

body.miraai-ui .pc-content .text-black {
  color: #111936 !important;
}

body.miraai-ui .pc-content .badge.badge-success {
  color: #fff;
  background-color: #2bc155;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25em 0.5em;
  border-radius: 0.25rem;
}

body.miraai-ui .pc-content .badge.badge-secondary {
  color: #fff;
  background-color: #6c757d;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25em 0.5em;
  border-radius: 0.25rem;
}

body.miraai-ui .pc-content .badge.badge-warning {
  color: #212529;
  background-color: #ffb800;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25em 0.5em;
  border-radius: 0.25rem;
}

body.miraai-ui .pc-content .badge.badge-light {
  color: #212529;
  background-color: #e9ecef;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25em 0.5em;
  border-radius: 0.25rem;
}

/* Outline secondary — neutral gray #6B7280 */
body.miraai-ui .btn-outline-secondary {
  --bs-btn-color: #6b7280;
  --bs-btn-border-color: #6b7280;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #6b7280;
  --bs-btn-hover-border-color: #6b7280;
  --bs-btn-focus-shadow-rgb: 107, 114, 128;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #6b7280;
  --bs-btn-active-border-color: #6b7280;
  --bs-btn-disabled-color: #6b7280;
  --bs-btn-disabled-border-color: #6b7280;
}
