body {
  background-color: #f5f7fb;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  margin: 0;
  padding: 0;
}

h2 { font-size: 14px !important; }
.btn { font-size: 12px !important; padding: 2px 8px !important; }
.dynamic-row { display: flex; align-items: center; margin-bottom: 2px !important; }
.col-label { width: 90px; font-size: 12px; font-weight: 500; color: #374151; }
.col-value, .form-control-sm { font-size: 12px; padding: 2px 6px !important; }

/* Sticky table header */
.sticky-header th {
  position: sticky;
  top: 0;
  background: #f8f9fa;
  z-index: 5;
  white-space: nowrap;
  font-size: 12px;
  padding: 4px 6px !important;
}

.table td, .table th {
  padding: 4px 6px !important;
  vertical-align: middle;
  font-size: 12px;
}

/* === MAIN FIX FOR FULLSCREEN WHITESPACE === */
.fullscreen-tabs,
.fullscreen-pane {
  height: auto !important;
  min-height: auto !important;
  overflow: visible !important;
  display: block !important;
  position: static !important;
  padding-bottom: 0 !important;
}

.tab-content {
  height: auto !important;
  min-height: auto !important;
  overflow: visible !important;
}

/* Remove ghost height from inactive tab */
.tab-pane:not(.active) {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Active tab behaves normally */
.tab-pane.active {
  display: block !important;
  height: auto !important;
  overflow: visible !important;
}

/* === RESPONSIVE TABLE FOR RESULT PREVIEW === */
#livePreview table {
  min-width: 1200px;
}

#livePreview {
  overflow-x: auto;
  overflow-y: visible;
  background: #fff;
  border-radius: 8px;
  padding: 6px;
}

#livePreview::-webkit-scrollbar {
  height: 6px;
}

#livePreview::-webkit-scrollbar-thumb {
  background-color: #c1c1c1;
  border-radius: 4px;
}

/* === General refinements === */
.scrollable-table {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 420px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.top-row {
  padding: 8px 12px;
  background: #fff;
  margin-bottom: -10px;
  margin-top: -25px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.top-buttons .btn { min-width: 100px; }
.nav-tabs .nav-link { padding: 4px 10px; font-size: 12px; }
.table-light th { background-color: #f9fafb !important; }
.text-center { font-size: 10px !important; }

.compact-table tbody tr td { padding: 2px 4px !important; font-size: 12px !important; line-height: 1 !important; }
.compact-table thead th { padding: 4px !important; font-size: 12px !important; }
.compact-table .btn { padding: 2px 4px !important; font-size: 12px !important; }
.compact-table i { font-size: 8px !important; }

.dynamic-row input { height: 22px !important; padding: 1px 4px !important; font-size: 11px !important; }

#roomList .room-item:hover {
  background-color: #e0f0ff;
  color: #0d6efd;
  font-weight: 500;
  transition: background 0.2s ease;
}

.dynamic-row input, .dynamic-row select {
  width: 90px;
  height: 28px;
  font-size: 11px;
  padding: 1px 4px !important;
  text-align: center;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background-color: #fff;
}
/* Prevent content overlap with fixed navbar */
.content-wrapper {
  margin-top: 80px; /* adjust for navbar height */
}

/* ROOM POPUP STYLES */
.room-popup {
  display: none;
  position: absolute;
  z-index: 1000;
}

.room-popup-container {
  display: flex;
  flex-direction: column;
  background: white;
  border: 2px solid #3b82f6; /* blue border */
  border-radius: 8px;
  max-width: 400px;
}

.room-popup-header {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #e5e7eb; /* light gray border */
  gap: 8px;
}

.room-popup-close {
  border: none;
  background: none;
  font-weight: bold;
  cursor: pointer;
}

.room-popup-search {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
}

.room-popup-list {
  max-height: 220px;
  overflow-y: auto;
  padding: 6px;
}

.room-item {
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 6px;
}

.room-item:hover {
  background-color: #e5e7eb; /* optional hover effect */
}

/* Full-width table with equal columns */
.live-preview-table {
  width: 100% !important;
  table-layout: fixed;
  border-collapse: collapse;
}

/* Auto-fit all 21 columns equally */
.live-preview-table th,
.live-preview-table td {
  width: calc(100% / 21);       /* 21 equal columns */
  max-width: calc(100% / 21);
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: anywhere;
  padding: 0.35rem 0.4rem;
  font-size: 0.80rem;
  vertical-align: middle;
}

/* Header formatting */
.live-preview-table thead th {
  font-size: 0.75rem;
  line-height: 1.1;
}

/* Reduce cell text a bit */
.small-text {
  font-size: 0.85rem;
}

/* Allow scrolling on small screens only */
.table-responsive {
  overflow-x: auto;
}

.top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dynamic-values-container {
  display: flex;
  width: 100%;
  gap: 12px;
  align-items: flex-start;
}

.dynamic-section {
  width: 30%;
}

.dynamic-section-middle {
  width: 35%;
}

.separator {
  width: 1px;
  background-color: #ccc;
  margin: 0 8px;
}

.label-70 {
  width: 70px;
}

.width-90 {
  width: 90px;
}

.w-90 {
  width: 90px;
}

.h-custom {
  height: calc(1.5em + 0.5rem + 2px);
}

.w-95 {
  width: 95px;
}

.fit-content {
  width: fit-content;
}

.mr-5px {
  margin-right: 5px;
}

.top_div {
  margin-bottom: 10px;
}
.nav-link {
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding-right: 10px !important;
}

.delete-floor-btn i {
  color: #dc3545;
  font-size: 10px;
  cursor: pointer;
}

.delete-floor-btn:hover i {
  color: #b02a37;
}

.floor-popup {
  top: -45px;
  left: 100%; /* right side of the button */
  min-width: 110px;
  z-index: 1000;
  margin-left: 5px;
}

.floor-popup .floor-link:hover {
  background-color: #f0f0f0;
}
