/*
Theme Name: Intellinews Pro
Theme URI: https://pro.intellinews.com
Author: IntelliNews
Description: Intellinews PRO subscriber site. Reads articles from the Central CMS (Site 1) through the "Intellinews Central Content Connector" plugin.
Version: 2.7.0
Requires at least: 5.5
Requires PHP: 7.4
License: Proprietary
Text Domain: intellinews-pro
*/

/* Article body (comes from the Central CMS editor) */
.brief-content { font-family: 'IBM Plex Sans', sans-serif; font-size: 15px; line-height: 1.7; color: #1A1A1A; }
.brief-content > * + * { margin-top: 16px; }
.brief-content p { margin: 0; }
.brief-content h2 { font-family: 'IBM Plex Serif', serif; font-weight: 700; font-size: 20px; line-height: 1.3; color: #111; margin-top: 28px; }
.brief-content h3 { font-family: 'IBM Plex Serif', serif; font-weight: 700; font-size: 17px; line-height: 1.3; color: #111; margin-top: 22px; }
.brief-content ul { list-style: disc; padding-left: 1.4em; }
.brief-content ol { list-style: decimal; padding-left: 1.4em; }
.brief-content a { color: #D71920; text-decoration: underline; }
.brief-content blockquote { border-left: 3px solid #D71920; padding: 4px 0 4px 16px; font-family: 'IBM Plex Serif', serif; font-style: italic; color: #333; }
.brief-content img, .brief-content video, .brief-content iframe { max-width: 100%; height: auto; }
.brief-content figure { margin: 24px 0; }

/* Generic pages */
.entry-content > * + * { margin-top: 1em; }
.entry-content h2 { font-family: 'IBM Plex Serif', serif; font-weight: 700; font-size: 22px; margin-top: 1.5em; }
.entry-content h3 { font-family: 'IBM Plex Serif', serif; font-weight: 700; font-size: 18px; margin-top: 1.25em; }
.entry-content ul { list-style: disc; padding-left: 1.5em; }
.entry-content ol { list-style: decimal; padding-left: 1.5em; }
.entry-content a { color: #D71920; text-decoration: underline; }

/* Small message ("Link copied") */
.inpro-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #111; color: #fff; padding: 10px 16px; border-radius: 4px; font: 500 13px 'IBM Plex Sans', sans-serif; z-index: 9999; opacity: 0; pointer-events: none; transition: opacity .2s; }
.inpro-toast.is-visible { opacity: 1; }

/* Print: only the article */
@media print {
    .inpro-no-print { display: none !important; }
    body { background: #fff !important; }
    a { color: inherit !important; text-decoration: none !important; }
}

/* "+2" mark: shows the other names on hover, keyboard focus or tap */
.inpro-more { position: relative; cursor: help; border-radius: 3px; outline-offset: 2px; }
.inpro-more::after {
    content: attr(data-tip);
    position: absolute; left: 0; bottom: calc(100% + 8px);
    width: max-content; max-width: 240px;
    background: #111; color: #fff;
    font: 500 12px/1.4 'IBM Plex Sans', sans-serif; text-transform: none; letter-spacing: 0; text-align: left; white-space: normal;
    padding: 6px 10px; border-radius: 4px;
    opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .15s; z-index: 30;
}
.inpro-more:hover::after, .inpro-more:focus::after { opacity: 1; visibility: visible; }

/* Print: keep pictures on the page, and print a video as its title (a video cannot be printed) */
@media print {
    article figure img, .brief-content img { max-height: 90mm; width: auto; max-width: 100%; object-fit: contain; }
    figure { break-inside: avoid; }
    .intn-video__frame { display: none !important; }
    .intn-video { margin: 8px 0; }
    .intn-video__title::before { content: "Video: "; font-weight: 600; }
    h1, h2, h3, blockquote { break-inside: avoid; break-after: avoid; }
}

/* Filters: "partly selected" box and scroll position of the feed */
.filter-checkbox-input:indeterminate { background-color: #D71920; border-color: #D71920; }
.filter-checkbox-input:indeterminate::after {
    content: ''; position: absolute; left: 2.5px; top: 5.5px; width: 8px; height: 0; border-top: 2px solid #fff;
}
.filter-card-header .filter-checkbox-label { flex: 1 1 auto; }
#inpro-feed { scroll-margin-top: 16px; }

/* Long filter panels scroll inside themselves; the Apply button stays in view below */
#inpro-panel-regions .filter-cards-grid,
#inpro-panel-topics .filter-cards-grid {
    max-height: min(55vh, 440px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 6px;
}

/* Link to the Regional Matrix from the footer */
#regional-matrix { scroll-margin-top: 16px; }

/* Saved Searches panel (same look as the original design) */
#inpro-panel-saved {
    margin-top: 24px; background-color: #FFFFFF; border: 1px solid #E9E2D6; border-radius: 6px; padding: 16px;
    display: flex; flex-direction: column; gap: 24px; box-sizing: border-box; max-width: 100%;
}
#inpro-panel-saved.hidden { display: none; }
@media (min-width: 640px) { #inpro-panel-saved { padding: 32px; } }
#inpro-panel-saved .saved-searches-grid { max-height: min(55vh, 440px); overflow-y: auto; overscroll-behavior: contain; padding-right: 6px; }

/* Topics: when the topics have no groups, one box across the full width with the topics in columns */
.inpro-card-wide { grid-column: 1 / -1; }
.inpro-card-wide .filter-card-content { display: block; column-count: 1; column-gap: 28px; }
.inpro-card-wide .filter-card-content > label { break-inside: avoid; margin-bottom: 10px; }
@media (min-width: 640px) { .inpro-card-wide .filter-card-content { column-count: 2; } }
@media (min-width: 1024px) { .inpro-card-wide .filter-card-content { column-count: 4; } }
