/* Tabbed Interface for Room Designer Left Panel */

.tab-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100% !important; /* Force full width */
  min-width: 100% !important; /* Force minimum width */
  max-width: 100% !important;
  margin: 0 !important; /* Remove any inherited margins */
  padding: 0 !important; /* No padding - let panel handle it */
  overflow: hidden;
  box-sizing: border-box;
}

.tab-nav {
  display: flex;
  gap: 2px;
  padding: 8px 0 0 0; /* Remove side padding to let it flush left */
  margin: 0 0 8px 0;
  border-bottom: 2px solid var(--theme-border-panel, #e2e8f0);
  background: transparent;
  flex-shrink: 0;
  justify-content: center; /* Center the tabs in the nav bar */
  width: 100%; /* Ensure nav fills the container */
}

.tab-btn {
  flex: 1;
  padding: 10px 4px; /* Increased padding */
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent; /* Thicker border */
  margin-bottom: -3px;
  cursor: pointer;
  font-size: 13px; /* Increased from 9px */
  font-weight: 700; /* Bolder */
  color: var(--theme-fg-header, #333); /* Use header color instead of muted */
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px; /* Slightly spaced */
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.2;
}

.tab-btn:hover {
  color: var(--theme-fg-base, #222);
  background: var(--theme-bg-hover, rgba(0, 0, 0, 0.03));
}

.tab-btn.active {
  color: var(--theme-accent-color, #1a5a99);
  border-bottom-color: var(--theme-accent-color, #1a5a99);
  background: transparent;
}

.tab-content {
  display: none;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 6px 0 0 !important; /* Right padding for scrollbar breathing room */
}

.tab-content.active {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tab-content::-webkit-scrollbar {
  width: 8px;
}

.tab-content::-webkit-scrollbar-thumb {
  background: var(--theme-border-panel, rgba(148, 163, 184, 0.35));
  border-radius: 4px;
}

.tab-content::-webkit-scrollbar-thumb:hover {
  background: var(--theme-accent-color, rgba(148, 163, 184, 0.5));
}

/* Compact panel cards within tabs */
.tab-content .panel-card {
  margin: 0 !important;
  width: 100% !important;
  box-sizing: border-box;
}

.tab-content .panel-card-header {
  padding: 8px 6px 6px !important;
}

.tab-content .panel-card-body {
  padding: 8px 0px !important; /* REMOVED horizontal padding from inner card body */
}

.tab-content .panel-card-body button,
.tab-content .panel-card-body input,
.tab-content .panel-card-body select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.tab-content .panel-card.collapsible .collapse-icon {
  font-size: 10px;
}
