/* Sidebar column – keeps its own width & sticks while scrolling */
.sidebar-unit-nav {
   position: sticky;
   top: 0;
   min-width: 120px;
}

/* The button that holds the icon (and optional text) */
.sidebar-unit-nav .unit-item {
   display: flex;
   align-items: center;
   justify-content: center; /* centre icon when there’s no text */

   width: 100%;
   border: 0;
   border-radius: 0.375rem;
   background: #e2e2e2; /* inactive colour */

   transition: background 0.15s;
   margin-bottom: 0.6rem;
   height: 52px;
}
/* Hover and focus state: full li highlight */
.sidebar-unit-nav .unit-item:hover,
.sidebar-unit-nav .unit-item:focus-within {
   background-color: #d4d4d4;
}

/* Active tab styling */
.sidebar-unit-nav .unit-item.active {
   background-color: #c8e0f4;
   color: #000;
}

/* Validation states (apply these to <li>) */
.sidebar-unit-nav .unit-item.unit-invalid {
   background-color: #ffb3b3;
}

.sidebar-unit-nav .unit-item.unit-valid {
   background-color: #b6e3b6;
}

.sidebar-unit-nav .nav-link.active {
   background-color: transparent;
   color: inherit;
   border: none;
}

/* Icon sizing – keep aspect ratio, shrink for narrow sidebar */
.unit-icon {
   width: 50px;
   height: auto;
   flex: 0 0 auto; /* don’t stretch */
}

/* Make select boxes and text inputs look disabled */
.form-select:disabled,
.form-control:disabled,
.form-select[readonly],
.form-control[readonly] {
   background-color: #e9ecef !important;
   color: #6c757d !important;
   opacity: 1 !important;
   cursor: not-allowed !important;
}

.was-default {
   background-color: #f2f9ff; /* subtle blue hint */
   border-left: 3px solid #cce5ff;
}

.was-default:focus {
   transition: background-color 0.3s ease;
   background-color: #fff8e1; /* pale yellow as it transitions out */
}

/* Uniform height constraint for all SVG views */
.svg-canvas-container {
   width: 100%;
   height: 320px;
   max-height: 320px;
   display: flex;
   justify-content: center;
   align-items: center;
   overflow: hidden;
   background-color: #f9f9f9; /* optional for visibility */
}

/* Ensure injected SVGs scale nicely inside containers */
.svg-canvas-container svg {
   width: 100%;
   height: 100%;
   max-height: 100%;
   object-fit: contain;
}

#planProjectionView,
#isoProjectionView {
   align-items: flex-end; /* align ground across views */
}

.svg-canvas-container {
   width: 100%;
   height: 320px;
   display: flex;
   justify-content: center;
   align-items: center;
   overflow: hidden;
}

.svg-canvas-container svg {
   width: 100%;
   height: 100%;
   aspect-ratio: auto; /* or remove */
}

.alert-soft-danger {
   background-color: #fcebea;
   color: #611a15;
   border: 1px solid #f5c6cb;
}

.alert-soft-success {
   background-color: #edf7ed; /* soft green background */
   color: #1e4620; /* deep green text */
   border: 1px solid #c8e6c9; /* light green border */
}

#sweepBlocksTable td,
#sweepBlocksTable th {
   padding: 0.25rem 0.5rem; /* tighter than default */
   font-size: 0.75rem; /* smaller font than .small */
}

#sweepBlocksTable .text-success,
#sweepBlocksTable .text-danger {
   white-space: nowrap; /* avoids wrapping icons */
}

/* Make rows look clickable */
#sweepBlocksTable tbody tr {
   cursor: pointer; /* change mouse pointer */
   transition: background-color 0.15s ease-in-out;
}

/* Row hover effect */
#sweepBlocksTable tbody tr:hover {
   background-color: rgba(0, 0, 0, 0.05); /* subtle gray */
}

#sweepBlocksTable {
   border-collapse: collapse;
   width: auto; /* keep natural width */
}

#sweepBlocksTable thead th {
   position: sticky;
   top: 0;
   background: #f8f9fa; /* Bootstrap light */
   z-index: 1;
}

#sweepBlocksTable tbody {
   display: block;
   max-height: 300px;
   overflow-y: auto;
}

#sweepBlocksTable thead,
#sweepBlocksTable tbody tr {
   display: table;
   width: 100%;
   table-layout: fixed;
}

/* For the print version of the Clearance Report */
@media print {
   @page {
      margin: 15mm;
   }

   body * {
      visibility: hidden !important;
   }

   #reportSummaryModalClearance,
   #reportSummaryModalClearance * {
      visibility: visible !important;
   }

   #reportSummaryModalClearance {
      display: block !important;
      position: absolute !important;
      top: 5mm !important;
      left: 5mm !important;
      right: 5mm !important;
      margin: 0 !important;
      padding: 0 !important;
      width: calc(100vw - 10mm) !important; /* 100vw minus left+right margins */
      max-width: calc(100vw - 10mm) !important;
      min-width: 0 !important;
      background: #fff !important;
      box-shadow: none !important;
      z-index: 99999 !important;
   }

   .modal-backdrop.show {
      display: none !important;
   }

   .d-print-none {
      display: none !important;
   }

   html,
   body {
      background: #fff !important;
      margin: 0 !important;
      padding: 0 !important;
      width: 100vw !important;
   }
}
