* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container {
    display: grid;
    grid-template-columns: 220px 1fr;
    height: calc(100vh - 56px);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.filters {
    padding: 20px;
    border-right: 1px solid #ddd;
    background: #f5f5f5;
    overflow-y: auto;
    margin-left: 0;
}

.timeline-container {
    padding: 20px;
    padding-left: 150px;
    overflow-x: auto;
    position: relative;
    margin-right: 0;
    width: 100%;
}

.time-axis {
    height: 50px;
    position: relative;
    border-bottom: 2px solid #333;
    margin-bottom: 20px;
}

.time-marker {
    position: absolute;
    transform: translateX(-50%);
    font-size: 12px;
}

.timeline {
    height: 30px;
    margin: 10px 0;
    position: relative;
    transition: all 0.3s ease;
}

.timeline-bars-wrapper {
    position: absolute;
    height: 100%;
    width: 100%;
}

.timeline-bar {
    position: absolute;
    height: 100%;
}

/* Base styles for certain bars */
.timeline-bar.certain {
    background: #4CAF50;
    z-index: 2;
    border-radius: 4px;
}

/* Remove border radius at joints for certain bars */
.timeline-bar.uncertain.left-uncertain + .timeline-bar.certain {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.timeline-bar.certain:has(+ .timeline-bar.uncertain.right-uncertain) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Base styles for uncertain bars */
.timeline-bar.uncertain {
    background: #4CAF50;
    opacity: 0.3;
    z-index: 1;
}

/* Remove border radius at joints for uncertain bars */
.timeline-bar.uncertain.left-uncertain {
    border-radius: 4px 0 0 4px;
}
.timeline-bar.uncertain.right-uncertain {
    border-radius: 0 4px 4px 0;
}
.timeline-bar.certain + .timeline-bar.uncertain.right-uncertain {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.timeline-bar.uncertain.left-uncertain:has(+ .timeline-bar.certain) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.timeline-label {
    position: absolute;
    left: -160px;
    width: 150px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #333;
    text-align: right;
    padding-right: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.error-message {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 20px;
    margin: 20px;
    border-radius: 4px;
    text-align: center;
}

.filter-container {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 8px;
    margin-bottom: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.dropdown-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
}

.checkbox-item {
    padding: 6px 8px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-item:last-child {
    border-bottom: none;
}

.checkbox-item:hover {
    background-color: #f5f5f5;
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.checkbox-item .years {
    white-space: nowrap;
    font-size: 12px;
    color: #666;
}

.checkbox-item label {
    cursor: pointer;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 0.25em;
}

.label-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.label-wrapper input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

.label-wrapper label {
    cursor: pointer;
    flex: 1;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 0.25em;
}

.clear-button {
    margin-top: 8px;
    padding: 6px 12px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}

.clear-button:hover {
    background-color: #e0e0e0;
}

.language-selector {
    margin-bottom: 10px;
}

#langButton {
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

#langButton:hover {
    background: #f0f0f0;
}

#clearSelection {
    padding: 8px 16px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.3px;
}

#clearSelection:hover {
    background: #f0f0f0;
    border-color: #d0d0d0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.search-box {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    color: #333;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    height: 40px;
}

.search-box:focus {
    outline: none;
    border-color: #666;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.search-box::placeholder {
    color: #999;
    font-weight: 400;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

.quarto-title-block, .quarto-body, .page-columns, .page-full {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}