.timeline-wrapper {
width: 100%;
border-collapse: collapse;
table-layout: fixed; /* Keep this fixed for the wrapper */
max-width: 100%;
}
.timeline-wrapper-cell {
padding: 0;
overflow-x: auto; /* Enable horizontal scrolling */
overflow-y: visible;
width: 100%;
max-width: 100%;
box-sizing: border-box;
}
.timeline-table {
width: auto; /* Let it expand naturally */
min-width: 800px; /* Set a reasonable minimum */
border-collapse: collapse;
text-align: center;
white-space: nowrap;
table-layout: auto;
}
/* Force the navbox to respect width constraints */
.navbox.timeline-container {
max-width: 100%;
overflow: hidden;
}
.navbox .timeline-wrapper {
max-width: 100%;
}
.navbox .timeline-wrapper-cell {
max-width: 100%;
overflow-x: auto;
display: block; /* This is key - makes it behave like a div */
}
.timeline-row > * {
border-style: solid;
border-color: #FDFDFD;
border-width: 2px 2px 0 0;
}
.timeline-row:first-child > * {
border-top-width: 0;
}
.timeline-row > :last-child {
border-right-width: 0;
}
.timeline-decade,
.timeline-year {
background-color: #F0F0F0;
color: inherit;
font-weight: normal;
min-width: 50px;
padding: 0.2em 0.25em;
}
.timeline-decade {
min-width: 80px;
font-weight: bold;
background-color: #E8E8E8;
}
.timeline-month {
background-color: #F8F8F8;
color: inherit;
font-weight: normal;
font-size: 0.75em;
padding: 0.1em 0.2em;
border-left: 1px solid #E0E0E0;
min-width: 30px;
}
.timeline-month:first-child {
border-left: none;
}
.timeline-label {
text-align: center;
font-weight: normal;
padding: 0 1em;
vertical-align: middle;
min-width: 100px;
}
.timeline-blank {
background-color: #E0E0E0;
color: inherit;
}
.timeline-item {
background-color: #C0C0C0;
color: inherit;
font-weight: bold;
vertical-align: middle;
font-size: 0.9em;
min-width: 40px;
padding: 0.2em 0.25em;
word-wrap: break-word;
overflow-wrap: break-word;
}
.timeline-item:hover {
background-color: #B0B0B0;
cursor: pointer;
}
/* Responsive adjustments */
@media (max-width: 768px) {
.timeline-table {
min-width: 600px; /* Smaller minimum for mobile */
}
.timeline-month {
font-size: 0.7em;
padding: 0 0.05em;
min-width: 25px;
}
.timeline-decade,
.timeline-year,
.timeline-item {
padding: 0.1em 0.15em;
font-size: 0.9em;
}
.timeline-year {
min-width: 40px;
}
.timeline-decade {
min-width: 60px;
}
.timeline-label {
min-width: 80px;
}
}