/* Reserve space for the vertical scrollbar on every tab, even ones whose
   content fits the viewport with no scroll - otherwise the page (including
   the top nav pills) shifts sideways when switching to/from a tab that
   scrolls. */
html {
    scrollbar-gutter: stable;
}

/* "?" info icons spliced into a few "All data" column headers (see
   make_header_info_icon_template in dashboard.py) — hovering one shows a
   dbc.Tooltip. eText and the icon share one inline-flow wrapper (rather than
   being separate flex siblings) so the icon wraps along with the text and
   lands right after the last word, instead of floating at the vertical
   center of the whole wrapped header. */
.header-title-wrap {
    display: inline;
}
.header-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    margin-left: 4px;
    border-radius: 50%;
    border: 1px solid #6c757d;
    color: #6c757d;
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
    vertical-align: middle;
}

/* Tighten wrapped-line spacing in the AG Grid petition title column */
.petition-title-cell.ag-cell,
.petition-title-cell .agGrid-Markdown,
.petition-title-cell .agGrid-Markdown p {
    line-height: 1.4 !important;
}

.petition-title-cell .agGrid-Markdown p {
    margin: 0;
}

.petition-title-cell.ag-cell {
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Hide the radio button circles */
.form-check-input {
    display: none !important;
}

/* Clickable petition item */
.form-check {
    margin-bottom: 10px !important;
    padding: 12px 15px !important;
    border-bottom: 1px solid #e0e0e0;
    transition: all 0.2s ease;
    cursor: pointer !important;
    border-radius: 4px;
}

/* Petition text - allows wrapping */
.form-check-label {
    white-space: normal !important;
    line-height: 1.5 !important;
    cursor: pointer !important;
    padding-left: 0 !important;
    word-wrap: break-word !important;
    display: block !important;
    width: 100% !important;
    margin-bottom: 0 !important;
}

/* Hover effect */
.form-check:hover {
    background-color: #f0f0f0;
}

/* Pagination footer reads "1 to 20 of 2,342" by default — clarify the unit. */
#all-petitions-datatable .ag-paging-row-summary-panel-number[data-ref="lbRecordCount"]::after {
    content: ' petitions';
}

/* Selected petition - highlighted */
.form-check:has(.form-check-input:checked) {
    background-color: #e3f2fd;
    border-left: 4px solid #0d6efd;
    padding-left: 11px;
    font-weight: 500;
}

/* Scrollbar styling */
div[style*="overflowY: auto"]::-webkit-scrollbar {
    width: 8px;
}

div[style*="overflowY: auto"]::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

div[style*="overflowY: auto"]::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

div[style*="overflowY: auto"]::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Top nav pills default to the bootstrap theme's primary purple when active -
   match the navbar's own shade instead. */
.nav-pills .nav-link.active {
    background-color: #373151;
}