/* Sievers custom styles */

/* ── Glossary Tooltips ── */
.glossary-term {
    text-decoration: underline dotted 1px;
    text-underline-offset: 3px;
    text-decoration-color: #E10023;
    cursor: help;
}
.glossary-term:hover {
    text-decoration-color: #b7001c;
    background: rgba(225, 0, 35, 0.06);
    border-radius: 2px;
}
.tooltip .tooltip-inner {
    max-width: 320px;
    text-align: left;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
}

/* Constrain the navbar logo to a reasonable size and add spacing to title */
#logo {
    max-height: 40px;
    width: auto;
    margin-right: 8px;
}

/* Language dropdown in navbar */
.navbar .language-dropdown .btn {
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--bs-border-color);
    background: transparent;
    color: var(--bs-body-color);
}
.navbar .language-dropdown .btn:hover,
.navbar .language-dropdown .btn:focus {
    background: var(--bs-tertiary-bg);
}
.navbar .language-dropdown .dropdown-item.active {
    background-color: var(--bs-primary);
    color: white;
}

/* Product landing page doc-type cards */
.card {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}
.card .card-title {
    font-size: 1.25rem;
    font-weight: 600;
}
.card .card-text {
    font-size: 0.95rem;
}
.card .btn-primary {
    margin-top: auto;
}

/* ── DataTables integration ── */

/* Top bar: search + export buttons */
.dt-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

/* Export buttons */
button.dt-btn {
    background: #E10023 !important;
    color: #fff !important;
    border: none !important;
    padding: 0.35rem 0.65rem;
    border-radius: 0.2rem;
    font-size: 0.9rem;
    cursor: pointer;
}
button.dt-btn:hover,
button.dt-btn:active:not(.disabled) {
    background: #b7001c !important;
}

/* Search input */
.dt-search label {
    font-weight: 600;
    margin-right: 0.35rem;
    color: var(--bs-body-color);
}
.dt-search input.dt-input {
    border: 1px solid #E10023;
    padding: 0.35rem 0.6rem;
    font-size: 0.9rem;
    border-radius: 0.2rem;
}
.dt-search input.dt-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(225, 0, 35, 0.25);
}

/* Table cell truncation (default) */
table.dt-enhanced thead th {
    white-space: normal;
    overflow-wrap: break-word;
}
table.dt-enhanced tbody td {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Expanded row (click-to-expand) */
table.dt-enhanced tr.expanded td {
    max-width: none;
    white-space: normal;
    overflow-wrap: anywhere;
    overflow: visible;
    text-overflow: unset;
}

/* Prevent scrollbar layout shift */
div.datatable {
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

/* Remove DataTables default margin */
table.dt-enhanced {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
}

/* Dark mode support */
[data-bs-theme="dark"] .dt-search label {
    color: var(--bs-body-color);
}
[data-bs-theme="dark"] table.dt-enhanced {
    --dt-row-hover: rgba(255, 255, 255, 0.05);
}

/* ── Change Highlighting ── */

/* Highlighted changed section */
.highlight-changed {
    border-left: 4px solid #E10023;
    background: rgba(225, 0, 35, 0.04);
    padding: 0.5rem 0.75rem;
    margin: 0.5rem 0;
    border-radius: 0 0.25rem 0.25rem 0;
}
.highlight-changed > *:last-child {
    margin-bottom: 0;
}

/* Inline span highlighting */
span.highlight-changed {
    border-left: none;
    background: rgba(225, 0, 35, 0.08);
    padding: 0.1rem 0.3rem;
    border-radius: 0.2rem;
    margin: 0;
}

/* Changelog box at top of article */
.changelog-box {
    border: 1px solid #E10023;
    border-left: 4px solid #E10023;
    background: rgba(225, 0, 35, 0.03);
    border-radius: 0.25rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}
.changelog-box .changelog-title {
    color: #E10023;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.changelog-box p {
    margin-bottom: 0.5rem;
}
.changelog-box ul {
    margin-bottom: 0;
    padding-left: 1.5rem;
}
.changelog-box ul li {
    margin-bottom: 0.25rem;
}
.changelog-box a {
    color: #E10023;
    text-decoration: underline;
}
.changelog-box a:hover {
    color: #b7001c;
}

/* Dark mode for change highlighting */
[data-bs-theme="dark"] .highlight-changed {
    background: rgba(225, 0, 35, 0.1);
}
[data-bs-theme="dark"] .changelog-box {
    background: rgba(225, 0, 35, 0.08);
}
