/* ===================================================================
   Tag Widget Styles — EXACT match to kmu.gov.ua (Uryadovyy Portal)
   Extracted via Chrome DevTools from https://www.kmu.gov.ua/
   =================================================================== */

/* -------------------------------------------------------------------
   1. Wrapper: .news-tags-wrap.mb-3
   kmu.gov.ua: width: calc(100% - 100px); margin-bottom: 16px (via .mb-3)
   ------------------------------------------------------------------- */
.news-tags-wrap {
    width: calc(100% - 100px);
    margin-bottom: 16px;
}

/* Space below the tags/RSS row — kmu.gov.ua has ~6px gap */
.tab-pane.position-relative > .tab-content {
    padding-top: 6px;
}

.news-tags-wrap.opacity-0 {
    height: 34px;
}

/* -------------------------------------------------------------------
   2. Container: .nav.wcag-tags
   kmu.gov.ua: Bootstrap .nav base (display:flex, flex-wrap:wrap, pl:0, mb:0, list-style:none)
   + overflow: scroll hidden (horizontal scroll, no vertical)
   + flex-wrap: nowrap (override Bootstrap's wrap)
   + padding-top: 2px
   ------------------------------------------------------------------- */
.nav.wcag-tags {
    display: flex;
    flex-wrap: wrap;
    padding-left: 0;
    padding-top: 2px;
    margin-bottom: 0;
    list-style: none;
    overflow: visible;
}

/* Bootstrap utility class used by kmu.gov.ua */
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.ms-auto { margin-left: auto; }  /* BS5 equivalent of BS3 .ml-auto */

/* RSS link — EXACT kmu.gov.ua .wcag-rss
   On kmu.gov.ua: position:absolute, top:0, right:0 — positioned relative to .news-tags-wrap
   The .news-tags-wrap has width: calc(100% - 100px) so RSS sits in the 100px gap on the right */
.wcag-rss {
    padding: 8px;
    border: 2px solid rgb(82, 118, 174);
    border-radius: 0;
    color: rgb(45, 92, 166);
    font-family: ProbaPro, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 21px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: flex-end;
    position: absolute;
    top: 0;
    right: 0;
}

.wcag-rss::before {
    content: "";
    background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXd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3LjUxNDcyQzE0LjIzMDkgNS4yNjQyOCAxMS4xNzg3IDQgNy45OTYwOSA0WiIgZmlsbD0iIzUyNzZBRSIvPgo8L3N2Zz4K");
    background-repeat: no-repeat;
    background-size: contain;
    width: 24px;
    height: 24px;
    margin-right: 5px;
}

.wcag-rss:hover {
    text-decoration: underline;
}

/* -------------------------------------------------------------------
   3. Tag buttons: .wcag-tags-item
   kmu.gov.ua exact computed styles:
     display: inline-block
     padding: 8px 15px 6px
     margin: 0 0 5px
     font-size: 11px
     font-weight: 600
     font-family: ProbaPro, sans-serif
     color: rgb(29, 29, 27)  (#1D1D1B)
     background: transparent
     border: 2px solid rgba(35, 65, 97, 0.5)
     border-radius: 100px (pill)
     line-height: 11px
     letter-spacing: 1.1px
     text-transform: uppercase
     text-align: center
     text-decoration: none
     cursor: pointer
     white-space: nowrap
     box-sizing: border-box
     text-underline-offset: auto
   ------------------------------------------------------------------- */
.wcag-tags-item {
    display: inline-block;
    margin-bottom: 5px;
    color: #1D1D1B;
    text-align: center;
    font-family: ProbaPro, sans-serif;
    font-size: 11px;
    font-weight: 600;
    line-height: 11px;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    padding: 8px 15px 6px;
    border-radius: 100px;
    border: 2px solid rgba(35, 65, 97, 0.5);
    background-color: transparent;
    text-decoration: none;
    text-underline-offset: auto;
    white-space: nowrap;
    cursor: pointer;
    box-sizing: border-box;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    transition: all 0.15s ease-in-out;
    flex-shrink: 0;
}

/* -------------------------------------------------------------------
   3a. .border-transparent — inactive tags have transparent border
   kmu.gov.ua: .wcag-tags-item.border-transparent { border-color: transparent; }
   ------------------------------------------------------------------- */
.wcag-tags-item.border-transparent {
    border-color: transparent;
}

/* -------------------------------------------------------------------
   3b. Active state — border becomes visible
   kmu.gov.ua: .wcag-tags-item.border-transparent.active { border-color: rgba(35,65,97,0.5); }
   Background stays transparent, color stays #1D1D1B.
   ------------------------------------------------------------------- */
.wcag-tags-item.border-transparent.active,
.wcag-tags-item.active,
.wcag-tags-item[aria-pressed="true"] {
    border-color: rgba(35, 65, 97, 0.5);
    background-color: transparent;
    color: #1D1D1B;
    box-shadow: none;
}

/* -------------------------------------------------------------------
   3c. Hover state
   kmu.gov.ua: color stays #1D1D1B, text-decoration: underline
   ------------------------------------------------------------------- */
.wcag-tags-item:hover {
    color: #1D1D1B;
    text-decoration: underline;
    background-color: transparent;
    border-color: transparent;
}

/* Active + hover: no underline, cursor auto */
.wcag-tags-item.active:hover,
.wcag-tags-item[aria-pressed="true"]:hover {
    text-decoration: none;
    cursor: auto;
    background-color: transparent;
    border-color: rgba(35, 65, 97, 0.5);
    color: #1D1D1B;
}

/* Border-transparent hover: keep transparent border */
.wcag-tags-item.border-transparent:hover {
    border-color: transparent;
}

/* Border-transparent active hover: show border */
.wcag-tags-item.border-transparent.active:hover {
    border-color: rgba(35, 65, 97, 0.5);
}

/* -------------------------------------------------------------------
   3d. Focus state
   kmu.gov.ua: outline-offset: -2px (default browser outline)
   ------------------------------------------------------------------- */
.news-tags-wrap .wcag-tags-item:focus,
.wcag-tags-item:focus {
    outline-offset: -2px;
    background-color: transparent;
    color: #1D1D1B;
}

.wcag-tags-item.active:focus {
    background-color: transparent;
    border-color: rgba(35, 65, 97, 0.5);
    color: #1D1D1B;
}

/* -------------------------------------------------------------------
   3e. Hidden tags (JS hides overflow tags)
   kmu.gov.ua: visibility:hidden, position:absolute, w/h:0, pointer-events:none
   ------------------------------------------------------------------- */
.news-tags-wrap .wcag-tags-item.hidden,
.wcag-tags-item.hidden {
    visibility: hidden;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

/* -------------------------------------------------------------------
   4. "Ще теми" dropdown — EXACT kmu.gov.ua rules
   ------------------------------------------------------------------- */

/* Hidden state (when JS determines no overflow) */
.news-tags-wrap .dropdown.hidden {
    visibility: hidden;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

/* EXACT kmu.gov.ua .dropdown-button */
.dropdown-button {
    color: rgb(45, 92, 166);
    font-size: 11px;
    font-weight: 700;
    line-height: 11px;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    border-radius: 100px;
    height: 29px;
    display: flex;
    align-items: center;
    padding-left: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: ProbaPro, sans-serif;
}

.dropdown-button::after {
    content: "";
    background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHZpZXdCb3g9IjAgMCAzMCAzMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyLjYgMThMOSAxNC40MVYxM0gxMC40MUwxNCAxNi41OEMxNC4yNjYgMTYuODQzOCAxNC42MjU0IDE2Ljk5MTggMTUgMTYuOTkxOEMxNS4zNzQ2IDE2Ljk5MTggMTUuNzM0IDE2Ljg0MzggMTYgMTYuNThMMTkuNTkgMTNIMjFWMTQuNDFMMTcuNCAxOEMxNi43NjI3IDE4LjYzNTEgMTUuODk5NyAxOC45OTE3IDE1IDE4Ljk5MTdDMTQuMTAwMyAxOC45OTE3IDEzLjIzNzMgMTguNjM1MSAxMi42IDE4WiIgZmlsbD0iIzJENUNBNiIvPgo8L3N2Zz4K");
    background-repeat: no-repeat;
    background-size: contain;
    width: 30px;
    height: 30px;
    transform: translateY(-2px);
}

.dropdown-button:focus {
    outline-offset: -2px;
}

/* EXACT kmu.gov.ua .news-tags-wrap .dropdown-menu */
/* EXACT kmu.gov.ua .dropdown .dropdown-menu */
.dropdown .dropdown-menu {
    background: #fff;
    border: 1.5px solid rgba(0, 0, 0, 0.176);
    border-radius: 6px;
    box-shadow: none;
    padding: 8px 0;
    margin: 0;
    max-width: 200px;
    max-height: 500px;
    overflow-y: scroll;
    list-style: none;
}

.dropdown .dropdown-menu::-webkit-scrollbar {
    width: 4px;
}

.dropdown .dropdown-menu::-webkit-scrollbar-track {
    background: rgb(241, 241, 241);
}

.dropdown .dropdown-menu::-webkit-scrollbar-thumb {
    background: rgb(136, 136, 136);
}

.dropdown .dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: rgb(85, 85, 85);
}

/* EXACT kmu.gov.ua .dropdown .dropdown-item */
.dropdown .dropdown-item {
    display: block;
    padding: 4px 16px;
    background: transparent;
    border: none;
    border-radius: 0;
    color: rgb(33, 37, 41);
    font-family: ProbaPro, sans-serif;
    font-size: 11px;
    font-weight: 600;
    line-height: 12px;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    white-space: normal;
    cursor: pointer;
    text-decoration: none;
    width: 100%;
    text-align: left;
    box-sizing: border-box;
}

.dropdown .dropdown-item:hover,
.dropdown .dropdown-item:focus {
    background-color: #f8f9fa;
    color: rgb(33, 37, 41);
    text-decoration: none;
}

.dropdown .dropdown-item.active,
.dropdown .dropdown-item:active {
    background-color: transparent;
    color: rgb(33, 37, 41);
    border-left: 3px solid rgb(45, 92, 166);
}

/* EXACT kmu.gov.ua .dropdown-menu li */
.dropdown .dropdown-menu li {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Hide mobile-only tags on desktop */
.mobile-only-tags {
    display: none;
}

/* -------------------------------------------------------------------
   6. Responsive: Mobile (max-width: 768px)
   kmu.gov.ua on mobile: same horizontal scroll, but touch-friendly
   ------------------------------------------------------------------- */
@media (max-width: 768px) {
    .news-tags-wrap {
        width: 100%;
    }

    .nav.wcag-tags {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: scroll;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        scrollbar-width: none;
        padding-bottom: 5px;
        padding-top: 2px;
        margin-bottom: 0;
    }

    .nav.wcag-tags::-webkit-scrollbar {
        display: none;
    }

    /* Hide "Ще теми" dropdown on mobile — show all tags inline */
    .dropdown.d-inline-block {
        display: none !important;
    }

    /* Hide RSS link on mobile */
    .wcag-rss {
        display: none !important;
    }

    /* Show mobile-only tags on mobile (inline scroll with other tags) */
    .mobile-only-tags {
        display: inline-block !important;
    }

    .wcag-tags-item {
        flex-shrink: 0 !important;
        white-space: nowrap;
        padding: 8px 15px 6px !important;
        font-size: 11px !important;
        font-weight: 600 !important;
        line-height: 11px !important;
        letter-spacing: 1.1px !important;
        border-radius: 100px !important;
        border: 2px solid rgba(35, 65, 97, 0.5) !important;
    }

    .wcag-tags-item.border-transparent {
        border-color: transparent !important;
    }

    .wcag-tags-item.border-transparent.active,
    .wcag-tags-item.active {
        border-color: rgba(35, 65, 97, 0.5) !important;
    }

    .wcag-tags.dragging {
        cursor: grabbing;
        user-select: none;
    }

    .wcag-tags.dragging .wcag-tags-item {
        pointer-events: none;
    }
}

/* -------------------------------------------------------------------
   7. News tag widget results (filtered content area)
   ------------------------------------------------------------------- */
.news-tag-widget-results {
    margin-top: 20px;
}

.news-tag-widget-results .news-item {
    margin-bottom: 15px;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.news-tag-widget-results .news-item:last-child {
    border-bottom: none;
}

.news-tag-widget-results .news-item h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
}

.news-tag-widget-results .news-item .date {
    color: #666;
    font-size: 12px;
}

/* -------------------------------------------------------------------
   8. Form controls — uses kmu.gov.ua rules from section 10
   ------------------------------------------------------------------- */

/* -------------------------------------------------------------------
   9. jQuery UI Datepicker Calendar Popup
   ------------------------------------------------------------------- */
.ui-datepicker {
    background: #ffffff !important;
    border: 1px solid #aaaaaa !important;
    color: #222222 !important;
    font-family: Arial, sans-serif !important;
    font-size: 13px !important;
    z-index: 9999 !important;
}

.ui-datepicker .ui-datepicker-header {
    background: #cccccc !important;
    border: 1px solid #aaaaaa !important;
    color: #222222 !important;
    font-weight: bold !important;
}

.ui-datepicker .ui-datepicker-title {
    color: #222222 !important;
    font-weight: bold !important;
    text-align: center !important;
}

.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
    background: #e6e6e6 !important;
    border: 1px solid #cccccc !important;
    color: #222222 !important;
    cursor: pointer !important;
    text-decoration: none !important;
}

.ui-datepicker .ui-datepicker-prev:hover,
.ui-datepicker .ui-datepicker-next:hover {
    background: #dadada !important;
    border: 1px solid #999999 !important;
    color: #212121 !important;
}

.ui-datepicker table {
    background: #ffffff !important;
    border-collapse: collapse !important;
    font-size: 13px !important;
    margin: 0 !important;
    width: 100% !important;
}

.ui-datepicker th {
    background: #dadada !important;
    border: 1px solid #cccccc !important;
    color: #222222 !important;
    font-weight: bold !important;
    padding: 5px !important;
    text-align: center !important;
}

.ui-datepicker td {
    background: #ffffff !important;
    border: 1px solid #eeeeee !important;
    padding: 1px !important;
    text-align: center !important;
}

.ui-datepicker td a {
    background: #ffffff !important;
    border: 1px solid transparent !important;
    color: #222222 !important;
    display: block !important;
    padding: 3px !important;
    text-align: center !important;
    text-decoration: none !important;
}

.ui-datepicker td a:hover {
    background: #0073aa !important;
    border: 1px solid #0073aa !important;
    color: #ffffff !important;
}

.ui-datepicker td.ui-datepicker-today a {
    background: #ffffcc !important;
    border: 1px solid #ffccaa !important;
    color: #222222 !important;
    font-weight: bold !important;
}

.ui-datepicker td.ui-datepicker-current-day a,
.ui-datepicker td.ui-state-active a {
    background: #0073aa !important;
    border: 1px solid #0073aa !important;
    color: #ffffff !important;
    font-weight: bold !important;
}

.ui-datepicker td.ui-datepicker-other-month a {
    background: #f5f5f5 !important;
    color: #999999 !important;
}

.ui-datepicker .ui-datepicker-buttonpane {
    background: #f0f0f0 !important;
    border-top: 1px solid #cccccc !important;
    text-align: left !important;
    padding: 8px !important;
}

.ui-datepicker .ui-datepicker-buttonpane button {
    background: #e6e6e6 !important;
    border: 1px solid #cccccc !important;
    color: #222222 !important;
    cursor: pointer !important;
    font-size: 11px !important;
    margin: 0.5em 0.2em 0.4em !important;
    padding: 0.2em 0.6em 0.3em 0.6em !important;
}

.ui-datepicker .ui-datepicker-buttonpane button:hover {
    background: #dadada !important;
    border: 1px solid #999999 !important;
    color: #212121 !important;
}

/* Handle Ukrainian month/day names */
.ui-datepicker .ui-datepicker-month,
.ui-datepicker .ui-datepicker-year {
    color: #222222 !important;
}

/* -------------------------------------------------------------------
   10. News Index Page: Tag Filters Widget
   COPIED from kmu.gov.ua (gov.ua design system)
   ------------------------------------------------------------------- */

/* --- COPIED from kmu.gov.ua: h1 page title --- */
.page-content .news__title--text {
    font-family: ProbaPro !important;
    font-size: 40px !important;
    font-weight: 600 !important;
    color: rgb(0, 0, 0) !important;
    text-align: left !important;
    margin: 0 0 20px !important;
    max-width: 100% !important;
    line-height: normal !important;
}

/* Widget container — override .page-title width constraint */
.page-title:has(.tag-filters-widget) {
    width: 100% !important;
    max-width: 100% !important;
    text-align: left !important;
}

.page-title .widget.tag-filters-widget,
.widget.tag-filters-widget {
    width: 100%;
    max-width: 100%;
    margin: 0 0 30px 0;
    padding: 0;
    display: block;
    box-sizing: border-box;
    position: relative;
    overflow: visible;
}

.page-title > div,
.page-title .tag-filters-widget,
.page-title-text,
.page-title-desc {
    overflow: visible;
}

.page-title {
    position: relative;
    overflow: visible;
}

/* "Фільтри" heading — COPIED from kmu.gov.ua */
.widget.tag-filters-widget .widget-title {
    text-align: left !important;
    font-size: 30px !important;
    font-weight: 600 !important;
    margin: 16px 0 0 !important;
    color: rgb(0, 0, 0) !important;
    padding: 0 !important;
    display: block !important;
}

/* --- COPIED from kmu.gov.ua: .wcag-form --- */
.wcag-form label,
.wcag-form .label-title {
    font-family: ProbaPro, sans-serif;
    color: rgb(0, 0, 0);
    font-size: 18px;
    font-weight: 600;
    line-height: 24px;
    margin-bottom: 10px;
}

.wcag-form input,
.wcag-form select,
.wcag-form .form-control {
    width: 100% !important;
    height: 50px !important;
    font-size: 16px !important;
    border: 2px solid rgb(105, 118, 139) !important;
    border-radius: 0 !important;
    padding: 0 10px !important;
    background-color: rgb(255, 255, 255) !important;
    color: rgb(0, 0, 0) !important;
    box-shadow: none !important;
}

/* Select arrow — COPIED from kmu.gov.ua .choices::after (CSS triangle) */
.wcag-form select,
.wcag-form select.form-control {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    padding-right: 30px !important;
    position: relative;
}

.plugin-tag-filters-form .col-lg-3 {
    position: relative;
}

.plugin-tag-filters-form .col-lg-3::after {
    content: "";
    position: absolute;
    right: 23.5px;
    bottom: 35px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 4.5px;
    border-color: rgb(51, 51, 51) transparent transparent transparent;
    pointer-events: none;
}

.wcag-form input::placeholder {
    color: rgb(68, 68, 68);
}

.wcag-form input:focus,
.wcag-form select:focus,
.wcag-form .form-control:focus {
    outline-offset: 2px !important;
    outline: rgb(0, 115, 230) solid 3px !important;
    border-color: rgb(105, 118, 139) !important;
    box-shadow: none !important;
}

.wcag-form .accessible-datepicker-group,
.wcag-form .plugin-accessible-datepicker-group {
    border: 2px solid rgb(105, 118, 139);
}

/* --- COPIED from kmu.gov.ua: .accessible-datepicker --- */
.accessible-datepicker-group,
.plugin-accessible-datepicker-group {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 50px;
    background-color: rgb(255, 255, 255);
}

.accessible-datepicker-input,
.plugin-accessible-datepicker-input,
input[type="text"]#pluginFrom,
input[type="text"]#pluginTill {
    height: 46px !important;
    font-style: normal;
    font-size: 16px !important;
    font-weight: 400;
    line-height: 24px;
    padding: 0 8px !important;
    border: none !important;
    width: 100% !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin-top: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

.accessible-datepicker-input:focus,
.plugin-accessible-datepicker-input:focus {
    border-bottom: none;
    outline: rgb(0, 115, 230) solid 3px !important;
    outline-offset: 3px !important;
}

.accessible-datepicker-input::placeholder,
.plugin-accessible-datepicker-input::placeholder {
    font-family: ProbaPro;
    color: rgb(68, 68, 68);
}

.accessible-datepicker-icon,
.plugin-accessible-datepicker-icon {
    height: 46px;
    width: 34px;
    border: none;
    background-color: rgb(255, 255, 255);
    background-repeat: no-repeat;
    background-position: center center;
    background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik05IDJWNEgxNFYySDE2VjRIMTdDMTguNjU2OSA0IDIwIDUuMzQzMTUgMjAgN1YxOEMyMCAxOS42NTY5IDE4LjY1NjkgMjEgMTcgMjFINkM0LjM0MzE1IDIxIDMgMTkuNjU2OSAzIDE4VjdDMyA1LjM0MzE1IDQuMzQzMTUgNCA2IDRIN1YySDlaTTUgN0M1IDYuNDQ3NzIgNS40NDc3MiA2IDYgNkgxN0MxNy41NTIzIDYgMTggNi40NDc3MiAxOCA3VjlIOUg1VjdaTTUgMTFWMTRIOFYxMUg1Wk01IDE2VjE4QzUgMTguNTUyMyA1LjQ0NzcyIDE5IDYgMTlIOFYxNkg1Wk0xMCAxOUgxM1YxNkgxMFYxOVpNMTUgMTZWMTlIMTdDMTcuNTUyMyAxOSAxOCAxOC41NTIzIDE4IDE4VjE2SDE1Wk0xOCAxNFYxMUgxNVYxNEgxOFpNMTAgMTRWMTFIMTNWMTRIMTBaIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K");
    cursor: pointer;
}

.accessible-datepicker-icon:focus,
.plugin-accessible-datepicker-icon:focus {
    outline-offset: 3px;
    outline: rgb(0, 115, 230) solid 3px !important;
}

/* --- COPIED from kmu.gov.ua: .btn_default.blue-secondary --- */
.btn_default {
    background-color: rgb(255, 255, 255);
    border: 2px solid rgb(0, 75, 193);
    min-height: 50px;
    padding: 11px 15px;
    display: block;
    min-width: 160px;
    max-width: 260px;
    font-family: ProbaPro, sans-serif;
    font-size: 20px;
    color: rgb(0, 75, 193);
    font-weight: 600;
    line-height: 24px;
    margin-bottom: 15px;
    text-align: center;
    text-decoration: none !important;
    transition: none !important;
}

.btn_default:hover,
.btn_default.hover {
    color: rgb(35, 65, 97);
    border: 2px solid rgb(35, 65, 97);
    text-decoration: none !important;
}

.btn_default.blue-secondary {
    border: none !important;
    border-radius: 0 !important;
    background-color: rgb(45, 92, 166) !important;
    color: rgb(255, 255, 255) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 24px !important;
    max-width: 100% !important;
    padding: 8px 24px !important;
}

.btn_default.blue-secondary:hover {
    background-color: rgb(35, 65, 97);
}

.btn_default.blue-secondary:focus {
    outline-offset: 2px;
    outline: rgb(0, 115, 230) solid 3px !important;
}

/* --- COPIED from kmu.gov.ua: .link-skip-btn --- */
.link-skip-btn {
    display: inline-block;
    margin: 0;
    color: rgb(0, 0, 0);
    font-size: 16px;
    line-height: 24px;
    text-underline-offset: 4px;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    text-decoration: underline !important;
}

.link-skip-btn:focus {
    z-index: 1;
    outline: rgb(0, 115, 230) solid 3px;
    outline-offset: 2px;
    margin-top: 16px;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    margin-bottom: 16px !important;
}

/* --- Form layout --- */
.plugin-tag-filters-form.wcag-form {
    background: transparent;
    padding: 0;
    margin: 0 -12px;
    border: none;
    position: relative;
    z-index: 10;
    width: auto;
    box-sizing: border-box;
    overflow: visible;
}

.plugin-tag-filters-form .row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    margin: 0 -12px;
}

.plugin-tag-filters-form [class*="col-"] {
    padding: 0 12px;
    box-sizing: border-box;
}

/* -------------------------------------------------------------------
   11. Timeline news list — COPIED from kmu.gov.ua
   ------------------------------------------------------------------- */

/* --- COPIED from kmu.gov.ua debug --- */

/* Timeline card */
.timeline-block .timeline-item { position: relative !important; padding-left: 100px !important; margin-bottom: 25px !important; }
@media screen and (max-width: 768px) { .timeline-block .timeline-item { padding-left: 70px !important; } }

/* Dot — 12px, blue, left:60px */
.timeline-block .timeline-item::before { content: "" !important; display: block !important; width: 12px !important; height: 12px !important; border-radius: 50% !important; position: absolute !important; left: 60px !important; top: 5px !important; background-color: rgb(194, 197, 203) !important; z-index: 1 !important; }
@media screen and (max-width: 575px) { .timeline-block .timeline-item::before { left: 45px !important; } }

/* First item dot = blue */
.timeline-block .timeline-item:first-child::before { background-color: rgb(45, 92, 166) !important; }

/* Line — 1px, gray, left:66px */
.timeline-block .timeline-item::after { content: "" !important; display: block !important; width: 1px !important; height: calc(100% - 12px) !important; position: absolute !important; left: 66px !important; top: 17px !important; background-color: rgb(194, 197, 203) !important; }
@media screen and (max-width: 575px) { .timeline-block .timeline-item::after { left: 51px !important; } }
.timeline-block .timeline-item:last-child::after { display: none !important; }

/* Time — left:0, top:5px, color rgb(33,37,41) */
.timeline-block .timeline-item .time { position: absolute !important; left: 0px !important; top: 5px !important; font-size: 18px !important; font-weight: 400 !important; color: rgb(33, 37, 41) !important; line-height: 18px !important; }

/* Title — fontWeight:600, lineHeight:27px */
.timeline-block .timeline-item .desctiption .title { padding-top: 5px !important; margin-bottom: 10px !important; font-family: ProbaPro !important; font-weight: 600 !important; font-size: 18px !important; line-height: 27px !important; color: rgb(45, 92, 166) !important; text-decoration: none !important; }

/* Date heading — padding-left:100px, margin:40px 0 30px */
.timeline-block .date { padding-left: 100px !important; margin: 40px 0 30px !important; }
@media screen and (max-width: 992px) { .timeline-block .date { padding-left: 0 !important; } }

/* Day — color:#000 */
.timeline-block .date .day { font-family: ProbaPro !important; font-weight: 600 !important; font-size: 24px !important; color: rgb(0, 0, 0) !important; line-height: 32px !important; }

/* Day of week — 16px, rgb(68,68,68) */
.timeline-block .date .day-of-week { font-family: ProbaPro !important; font-weight: 400 !important; font-size: 16px !important; color: rgb(68, 68, 68) !important; line-height: 24px !important; }

/* Timeline block spacing */
.timeline-block { position: relative !important; margin-bottom: 0 !important; margin-top: 0 !important; }

/* --- COPIED: Tag pills .wcag-tags-item.secondary --- */
.timeline-item ul {
    display: block;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

/* Override old .tag class from dpss theme */
.timeline-item li.tag {
    display: inline-block !important;
    margin: 0 !important;
    text-transform: none !important;
    font-size: 14px !important;
    letter-spacing: normal !important;
    border: none !important;
    padding: 0 !important;
    line-height: normal !important;
    border-radius: 0 !important;
    color: inherit !important;
}

.timeline-item li.tag a {
    font-family: ProbaPro, sans-serif;
    font-size: 14px !important;
    font-weight: 500;
    color: rgb(68, 68, 68) !important;
    background-color: rgb(245, 247, 250) !important;
    border: 1.5px solid rgba(0, 75, 193, 0.1) !important;
    border-radius: 30px !important;
    padding: 4px 10px !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 21px;
    display: inline-block;
    margin: 0 5px 5px 0;
}

.timeline-item li.tag a:hover {
    border-color: rgba(0, 75, 193, 0.3) !important;
}

/* --- COPIED from kmu.gov.ua: .timeline-load-more = div.d-flex.my-5 --- */
.timeline-load-more { display: flex; margin: 48px 0; padding: 0; border: none; }
.timeline-load-more .btn_default { margin: 0 auto; }

/* Remove static__list borders (not present on KMU timeline) */
.static__list { border-top: none !important; border-bottom: none !important; }

/* --- COPIED from kmu.gov.ua: .wcag-digest --- */
.wcag-digest { background-color: rgb(45, 92, 166); background-image: url("/static/images/ringwithbg.svg"); background-size: 208px; background-position-x: -45px; background-position-y: 0%; background-repeat: no-repeat; padding: 110px 30px 30px 40px; }
.wcag-digest-title { color: rgb(255, 255, 255); font-size: 30px; font-weight: 600; line-height: 40px; }
.wcag-digest-descr { color: rgb(255, 255, 255); font-size: 16px; font-weight: 500; line-height: 24px; margin-top: 5px; }
.wcag-digest-label { color: rgb(255, 255, 255); font-size: 18px; font-weight: 600; line-height: 24px; margin-top: 30px; display: block; }
.wcag-digest-input { width: 100%; border: 2px solid rgb(105, 118, 139); background: rgb(255, 255, 255); height: 50px; color: rgb(45, 92, 166); font-size: 16px; font-weight: 600; line-height: 24px; margin-top: 5px; padding: 13px; box-sizing: border-box; }
.wcag-digest-input::placeholder { color: rgb(68, 68, 68); font-size: 16px; font-weight: 400; line-height: 24px; }
.wcag-digest-btn { width: 100%; background: rgb(255, 255, 255); padding: 13px 24px; color: rgb(0, 0, 0); font-size: 16px; font-weight: 600; line-height: 24px; display: flex; align-items: center; margin-top: 20px; justify-content: center; border: none; cursor: pointer; }
.wcag-digest-btn::after { content: ""; background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNSAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNi4yMDcyIDEyLjcwNzFMMTEuMjA3MiAxNy43MDcxTDkuNzkyOTcgMTYuMjkyOUwxNC4wODU5IDEyTDkuNzkyOTcgNy43MDcwOUwxMS4yMDcyIDYuMjkyODhMMTYuMjA3MiAxMS4yOTI5QzE2LjU5NzcgMTEuNjgzNCAxNi41OTc3IDEyLjMxNjYgMTYuMjA3MiAxMi43MDcxWiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg=="); background-repeat: no-repeat; background-size: contain; width: 24px; height: 24px; margin-left: 10px; }

/* -------------------------------------------------------------------
   12. Footer — COPIED from kmu.gov.ua debug
   ------------------------------------------------------------------- */
#layout-footer {
    border-top: 3px solid rgb(45, 92, 166) !important;
}

/* footer-bg container */
#layout-footer .footer-bg {
    padding: 40px 40px 22px !important;
    background: rgb(255, 255, 255) !important;
}

/* "Мапа порталу" button — COPIED from kmu.gov.ua .site-map_btn */
#layout-footer .site-map_btn {
    display: inline-flex !important;
    margin: 0 0 25px !important;
    cursor: pointer !important;
}

#layout-footer .site-map_btn button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

#layout-footer .site-map-title {
    font-family: ProbaPro, sans-serif !important;
    font-size: 22px !important;
    font-weight: 600 !important;
    color: rgb(45, 92, 166) !important;
    line-height: 33px !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-decoration: none !important;
}

/* -------------------------------------------------------------------
   13. Pagination (fallback)
   ------------------------------------------------------------------- */
.navigation.pagination {
    margin: 30px 0;
    text-align: center;
}

.navigation.pagination .screen-reader-text {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
}

.navigation.pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.navigation.pagination .nav-links .page-numbers {
    display: inline-block;
    padding: 6px 12px;
    color: #2d5ca6;
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.42857143;
}

.navigation.pagination .nav-links .page-numbers:hover {
    color: #23527c;
    text-decoration: underline;
}

.navigation.pagination .nav-links .page-numbers.current {
    font-weight: 700;
    color: #273043;
}

.navigation.pagination .nav-links .page-numbers.dots {
    color: #999;
    cursor: default;
}
