/* Tag Badge */
.tag-badge {
    display: inline-block;
    background-color: #4F46E5;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    margin-right: 0;
    margin-bottom: 0;
    transition: all 0.2s ease;
}

.tag-badge:hover {
    background-color: #3730A3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Rich content formatting for item description (only on item page) */
#item-description {
    white-space: normal;
    word-break: break-word;
    line-height: 1.6;
}

#item-description p {
    margin: 0.5rem 0;
}

#item-description ul {
    list-style: disc;
    padding-left: 2.5rem;
    margin: 0.5rem 0;
}

#item-description ol {
    list-style: decimal;
    padding-left: 2.5rem;
    margin: 0.5rem 0;
}

#item-description li {
    margin: 0.25rem 0;
}

#item-description a {
    color: #2563EB; /* tailwind blue-600 */
    text-decoration: underline;
}

/* Headings inside the item description */
#item-description h1,
#item-description h2,
#item-description h3,
#item-description h4,
#item-description h5,
#item-description h6 {
    margin: 0.75rem 0 0.5rem;
    line-height: 1.25;
}

#item-description h1 {
    font-size: 1.5rem; /* ~text-2xl */
    font-weight: 700;
}

#item-description h2 {
    font-size: 1.25rem; /* ~text-xl */
    font-weight: 700;
}

#item-description h3 {
    font-size: 1.125rem; /* ~text-lg */
    font-weight: 600;
}

#item-description h4 {
    font-size: 1rem; /* ~text-base */
    font-weight: 600;
}

#item-description h5 {
    font-size: 0.875rem; /* ~text-sm */
    font-weight: 600;
}

#item-description h6 {
    font-size: 0.875rem; /* ~text-sm */
    font-weight: 500;
    color: #4B5563; /* gray-600 */
}

/* Links in data source and visualization source */
#item-data-source a, #item-visualization-source a {
    color: #2563EB; /* tailwind blue-600 */
    text-decoration: underline;
}

/* Fullscreen modal helpers */
#visualization-modal {
    cursor: zoom-out;
}

#visualization-modal #visualization-modal-img {
    cursor: auto;
}

/* Zoom lens rectangle */
.zoom-lens {
    position: absolute;
    border: none;
    width: 200px;
    height: 200px;
    pointer-events: none;
    border-radius: 6px;
    z-index: 10;
}

/* Series previews scroll sideways when they do not fit; a thin bar is enough to show it */
#series-strip {
    scrollbar-width: thin;
}
