/* === Global Variables for Consistency === */
:root {
  --font-size-sm: 11px;
  --font-size-md: 12px;
  --font-size-md2: 13px;
  --font-size-lg: 14px;
  --font-size-xl: 16px;
  --font-size-xxl: 23px;
  --font-weight-normal: 500;
  --font-weight-bold: 600;
  --primary-color: #2196F3;
  --light-gray: #F5F5F5;
  --dark-gray: #666;
  --border-color: #cacaca;
  --sidebar-width: 170px;
}

/* === Typography === */
.spac-name {
  font-size: var(--font-size-xxl);
  font-weight: bold;
}

.has-text-weight-bold {
  font-weight: bold;
}

.badge {
  font-size: inherit;
}

.badge.clickable {
  cursor: pointer;
}

.badge.disabled {
  cursor: not-allowed;
  background-color: #c4c4c4;
}

/* === Table Styles === */
.table-data th,
.table-data td {
  padding-left: 0.5em;
  font-size: var(--font-size-md2);
}

.table-data th {
  background-color: var(--light-gray);
  border: 1px solid white;
}

.table-data td {
  background-color: white;
  border-bottom: 1px solid #ddd;
  vertical-align: top;
  text-align: left;
}

/* Sticky Headers */
.table-data-content thead {
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
}

/* === Scrollbars === */
.custom-scrollbar,
.timeline-scrollbar {
  position: relative;
  overflow: auto;
}

.custom-scrollbar {
  max-height: 230px;
}

.timeline-scrollbar {
  max-height: 400px;
}

.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  width:  var(--sidebar-width);
  overflow-y: auto;
  z-index: 1000;
  border-right: none;
}


main {
  flex-grow: 1;
  margin-left: 260px; /* Ensure enough space for sidebar */
  padding: 20px;
  max-width: calc(100% - 260px); /* Prevents it from expanding too much */
}
#snapshot-nav {
  font-size: 13px;
}

.nav-link.active {
  font-weight: 800;
  color: black;
}

.icon-link {
  display: flex;
  align-items: center;
  color: #333;
  text-decoration: none;
  padding: 15px;
}

.icon-link i {
  font-size: var(--font-size-md);
  margin-right: 15px;
}

.link-text {
  opacity: 1;
  white-space: nowrap;
  overflow: hidden;
  max-width: var(--sidebar-width);
}

/* === Forms & Controls === */
#ipo-sector-focus {
  line-height: 1.1em;
  cursor: pointer;
  display: block;
}

/* === Toggle Switch === */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #ccc;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* === Tabs === */
.tab-1 {
  margin-left: 0.5em;
}

.tab-pane {
  font-size: 0.8em;
}

.tab-pane .table td,
.tab-pane .table th {
  padding-left: 8px;
  padding-right: 2px;
  line-height: 1rem;
}

.tab-pane a {
  display: inline-block;
}

.tab-pane h5 {
  font-size: var(--font-size-md);
}

div.tab-pane {
  display: block !important;
}

div.tab-pane-header {
  border-bottom: 3px solid var(--border-color);
  margin: 1em -1.5em 1.2em;
  padding-top: 0.5em;
  width: 100%;
}

div.tab-pane-sub-header {
  font-size: 18px !important;
  margin-top: 1em;
  margin-left: -1.5em;
}

/* === Table Styling === */
.table th[scope=row],
.dim-head {
  color: var(--dark-gray);
  font-weight: var(--font-weight-bold);
}

.table th[scope=row] {
  padding-left: 0.75em;
  width: 16em;
}

#family-index-table thead th {
  border-top: 0;
}

#fact-sheet th {
  padding: 8px;
}

.anchor-background {
  background: #eceeef8a;
}

.badge-light {
  color: #212529 !important;
  background-color: #f7f7f7 !important;
}

/* === Responsive Styles === */
@media (max-width: 768px) {
  #snapshot-nav {
      display: none !important;
  }
  
  .container {
      width: 140% !important;
  }
  
  div.tab-pane-header {
      margin-left: 0 !important;
  }
  main {
    margin-left: 0 !important; /* Ensures main content uses full width */
    max-width: 100%;
}
}

/* === AG Grid Customizations === */
.custom-ag-theme .ag-root-wrapper {
  padding: 0 !important;
}

#chart-container {
  width: 100%;
  height: 440px;
}

.show-more-link {
  font-size : 12px
}

#personnel-table {
  table-layout: fixed; /* Ensures uniform column width */
  width: 100%;
  border-collapse: collapse;
}

#personnel-table td {
  vertical-align: top; /* Align text to the top */
  white-space: normal; /* Allow wrapping */
  word-break: break-word; /* Prevent layout shifts due to long words */
}