.content-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.series-summary {
    flex: 0 0 30%;
    min-width: 120px;
    box-sizing: border-box;
    padding: 0 10px 20px 20px;
    align-self: stretch;
}

.series-details {
    flex: 1;
    box-sizing: border-box;
    padding-bottom: 24px;
}



.summary-item {
    margin: 0 0 12px;
}

.summary-item-body {
    padding: 16px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    background-color: white;
    border: 1px solid #E5E7EB;
}

/* Section title inside the box */
.summary-section-title {
    font-family: "Inter", sans-serif;
    font-weight: 900;
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #808080;
}

/* Period - grey, smaller */
.period {
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 4px;
    text-transform: uppercase;
}

/* Value - large, prominent */
.value {
    font-family: "Inter", sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
    line-height: 1.2;
}

/* Change pills container */
.change-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Pill base styling */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-family: "Inter", sans-serif;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid;
}

/* Pill icon (triangle/dash) */
.pill-icon::before {
    font-size: 12px;
}

/* Pill variants */
.pill.up .pill-icon::before {
    content: "▲";
}

.pill.down .pill-icon::before {
    content: "▼";
}

.pill.neutral .pill-icon::before {
    content: "—";
}

.pill.green {
    border-color: #22c55e;
    color: #0D542B;
    background-color: #f0fdf4; /* Light green */
}
.pill.green .pill-icon::before {
    color: #0D542B;
}

/* RED variant (Bad performance) */
.pill.red {
    border-color: #ef4444;
    color: #82181A;
    background-color: #fef2f2; /* Light red */
}
.pill.red .pill-icon::before {
    color: #82181A;
}

.pill.gray {
    border-color: #9ca3af;
    color: #6b7280;
    background-color: #f3f4f6;
}
.pill.gray .pill-icon::before {
    color: #9ca3af;
}

/* Pill text */
.pill-text {
    font-weight: 700;
}

.pill-label {
    font-weight: 400;
    opacity: 0.8;
    font-size: 11px;
}

.period-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.5);
    margin-right: 6px;
    padding-right: 6px;
    /* Creating a divider line */
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.min-max-container {
    display: flex;
    flex-direction: row;
    gap: 16px; /* Increased gap for better breathing room */
    margin-top: 20px;
    border-top: 1px solid #e5e7eb; /* Subtle separator from the main value */
    padding-top: 16px;
}

.min-component,
.max-component {
    flex: 1;
    background-color: #ffffff;
    padding: 16px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;

    /* Subtle Outline */
    border: 1px solid #f1f5f9;

    /* Soft Elevation Shadow */
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

.component-hdr {
    font-family: "Inter", sans-serif;
    font-size: 11px;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
}

.component-label {
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 600;
    min-height: 34px;
    color: #111827;
    line-height: 1.2;
    margin-bottom: 8px;
}

.component-value {
    font-family: "Inter", sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
    margin-bottom: 4px;
}

/* Small pill variant */
.pill.small {
    padding: 4px 8px;
    font-size: 10px;
    gap: 4px;
}

.pill.small .pill-icon::before {
    font-size: 10px;
}

.pill.small .pill-text {
    font-weight: 600;
}

.pill.small .pill-label {
    font-size: 9px;
}


/* Info rows - table-like */
.info-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 16px;
    padding: 8px 0;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.info-row:first-of-type {
    padding-top: 0; /* Remove top padding from first row */
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #6b7280;
    font-weight: 500;
    text-align: left;
}

.info-value {
    color: #111827;
    font-weight: 600;
    font-family: "Inter", sans-serif;
    text-align: left;
}

.text-muted {
    font-weight: 400;
}

.release-dates ul {
    padding-left: 0;
    margin: 0;
}

.release-dates li {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    margin: 4px 0;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-family: "Inter", sans-serif;
    font-size: 0.9rem;
    color: #364153;
    cursor: pointer;
}

/* Group Hover Trigger */
.release-dates li:hover {
    background-color: #F3F4F6;
}

/* Primary Link inside the LI */
.release-dates li a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

/* Underline only the text, not the icon, when the LI is hovered */
.release-dates li:hover a {
    text-decoration: underline;
    color: #2563EB;
}

/* Specific styling for the external icon */
.external-icon {
    font-size: 0.75rem;
    margin-left: 6px;
    opacity: 0;
    color: #2563EB;
    transition: opacity 0.2s ease-in-out;
}

.release-dates li:hover .external-icon {
    opacity: 1;
}

/* Subtle text for days away */
.days-away {
    font-size: 0.9rem;
    color: #99A1AF;
    margin-left: auto;
}

/* Calendar icon specific color */
.calendar-icon {
    color: #1F2937;
}


.related-series-list ul {
    padding-left: 0;
    margin: 0;
}

.related-item {
    list-style: none;
    display: flex;
    align-items: flex-start;
    padding: 10px 12px;
    margin: 2px 0;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
}

/* Base colors */
.related-item .type-icon {
    font-size: 0.9rem;
    color: #94a3b8; /* Subtle slate color */
    margin-top: 4px;
    width: 20px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    margin-right: 12px;
}

.series-link {
    text-decoration: none;
    color: #374151;
    font-size: 0.95rem;
    font-weight: 400;
    flex: 1; /* Pushes the arrow to the far right */
}

/* Hover States */
.related-item:hover {
    background-color: #f8fafc;
}

.related-item:hover .series-link {
    color: #2563eb;
    text-decoration: underline;
}

.related-item:hover .type-icon {
    color: #2563eb; /* Icon lights up on hover */
}

/* Reveal arrow on the right */
.arrow-reveal {
    font-size: 0.75rem;
    color: #cbd5e1;
    opacity: 0;
    transition: opacity 0.2s;
}

.related-item:hover .arrow-reveal {
    opacity: 1;
}


.series-details .breadcrumb {
    margin-left: 4px;
    margin-bottom: 6px;
    text-align: left;
    color: #6B7280;
    font-size: 14px;
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 400;
}

.series-details .breadcrumb a {
    color: #6B7280;
    text-decoration: none;
}

.series-details .breadcrumb a:hover {
    text-decoration: underline;
}

.series-details .breadcrumb .separator {
    margin: 0 6px; /* add spacing around slashes */
}


.breadcrumb i {
    font-size: 13px;
}

.breadcrumb i.bi-folder2-open {
    margin-right: 8px;
}

.breadcrumb i.bi-chevron-right {
    margin: 0 6px;
}

.details-tabs {
    display: flex;
    gap: 8px;
    margin: 0 0 6px;
    padding: 4px;
    justify-content: flex-start;
}

.details-tabs .tab-button {
    padding: 8px 16px;
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 400;
    font-size: 14px;
    background-color: #FAFAFA;
    border: 1px solid #E5E7EB;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    color: #6B7280;
    border-radius: 4px;
    white-space: nowrap;
}

.details-tabs .tab-button:hover {
    background-color: #F3F4F6;
}

.details-tabs .tab-button.active {
    background-color: #F8F8FF;
    border-color: #2563EB;
    color: #111111;
}

.details-panel {
    min-height: 420px;
    padding: 16px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;

    background-color: #FFFFFF;

    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.06);

    display: none;
    width: 98%;
    box-sizing: border-box;
    overflow: hidden;
}

.details-panel.active {
    display: block;
}

#chart-footnotes a::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 4px;
    background: url('../images/external.svg') no-repeat center;
    background-size: contain;
    margin-right: 4px;
    color: #2563EB;
}

#chart-footnotes a,
#chart-footnotes a:visited,
#chart-footnotes a:hover,
#chart-footnotes a:active {
    color: #2563EB;
    text-decoration: none;
}

#chart-footnotes a:hover {
    text-decoration: underline;
}

#chart-footnotes ul {
    display: inline;
    list-style: none;
    padding: 0;
    margin: 0;
}

#chart-footnotes li {
    display: inline;
}

#chart-footnotes li:not(:last-child)::after {
    content: '';
    display: inline-block;
    border-left: 1px solid #4e4e4e;
    height: 12px;
    margin: 0 8px;
    vertical-align: middle;
}


/* Notes panel styling */
#notes {
    font-family: "Inter", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    padding: 20px;
}

/* Headings - Use IBM Plex Serif */
#notes h1,
#notes h2,
#notes h3,
#notes h4,
#notes h5,
#notes h6 {
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    color: inherit;
}

#notes p {
    margin-bottom: 16px;
    font-family: inherit;
    font-size: inherit;
    color: #242424;
}

#notes strong {
    font-weight: 600;
    font-family: inherit;
    font-size: inherit;
    color: black;
}

/* Links */
#notes a[href^="http"]:not(.footnote-backref)::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 4px;
    background: url('../images/external.svg') no-repeat center;
    background-size: contain;
}

#notes a {
    color: #2563eb;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
    font-family: inherit;
    font-size: inherit;
}

#notes a:hover {
    border-bottom-color: #2563eb;
}



/* Footnote references (superscript) */
#notes sup {
    font-size: 0.75em;
}

#notes sup a {
    color: #2563eb;
    font-weight: 600;
}

/* Footnotes section */
#notes .footnote {
    border-top: 1px solid #d1d5db;
    font-family: inherit;
    font-size: inherit;
    margin-top: 8px;

}

#notes .footnote hr {
    display: none; /* Hide the default hr */
}

#notes .footnote ol {
    padding-left: 20px;
    margin: 0;
}

#notes .footnote li {
    margin-bottom: 12px;
    line-height: 1.6;
}

#notes .footnote-backref {
    font-size: 12px;
    margin-left: 4px;
}

/* Emphasized text */
#notes em {
    font-style: italic;
    color: black !important;
}


.chart-container {
    width: 95%;
    min-height: 300px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding: 4px 0;
}

.chart-header {
    display: flex;
    flex-direction: column; /* stack title above controls */
    gap: 12px;              /* space between title and controls */
    margin-bottom: 1rem;
}

.chart-header-title {
    display: flex;
    flex-direction: column;

}

#chart-title {
    font-family: "IBM Plex Serif", serif;
    font-size: 22px;
    font-weight: 600;
    color: #111;
}

#sub-title {
    font-size: 14px;
    color: #666;
    font-family: "Roboto", sans-serif;
    margin-bottom: 4px;
}

.chart-header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chart-type-controls {
    display: flex;
    gap: 4px; /* Smaller gap between tabs */
    align-items: center;
    background-color: #f3f4f6; /* Light gray container */
    padding: 4px;
    border-radius: 8px;
}

/* Each tab (icon + text) */
.chart-type-tab {
    display: flex;
    align-items: center;
    gap: 6px; /* Space between icon and text */
    padding: 8px 12px;
    border-radius: 6px;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* Tab icon */
.tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

.tab-icon svg {
    width: 18px;
    height: 18px;
    color: #6b7280;
    transition: color 0.2s ease;
}

/* Tab text */
.tab-text {
    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    transition: color 0.2s ease;
}

/* Hover state */
.chart-type-tab:hover {
    background-color: #e5e7eb;
}

.chart-type-tab:hover .tab-text,
.chart-type-tab:hover svg {
    color: #111827;
}

/* Active/Selected state */
.chart-type-tab.active {
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chart-type-tab.active .tab-text {
    color: #2563eb;
    font-weight: 600;
}

.chart-type-tab.active svg {
    color: #2563eb;
}

/* Prevent SVG from capturing clicks */
.tab-icon svg {
    pointer-events: none;
}

.chart-header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

/* Chart type tabs on the left */
#chart-type-controls {
    display: flex;
    gap: 4px;
    align-items: center;
    background-color: #f3f4f6;
    padding: 4px;
    border-radius: 8px;
}

/* Action buttons on the right */
.chart-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background-color: #f3f4f6;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn i {
    font-size: 16px;
    color: #708090;
    transition: color 0.2s ease;
}

.action-btn:hover {
    background-color: #e5e7eb;
}

.action-btn:hover i {
    color: #111827;
}

/* Settings button - slightly different to stand out */
#chart-settings {
    background-color: #e5e7eb;
}

#chart-settings:hover {
    background-color: #d1d5db;
}


#chart-slider #start-date,
#chart-slider #end-date {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    padding: 4px 8px;
    border-radius: 6px;
    background-color: #f2f2f2;
    color: #222222;
    white-space: nowrap;
    font-size: 13px;
    margin: 0 4px;
}

#chart-logo img {
    height: 40px;
    width: auto;
    margin-left: 16px;
}

#chart-footnotes {
    font-size: 13px;
    font-family: 'Roboto', sans-serif;
}

.presidents-notes,
.pres-summary {
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    padding: 8px 16px;
}

.timeline-chart-container {
    width: 98%;
    max-width: 98%;
    overflow-x: auto;
    overflow-y: hidden;
    box-sizing: border-box;
}

.presidents-notes,
.details-panel,
.series-details {
    overflow: hidden !important;
    box-sizing: border-box;
}

.pre-wrap {
    white-space: pre-wrap; /* wrap lines */
    word-break: break-word; /* break long words */
}


#share-btn {
    position: relative;
}

.share-popup {
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    right: 0;
    padding: 4px 6px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 999;
    width: max-content;
    min-width: 150px;
}

#share-popup a,
#share-popup button {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: "Inter", sans-serif;
    font-size: 13px;
    color: grey;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

#share-popup i {
    font-size: 13px;
    color: grey;
    transition: color 0.3s;
    cursor: pointer;
}

#bluesky-share:hover i {
    color: #0A7AFF; /* light blue identity color */
}

#linkedin-share:hover i {
    color: #0077B5;
}

#copy-url-btn:hover i {
    color: black;
}

#reddit-share:hover i {
    color: #ff5700;
}

#viber-share:hover svg {
    color: #7360F2;
}

#bluesky-share:hover,
#linkedin-share:hover,
#copy-url-btn:hover,
#reddit-share:hover,
#viber-share:hover {
    color: black;
}

/* Syncing with your share-popup style */
.download-popup {
    display: none;
    flex-direction: column; /* Stack items vertically */
    padding: 6px;
}

.download-popup.show {
    display: flex;
}

/* Base style for the items */
.download-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 6px;
    font-family: "Inter", sans-serif;
    font-size: 13px;
    color: grey;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-align: left;
}

.download-item i {
    font-size: 16px; /* Icons slightly larger for clarity */
}

/* Hover Effects */
.download-item:hover {
    background-color: #f8f9fa;
    color: black;
}

/* Specific Brand Colors on Hover */
.download-item[data-format="xlsx"]:hover i {
    color: #1D6F42; /* Excel Green */
}

.download-item[data-format="csv"]:hover i {
    color: #008000; /* CSV Green */
}

.download-item[data-format="png"]:hover i,
.download-item[data-format="jpeg"]:hover i {
    color: #0A7AFF; /* Image Blue */
}
