/* custom.css - ECMN Property Database - Custom Styling */

/* ========== ECMN COLOR PALETTE ========== */
/*
Primary ECMN Colors:
- ECMN Blue (Primary):     #1C4C98
- ECMN Blue (Dark):        #153b75
- ECMN Blue (Darker):      #0f2d5a
- ECMN Gold (Accent):      #F2A900

Secondary Colors:
- Cream (Boxes):           #F5F3EF
- White (Background):      #FFFFFF
- Dark Gray (Text):        #333333
- Light Gray (Alt BG):     #f4f4f4

Alert/Info Colors:
- Light Blue (Info box):   #e8f4f8
- Dark Blue (Text):        #1C4C98
*/

/* ========== ECMN DESIGN SYSTEM - REUSABLE CLASSES ========== */
/* Use these classes in ALL forms for consistent styling */

/* Form submit buttons - use class="ecmn-submit-btn" */
/* ========== FORCE ALL SUBMIT BUTTONS TO BE BLUE ========== */
/* Increase specificity to override any default styling */
/* Cambon Font Family - for large headings */
@font-face {
  font-family: 'Cambon';
  src: url('../fonts/cambon/Cambon-Regular.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: 'Cambon';
  src: url('../fonts/cambon/Cambon-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
}

/* Larsseit Font Family - for body and small headings */
@font-face {
  font-family: 'Larsseit';
  src: url('../fonts/larsseit/LarsseitMedium.woff') format('woff');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Larsseit';
  src: url('../fonts/larsseit/LarsseitBold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
}

/* Apply fonts */
body, p, .box, .sidebar, input, select, textarea, .sidebar-menu {
  font-family: 'Larsseit', Arial, sans-serif !important;
}

h1, h2, h3 {
  font-family: 'Cambon', Georgia, serif !important;
}

h4, h5, h6 {
  font-family: 'Larsseit', Arial, sans-serif !important;
}

/* Apply fonts to dashboard-specific elements */
.main-header .logo span,
.main-header span,
.box-title,
.content-wrapper h1,
.content-wrapper h3 {
  font-family: 'Cambon', Georgia, serif !important;
}

/* Header title - large at top, smaller when scrolled */


.sidebar-menu li a,
.box-body,
.dataTables_wrapper,
label,
.form-control {
  font-family: 'Larsseit', Arial, sans-serif !important;
}

button.ecmn-submit-btn,
.btn.ecmn-submit-btn,
button.btn.ecmn-submit-btn,
#vitality-submit,
#conditions-submit,
.action-button.ecmn-submit-btn {
  background-color: #1C4C98 !important;
  border-color: #153b75 !important;
  color: #FFFFFF !important;
  padding: 10px 30px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  margin-top: 20px !important;
  border-radius: 4px !important;
}

button.ecmn-submit-btn:hover,
.btn.ecmn-submit-btn:hover,
button.btn.ecmn-submit-btn:hover,
#vitality-submit:hover,
#conditions-submit:hover,
.action-button.ecmn-submit-btn:hover {
  background-color: #153b75 !important;
  border-color: #0f2d5a !important;
  color: #FFFFFF !important;
}

button.ecmn-submit-btn:active,
button.ecmn-submit-btn:focus,
.btn.ecmn-submit-btn:active,
.btn.ecmn-submit-btn:focus {
  background-color: #0f2d5a !important;
  box-shadow: 0 0 0 0.2rem rgba(28, 76, 152, 0.5) !important;
  color: #FFFFFF !important;
}

/* Form sections - use class="ecmn-form-section" */
.ecmn-form-section {
  background-color: #F5F3EF !important;
  border: 1px solid #FCF7EA !important;
  border-radius: 4px !important;
  padding: 20px !important;
  margin-bottom: 20px !important;
}

/* Section headers - use class="ecmn-section-header" */
.ecmn-section-header {
  color: #49179B !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  margin-bottom: 15px !important;
  border-bottom: 2px solid #F2A900 !important;
  padding-bottom: 8px !important;
}

/* Info boxes - use class="ecmn-info-box" */
.ecmn-info-box {
  background-color: #DBD1EB !important;
  border: 1px solid #49179B !important;
  color: #49179B !important;
  padding: 15px !important;
  margin-bottom: 20px !important;
  border-radius: 4px !important;
}

.ecmn-info-box h4 {
  color: #49179B !important;
  font-weight: 600 !important;
  margin-top: 0 !important;
}

/* Question containers - use class="ecmn-question" */
.ecmn-question {
  background-color: #FFFFFF !important;
  padding: 15px !important;
  margin-bottom: 15px !important;
  border: 1px solid #e0ddd9 !important;
  border-radius: 4px !important;
}


/* ========== FLOATING PROGRESS INDICATOR ========== */
/* Supports both class-based and inline-styled progress indicators */
.ecmn-floating-progress {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #FFFFFF !important;
  color: #333333 !important;
  padding: 15px !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
  z-index: 1000;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ecmn-floating-progress h5 {
  margin: 0 !important;
  color: #1C4C98 !important;
  font-size: 16px !important;
}

.ecmn-floating-progress .fa {
  color: #1C4C98 !important;
  margin-right: 5px;
}

/* Progress bar styling for both inline and class-based approaches */
.ecmn-floating-progress .progress,
[style*="position: fixed"][style*="bottom: 20px"][style*="right: 20px"] .progress {
  height: 25px !important;
  width: 200px !important;
  background-color: #F5F3EF !important;
  margin-bottom: 0 !important;
  border-radius: 4px !important;
  overflow: hidden;
}

.ecmn-floating-progress .progress-bar,
[style*="position: fixed"][style*="bottom: 20px"][style*="right: 20px"] .progress-bar {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #FFFFFF !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.3s ease;
}

/* Progress bar color states */
.progress-bar.bg-danger {
  background-color: #dc3545 !important;
  color: #FFFFFF !important;
}

.progress-bar.bg-warning {
  background-color: #F2A900 !important;
  color: #333333 !important;
}

.progress-bar.bg-success {
  background-color: #28a745 !important;
  color: #FFFFFF !important;
}

/* Ensure h5 in floating progress indicators have consistent styling */
[style*="position: fixed"][style*="bottom: 20px"][style*="right: 20px"] h5 {
  margin: 0 0 10px 0 !important;
  color: #49179B !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}

[style*="position: fixed"][style*="bottom: 20px"][style*="right: 20px"] h5 .fa {
  color: #49179B !important;
  margin-right: 5px;
}

/* Form inputs - use class="ecmn-form-input" */
.ecmn-form-input {
  background-color: #FFFFFF !important;
  border: 1px solid #e0ddd9 !important;
  border-radius: 4px !important;
}

.ecmn-form-input:focus {
  border-color: #1C4C98 !important;
  box-shadow: 0 0 0 0.2rem rgba(28, 76, 152, 0.25) !important;
}

/* Secondary buttons - use class="ecmn-secondary-btn" */
.ecmn-secondary-btn {
  background-color: #FFFFFF !important;
  border: 2px solid #1C4C98 !important;
  color: #1C4C98 !important;
  padding: 10px 30px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  margin-top: 20px !important;
  border-radius: 4px !important;
}

.ecmn-secondary-btn:hover {
  background-color: #F5F3EF !important;
  border-color: #153b75 !important;
  color: #153b75 !important;
}

/* ========== HEADER - STICKY ========== */
.main-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1030 !important;
  width: 100% !important;
  background-color: transparent !important;
}


.main-header .logo {
  height: 100px !important;
  line-height: 100px !important;
  text-align: left !important;
  padding-left: 15px !important;
}

.skin-blue .main-header .navbar {
  background-color: white !important;
  z-index: 1031 !important;
}

.skin-blue .main-header .logo {
  background-color: white !important;
  text-align: left !important;
  z-index: 1031 !important  ;
}

.main-header .logo-lg img {
  max-height: 95.5px !important;
  width: auto !important;
  margin-right: 10px;
  vertical-align: bottom;
  padding-bottom: 1.3px;
}

/* ========== HIDE DEFAULT HEADER TOGGLE ========== */
.main-header .sidebar-toggle {
  display: none !important;
}

/* ========== SIDEBAR COLLAPSED - LOGO HANDLING ========== */
/* Option: Hide logo when sidebar is collapsed */
.sidebar-collapse .main-header .logo {
  display: none !important;
}

/* Shift navbar to align with collapsed sidebar */
.sidebar-collapse .main-header .navbar {
  margin-left: 50px !important;
}

/* ========== LEFT SIDEBAR - STICKY ========== */
.skin-blue .main-sidebar {
  background-color: #FFFFFF !important;
  padding-top: 100px !important;
  position: fixed !important;
  top: 0 !important;
  height: 100vh !important;
  overflow-y: auto !important;
  z-index: 1020 !important;
  box-shadow: 2px 0 6px rgba(232, 244, 248, 0.8) !important;
}

.skin-blue .sidebar-menu > li {
  border-top: 1px solid #f4f4f4 !important;
}

.skin-blue .sidebar-menu > li > a {
  color: #333333 !important;
}

.skin-blue .sidebar-menu > li > a > .fa,
.skin-blue .sidebar-menu > li > a > .glyphicon {
  color: #1C4C98 !important;
}

.skin-blue .sidebar-menu > li:hover > a {
  background-color: #ECE7F5 !important;
  color: #49179B !important;
  border-left: 3px solid #cec4b4 !important;
}

.skin-blue .sidebar-menu > li.active > a {
  background-color: #1C4C98 !important;
  color: #FFFFFF !important;
  border-left: 3px solid #F2A900 !important;
}

.skin-blue .sidebar-menu > li.active > a > .fa,
.skin-blue .sidebar-menu > li.active > a > .glyphicon {
  color: #FFFFFF !important;
}

/* ========== SUB-MENU ITEMS STYLING ========== */
/* Override default treeview-menu background */
.skin-blue .sidebar-menu > li > .treeview-menu {
  background: transparent !important;
}

/* Style for sub-menu items (nested items) */
.skin-blue .sidebar-menu .treeview-menu > li > a {
  background-color: #BBDEFB !important;
  border-left: 3px solid #F9A825 !important;
  border-right: none !important;
  border-top: none !important;
  border-bottom: none !important;
  color: #333333 !important;
  padding-left: 25px !important;
}

/* Style for the treeview-menu container when open */
.skin-blue .sidebar-menu .treeview-menu.menu-open {
  border-left: 3px solid transparent !important;
}

/* Hover state for sub-menu items - keep default hover behavior */
.skin-blue .sidebar-menu .treeview-menu > li > a:hover {
  background-color: #90CAF9 !important;
  border-left: 3px solid #1C4C98 !important;
}

/* Active sub-menu item */
.skin-blue .sidebar-menu .treeview-menu > li.active > a {
  background-color: #64B5F6 !important;
  border-left: 3px solid #F9A825 !important;
  color: #1C4C98 !important;
  font-weight: 600 !important;
}

/* Style the expand/collapse chevron icon to be gold */
.skin-blue .sidebar-menu > li.treeview > a > .fa-angle-left,
.skin-blue .sidebar-menu > li.treeview > a > .pull-right-container > .fa-angle-left {
  color: #F9A825 !important;
}

/* Ensure the chevron stays gold when menu item is active or hovered */
.skin-blue .sidebar-menu > li.treeview:hover > a > .fa-angle-left,
.skin-blue .sidebar-menu > li.treeview:hover > a > .pull-right-container > .fa-angle-left,
.skin-blue .sidebar-menu > li.treeview.active > a > .fa-angle-left,
.skin-blue .sidebar-menu > li.treeview.active > a > .pull-right-container > .fa-angle-left {
  color: #F9A825 !important;
}

/* ========== CUSTOM SIDEBAR TOGGLE - FLOATING CHEVRON ========== */
.sidebar-toggle-custom {
  position: fixed;
  left: 0;
  top: 55%;
  transform: translateY(-50%);
  width: 20px;
  height: 40px;
  background-color: #e8f4f8 !important;
  color: #1C4C98 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  border-radius: 0 6px 6px 0;
  z-index: 1025;
  transition: all 0.3s ease;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
  border: 1px solid #1C4C98;
  border-left: none;
}

.sidebar-toggle-custom:hover {
  background-color: #e8f4f8 !important;
  width: 25px;
  box-shadow: 3px 0 12px rgba(0, 0, 0, 0.25);
}

.sidebar-toggle-custom:active {
  background-color: #e8f4f8 !important;
}

.sidebar-collapse .sidebar-toggle-custom {
  left: 0;
}

.sidebar-toggle-custom::before {
  content: attr(data-tooltip);
  position: absolute;
  left: 100%;
  margin-left: 10px;
  padding: 5px 10px;
  color: white;
  font-size: 12px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.sidebar-toggle-custom:hover::before {
  opacity: 1;
}

/* ========== MAIN CONTENT AREA ========== */
body {
  background-color: #FFFFFF !important;
}

.content-wrapper {
  margin-left: 230px !important;
  margin-top: 0 !important;
  padding-top: 0 !important; /* Removed padding to prevent scroll gap */
  background-color: #FFFFFF !important;
  min-height: calc(100vh - 100px) !important;
  position: relative !important;
  z-index: 1035 !important;
  transition: margin-left 0.3s ease;
  /* Enable scrolling for sticky headers to work */
  overflow-y: auto !important;
  max-height: 100vh !important;
}

.sidebar-collapse .content-wrapper {
  margin-left: 50px !important;
}

.wrapper {
  background-color: #FFFFFF !important;
}

.main-footer {
  margin-left: 230px !important;
  margin-top: 0 !important;
  background-color: #f4f4f4 !important;
  transition: margin-left 0.3s ease;
}

.sidebar-collapse .main-footer {
  margin-left: 50px !important;
}

.content-wrapper > .content {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.content {
  padding: 15px !important;
  background-color: #FFFFFF !important;
}

.content-wrapper::before,
.content::before {
  display: none !important;
}

.content > *:first-child {
  margin-top: 0 !important;
}

/* ========== REMOVE CONTENT-HEADER ========== */
.content-header {
  /* display: none !important; */
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: white !important;
  border: none !important;
}

/* .content-wrapper > .content > .content-header,
section.content-header {
  display: none !important;
} */

/* ========== PAGE TITLES WITH GOLD UNDERLINE ========== */
.content-wrapper h1 {
  background-color: #FFFFFF !important;
  border-bottom: 1.3px solid #eba900 !important;
  padding-bottom: 7px !important;
  margin-bottom: 18px !important;
  z-index: 1031 !important;
  color: #1C4C98 !important;
}

/* ========== STICKY PAGE TITLES ========== */
/* Make h1 elements at the top of each tab sticky so they don't scroll */
.tab-pane > h1:first-child {
  position: sticky;
  top: 0;
  z-index: 900;
  background-color: #FFFFFF !important;
  padding-top: 30px; /* Add extra padding to position h1 lower (15px original + 10px from removed content-wrapper padding) */
  margin-top: -15px !important; /* Pull background up to cover .content padding */
  margin-left: -15px !important; /* Extend to cover left padding */
  margin-right: -15px !important; /* Extend to cover right padding */
  padding-left: 15px !important; /* Add back internal padding */
  padding-right: 15px !important; /* Add back internal padding */
  /* Shadow to create depth when scrolling */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0);
  transition: box-shadow 0.3s ease;
}

/* Add subtle shadow when content scrolls under the header */
.content-wrapper.scrolled .tab-pane > h1:first-child {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Also make the hr sticky if it immediately follows h1 */
.tab-pane > h1:first-child + hr {
  position: sticky;
  top: 60px; /* Positioned below the h1 */
  z-index: 899;
  background-color: #FFFFFF !important;
  margin-top: 0 !important;
  border-top: 0 !important;
  /* Add white background bar to prevent content bleeding through */
  box-shadow: 0 10px 0 #FFFFFF, 0 12px 8px rgba(0, 0, 0, 0);
  transition: box-shadow 0.3s ease;
}

/* ========== LEGACY SHINY ELEMENT OVERRIDES ========== */
/* These ensure default Shiny elements also follow the design system */

.alert-info {
  background-color: #e8f4f8 !important;
  border: 1px solid #1C4C98 !important;
  border-bottom: 3px solid #E8A822 !important;
  color: #1C4C98 !important;
  margin-bottom: 20px !important;
}

.alert-info h4 {
  color: #1C4C98 !important;
  font-weight: 600;
}

.well {
  background-color: #F5F3EF !important;
  border: 1px solid #FCF7EA !important;
  border-radius: 4px !important;
  padding: 15px !important;
  margin-bottom: 15px !important;
}

.box {
  background-color: #F5F3EF !important;
  border: 1px solid #FCF7EA !important;
}

.box-header {
  background-color: #F5F3EF !important;
}

.btn-success {
  background-color: #1C4C98 !important;
  border-color: #153b75 !important;
  color: #FFFFFF !important;
}

.btn-success:hover {
  background-color: #153b75 !important;
  border-color: #0f2d5a !important;
  color: #FFFFFF !important;
}

.btn-primary {
  background-color: #1C4C98 !important;
  border-color: #153b75 !important;
  color: #FFFFFF !important;
}

.btn-primary:hover {
  background-color: #153b75 !important;
  color: #FFFFFF !important;
}

.progress-bar {
  background-color: #F2A900 !important;
}

.progress {
  background-color: #F5F3EF !important;
}

.form-control {
  background-color: #FFFFFF !important;
  border: 1px solid #e0ddd9 !important;
}

.form-control:focus {
  border-color: #1C4C98 !important;
  box-shadow: 0 0 0 0.2rem rgba(28, 76, 152, 0.25) !important;
}

.box.box-solid.box-primary > .box-header {
  background-color: #1C4C98 !important;
  color: #FFFFFF !important;
}

.box.box-primary {
  border-top-color: #1C4C98 !important;
}

/* Solid header boxes for different statuses */
.box.box-solid.box-success > .box-header {
  background-color: #1C4C98 !important;
  color: #FFFFFF !important;
}

.box.box-success {
  border-top-color: #1C4C98 !important;
}

.box.box-solid.box-warning > .box-header {
  background-color: #1C4C98 !important;
  color: #333333 !important;
}

.box.box-warning {
  border-top-color: #1C4C98 !important;
}

.box.box-solid.box-info > .box-header {
  background-color: #1C4C98 !important;
  color: #FFFFFF !important;
}

.box.box-info {
  border-top-color: #1C4C98 !important;
}

/* Ensure all solid header box titles are properly colored */
.box.box-solid > .box-header .box-title {
  color: inherit !important;
}

/* Fix text color in info boxes */
.box.box-info .box-title {
  color: #333333 !important;
}

.box.box-info .box-body {
  color: #333333 !important;
}

.box.box-info .box-body h3,
.box.box-info .box-body h4,
.box.box-info .box-body h5,
.box.box-info .box-body p {
  color: #333333 !important;
}

.skin-blue .main-header .navbar .sidebar-toggle:before {
  content: none !important;
}

.skin-blue .sidebar a {
  color: #333333 !important;
}

.skin-blue .sidebar a:hover {
  background: #F5F3EF !important;
}

/* =============================================================================
   SCORE DISPLAY STYLES
   ============================================================================= */

/* Large score display */
.score-large {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  margin: 10px 0;
}

/* Score category colors */
.score-asset { color: #4CAF50; font-weight: bold; }
.score-moderate { color: #FFC107; font-weight: bold; }
.score-challenge { color: #F44336; font-weight: bold; }

/* Score display panel */
.score-display {
  font-size: 2em;
  font-weight: bold;
  margin: 10px 0;
}

/* =============================================================================
   CATEGORY BADGES
   ============================================================================= */

.category-asset {
  background-color: #4CAF50;
  color: white;
}

.category-moderate {
  background-color: #FFC107;
  color: #333;
}

.category-challenge {
  background-color: #F44336;
  color: white;
}

/* =============================================================================
   ARCHETYPE STYLES
   ============================================================================= */

/* Archetype badges */
.archetype-reimagine { background-color: #2E7D32; color: white; }
.archetype-reinvest { background-color: #1565C0; color: white; }
.archetype-realign { background-color: #F9A825; color: #333; }
.archetype-respite { background-color: #C62828; color: white; }

/* Archetype badge base */
.archetype-badge {
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: bold;
  display: inline-block;
  margin: 5px 0;
}

/* =============================================================================
   WARNING SEVERITY STYLES
   ============================================================================= */

.severity-critical {
  background-color: #FFCDD2;
  border-left: 4px solid #C62828;
}

.severity-warning {
  background-color: #FFF9C4;
  border-left: 4px solid #F9A825;
}

.severity-info {
  background-color: #BBDEFB;
  border-left: 4px solid #1565C0;
}

/* Warning cards */
.warning-card {
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 4px;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.warning-card.critical {
  border-left: 4px solid #C62828;
}

.warning-card.warning {
  border-left: 4px solid #F9A825;
}

.warning-card.info {
  border-left: 4px solid #1565C0;
}

/* Warning cards - alternate naming */
.warning-critical { border-left: 4px solid #C62828; }
.warning-warning { border-left: 4px solid #F9A825; }
.warning-info { border-left: 4px solid #1565C0; }

/* =============================================================================
   INFO CARD STYLES
   ============================================================================= */

.info-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* =============================================================================
   LOADING INDICATOR
   ============================================================================= */

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.8);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #1C4C98;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* =============================================================================
   MAP STYLING
   ============================================================================= */

.leaflet-container {
  border-radius: 8px;
}

/* =============================================================================
   TABLE HOVER EFFECTS
   ============================================================================= */

.dataTables_wrapper tbody tr:hover {
  background-color: #f5f5f5;
  cursor: pointer;
}

/* =============================================================================
   PROGRESS BAR STYLING (for score bars)
   ============================================================================= */

.progress-bar-asset {
  background-color: #4CAF50;
}

.progress-bar-moderate {
  background-color: #FFC107;
}

.progress-bar-challenge {
  background-color: #F44336;
}

/* =============================================================================
   DASHBOARD VALUE BOXES ENHANCEMENTS
   ============================================================================= */

.small-box .icon {
  opacity: 0.3;
}

.small-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
}

/* =============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================= */

@media (max-width: 768px) {
  .score-large {
    font-size: 2em;
  }
  
  .info-card {
    padding: 15px;
  }
}

/* =============================================================================
   STICKY BOX HEADERS FOR TABLES
   ============================================================================= */

/* Make box containers scrollable with sticky headers */
.box.box-solid {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 180px); /* Adjusted for 8-row table view */
}

/* For smaller viewports (including scaled displays) */
@media (max-height: 900px) {
  .box.box-solid {
    max-height: calc(100vh - 150px);
  }
}

@media (max-height: 768px) {
  .box.box-solid {
    max-height: calc(100vh - 120px);
  }
}

.box.box-solid > .box-header {
  position: sticky;
  top: 0;
  z-index: 850;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0);
  transition: box-shadow 0.3s ease;
}

/* Add shadow when content scrolls under the header */
.box.box-solid.scrolled > .box-header {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.box.box-solid > .box-body {
  overflow-y: auto;
  flex: 1;
}

/* Ensure DataTables work properly with sticky headers */
.box.box-solid .dataTables_wrapper {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Sticky controls row (length + filter in same row) */
.box.box-solid .dataTables_wrapper .datatable-controls-row {
  position: sticky;
  top: 0;
  z-index: 830;
  background-color: #F5F3EF !important;
  padding: 10px 15px;
  margin: 0 !important;
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0);
  transition: box-shadow 0.3s ease;
}

/* Small extension above controls to cover any peeking table rows */
.box.box-solid .dataTables_wrapper .datatable-controls-row::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  height: 50px; /* Just enough to cover peeking rows */
  background-color: #F5F3EF !important;
  z-index: -1;
}

/* Add shadow when scrolled */
.box.box-solid.scrolled .datatable-controls-row {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Length and filter controls inline */
.box.box-solid .dataTables_wrapper .dataTables_length {
  margin: 0 !important;
}

.box.box-solid .dataTables_wrapper .dataTables_filter {
  margin: 0 !important;
}

/* Table itself (no internal scrolling) */
.box.box-solid .dataTables_wrapper table {
  width: 100% !important;
}

/* Sticky table header */
.box.box-solid .dataTables_wrapper table thead {
  position: sticky;
  top: 50px; /* Below the controls row */
  z-index: 820;
  background-color: #FFFFFF !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Ensure table header cells have background */
.box.box-solid .dataTables_wrapper table thead th {
  background-color: #FFFFFF !important;
}

/* Bottom pagination/info area - sticky at bottom */
.box.box-solid .dataTables_wrapper .bottom {
  position: sticky;
  bottom: 0;
  padding: 10px 15px;
  background-color: #F5F3EF !important;
  flex-shrink: 0;
  margin-top: auto;
  z-index: 810;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
}

/* Small extension below pagination to cover any peeking table rows */
.box.box-solid .dataTables_wrapper .bottom::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 50px; /* Just enough to cover peeking rows */
  background-color: #F5F3EF !important;
  z-index: -1;
}

/* Property table styling */
#properties-properties_table {
  font-size: 12px;
}

#properties-properties_table td {
  white-space: nowrap;      /* Prevent line breaks */
  /* OR */
  white-space: normal;      /* Allow line breaks */
  word-wrap: break-word;    /* Break long words */
  max-width: 200px;         /* Limit column width */
  line-height: 1.3;
}

#properties-properties_table th {
  font-size: 11px;
  white-space: nowrap;
}
