:root {
    --theme-border-radius: 5px;
}

/* FIXES */
.phs-viewport {
    background: var(--theme-palette-color-7) !important;
}

div[data-block*="maintenance"] p,
div[data-block*="maintenance"] h2 {
    text-align: center !important;
}

div[data-block*="maintenance"] .ct-share-box>div {
    justify-content: center !important;
}

div[data-block*="maintenance"] pwa-share-button {
    display: none !important;
}

.entries .entry-card.custom-stance-negative,
[data-prefix="single_blog_post"] [class*="ct-container"]>article[class*="post"].custom-stance-negative {
    background: linear-gradient(rgba(255, 0, 0, 0.06), rgba(255, 0, 0, 0.06)),
        var(--theme-palette-color-8);
}

.entries .entry-card.custom-stance-positive,
[data-prefix="single_blog_post"] [class*="ct-container"]>article[class*="post"].custom-stance-positive {
    background:
        linear-gradient(rgba(0, 255, 0, 0.06), rgba(0, 255, 0, 0.06)),
        var(--theme-palette-color-8);
}

.entries .custom-badge-category .wp-block-post-terms__separator,
body:not(:has(#post-5931 article)) #custom-author-pages,
body:not(:has(#post-5090 article)) #custom-author-series {
    display: none !important;
}

.gtranslate_wrapper a.glink,
.gtranslate_wrapper .gt_switcher-popup span:last-child {
    color: white !important;
}

.gtranslate_wrapper .gt_white_content a.glink span {
    color: var(--theme-palette-color-3) !important;
}

.gt_white_content {
    background: var(--theme-palette-color-8) !important;
    color: var(--theme-palette-color-3) !important;
    width: 300px !important;
    margin-left: -150.5px !important;
    border-radius: 5px !important;
}

.gtranslate_wrapper .gt_white_content a {
    border-color: var(--theme-palette-color-5);
}

body.archive[data-prefix="forum-topic_archive"] .entries>article {
    margin-bottom: 25px !important;
}

#footer [data-column="content-block"]:has(.ct-shares-block) {
    justify-content: center !important;
}

.custom-read-more-2,
.custom-donate {
    display: inline-flex !important;
    align-items: center;
    width: 100% !important;
    background: var(--theme-palette-color-7);
    justify-content: center;
    padding: 10px 20px;
    margin: 20px 0px 0px;
    border-radius: 5px;
    gap: 6px;
}

.wp-singular .custom-donate {
    width: unset !important;
    background: var(--theme-palette-color-8);
    /* justify-content: center;
    padding: 10px 5px;
    margin: 20px 0px 0px;
    border-radius: 5px;
    gap: 6px; */
}

/* .custom-donate {
    background: #E65C4B;
    color: white !important;
} */

/* .custom-donate:hover,
.custom-read-more-2 {
    filter: brightness(0.8);
} */

.custom.wp-block-post-terms {
    margin-block-end: 0px !important;
}

.custom-gap-5px {
    gap: 5px;
}

@media (max-width: 1024px) {
    body:not(.page-id-1306) main .custom-dynamic-wrapping {
        text-wrap: nowrap;
        overflow: scroll;
    }

    .custom-site-notice .ct-button {
        transform: scale(0.9);
    }
}

.custom-meta-updated:not(:has(time)),
.wp-block-post-terms a:nth-of-type(n+5),
.wp-block-post-terms .wp-block-post-terms__separator:nth-of-type(n+5),
.comment-form-field-input-email,
.comment-form-field-input-url,
.comment-form-field-input-author {
    display: none;
}

article .ct-share-box.is-width-constrained>* {
    justify-content: center;
}

.custom-embeds-container {
    justify-items: center;
    text-align: center;
}

#post-1501 .wp-block-group {
    gap: 0.5em !important;
}

/* #post-1501 .wp-block-group>* {
    font-size: var(--wp--preset--font-size--small) !important;
} */

.wp-singular.single-post [data-block="hook:5090"],
.wp-singular.single-post #custom-author-post-series {
    max-width: var(--theme-normal-container-max-width);
    width: var(--theme-container-width);
    justify-self: anchor-center;
    margin-bottom: 50px;
}

[data-color-mode="light"] figure:has(img)+header {
    --theme-text-color: #a4b8cd !important;
    --theme-palette-color-4: #ffffff !important;
    --theme-heading-color: #ffffff !important;
}

.custom-discuss-button,
.custom-follow-button {
    background: #4CAF51;
}

.custom-discuss-button:hover,
.custom-follow-button:hover {
    background: #258d2a;
}

.wp-block-blocksy-query .ct-query-template-grid>article {
    padding: var(--card-inner-spacing, 30px);
    border: var(--card-border, none);
    box-shadow: var(--theme-box-shadow);
    border-radius: var(--theme-border-radius);
    background-color: var(--theme-palette-color-8);
    --theme-box-shadow: 0px 12px 18px -6px rgba(34, 56, 101, 0.04);
    --theme-content-spacing: 1em;
}

.wp-block-blocksy-query .ct-query-template-grid p:empty {
    display: none;
}

.custom-read-more {
    margin-bottom: 10px;
}

.custom-link-overlay {
    position: absolute;
    inset: 0;
    margin: 0;
    pointer-events: none;
}

.wp-singular.single-forum-topic .meta-categories {
    margin-top: 20px;
}

#main>.hero-section[data-type="type-2"]:not(:has(figure)) {
    background-color: var(--theme-palette-color-8);
    --min-height: 200px;
}

.hero-section[data-type=type-2]>[class*=ct-container] {
    padding: unset !important;
}

#footer [data-row="middle"] .ct-container {
    padding-block-end: 30px;
    padding-block-start: 0px;
}

#footer [data-row="middle"] blockquote {
    background: var(--theme-palette-color-5) !important;
    color: var(--theme-palette-color-3) !important;
}

a[data-network="facebook"] {
    --official-color: #013b96 !important;
}

.social-reels-viewer [class^="wpsr-col-"] {
    flex: unset !important;
}

blockquote.instagram-media {
    align-content: center;
}

.post-type-archive-source .wp-block-post-excerpt {
    margin-top: 0px !important;
}

.custom-social-links,
.archive.author .ct-social-box,
.page-id-2368 .ct-social-box {
    justify-content: center;
}

.wp-singular.single-source .custom-social-links[data-icons-type*=":"] .ct-icon-container {
    width: calc(var(--theme-icon-size, 15px) * 3.5) !important;
    height: calc(var(--theme-icon-size, 15px) * 3.5) !important;
}

.custom-social-links .ct-icon,
.wp-singular.single-source .custom-social-links .ct-icon-container svg {
    width: calc(var(--theme-icon-size, 15px) * 2.0) !important;
    height: calc(var(--theme-icon-size, 15px) * 2.0) !important;
}

@media (max-width: 700px) {
    .wp-singular.single-source .custom-social-links[data-icons-type*=":"] .ct-icon-container {
        width: calc(var(--theme-icon-size, 15px) * 2.5) !important;
        height: calc(var(--theme-icon-size, 15px) * 2.5) !important;
    }

    .custom-social-links .ct-icon,
    .wp-singular.single-source .custom-social-links .ct-icon-container svg {
        width: calc(var(--theme-icon-size, 15px) * 1.5) !important;
        height: calc(var(--theme-icon-size, 15px) * 1.5) !important;
    }
}

.custom-author-professions {
    margin-top: 15px;
}

.archive.author .ct-posts-block:not(:has(*)) {
    display: none !important;
}

.archive.author .custom-fancy-heading {
    margin-top: var(--theme-content-vertical-spacing);
}

.custom-archive-post-position {
    color: var(--theme-palette-color-1);
    font-weight: 900;
}

div[data-block="hook:1472"] {
    margin-top: 10px;
}

.ct-comments-container {
    background-color: var(--theme-palette-color-8);
}

body .mobile-menu .ct-menu-link {
    color: var(--theme-link-color);
}

.facetwp-facet-sort_by select {
    border: 1px solid var(--theme-palette-color-5);
    padding: 0px 10px;
    height: 30px;
    margin-bottom: 6px;
    border-radius: 4px;
}

a.custom-social-link {
    padding: 10px;
    border: 1px solid var(--theme-palette-color-2);
    margin: 20px !important;
    display: block;
    justify-self: center;
    border-radius: 5px;
}

a.custom-social-link:hover {
    background: var(--theme-palette-color-2);
    color: white !important;
}

body:not(.archive.author) .hero-section header {
    padding-bottom: 0px !important;
}

.custom-badge-category,
.custom-badge-ranking,
.custom-badge-series,
.custom-badge-sources {
    display: inline-block;
}

.custom-badge-category a,
.custom-badge-ranking a,
.custom-badge a,
.custom-badge-sticky,
.custom-badge-profession,
.custom-badge-forum-topic-status,
.custom-badge-forum-topic-priority {
    background: var(--theme-palette-color-1);
    padding: 5px;
    border-radius: 5px;
    margin-right: 10px;
    margin-bottom: 10px;
    color: white !important;
    display: inline-block;
}

.single-source .custom-badge-profession {
    background: var(--theme-palette-color-5);
}

.custom-badge-forum-topic-status,
.custom-badge-forum-topic-priority {
    font-weight: bold;
}

.custom-badge-forum-topic-status.open {
    background: red;
}

.custom-badge-forum-topic-status.open {
    background: red;
}

.custom-badge-forum-topic-status.pending,
.custom-badge-forum-topic-status.hold {
    background: orange;
}

.custom-badge-forum-topic-status.wip {
    background: yellow;
    color: black !important;
}

.custom-badge-forum-topic-status.solved {
    background: lightgreen;
}

.custom-badge-forum-topic-status.close {
    background: green;
}

.custom-badge-forum-topic-priority.high {
    background: red;
}

.custom-badge-forum-topic-priority.medium {
    background: blue;
}

.custom-badge-forum-topic-priority.low {
    background: green;
}

.custom-badge-profession {
    color: var(--theme-palette-color-4) !important;
    background: var(--theme-palette-color-7);
}

.custom-badge-sources a {
    color: white;
    background: #FF0034;
}

.custom-badge-sources a:hover {
    filter: brightness(0.8);
    background: #FF0034 !important;
}

.custom-header-nav-button {
    margin-right: 5px;
    margin-bottom: 5px;
    display: inline-block;
}

.custom-badge a:hover {
    background: var(--theme-palette-color-2);
}

.custom-badge-sticky,
.custom-badge-ranking a {
    background: #4CAF51;
}

.custom-badge-ranking a:hover {
    background: #2d8d32;
}

.custom-badge-series a {
    background: #ea9a22;
}

.custom-badge-series a:hover {
    background: #ff7b00;
}

.custom-badge-author+.wp-block-post-title,
p:has(.custom-badge-author)+.wp-block-post-title {
    margin-top: var(--wp--preset--spacing--40);
}

.custom-badge-category a:hover {
    background: var(--theme-palette-color-2);
}

body:not(.wp-admin) hr {
    display: block !important;
}

.ct-sidebar {
    --theme-link-initial-color: unset !important;
}

form.comment-form label {
    padding: 5px !important;
}

textarea[name="comment"] {
    background-color: var(--theme-palette-color-7) !important;
    padding: 10px;
}

article:has(span.custom-hide-article-featured-image) .wp-block-post-featured-image {
    display: none !important;
}

body div[data-block]+main {
    padding-top: var(--theme-content-vertical-spacing);
}

/* SHORTCUT BAR */
.ct-shortcuts-bar-items li.active-shortcut a {
    color: var(--theme-palette-color-1);
}

.ct-shortcuts-bar-items li.active-shortcut svg {
    fill: var(--theme-palette-color-1);
}

/* QUICK SORT */
.quick-sort-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.quick-sort {
    display: inline-flex;
    align-items: stretch;

    padding: 4px;
    background: var(--theme-palette-color-8);
    border-radius: 999px;

    overflow: hidden;
    /* Hide scrollbar */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.quick-sort::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.quick-sort__button {
    appearance: none;
    -webkit-appearance: none;

    position: relative;

    padding: 10px 18px;

    border: 0;
    border-radius: 0;

    background: transparent;
    color: var(--theme-palette-color-3);

    font-size: 14px;
    font-weight: 600;
    line-height: 1;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.1s ease;
}

.quick-sort__button:first-child {
    border-radius: 999px 0 0 999px;
}

.quick-sort__button:last-child {
    border-radius: 0 999px 999px 0;
}

.quick-sort__button:hover {
    color: #fff;
    background: var(--theme-palette-color-1);
}

.quick-sort__button.is-active {
    color: #fff;
    background: var(--theme-palette-color-1);

    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

quick-sort__button:active {
    transform: translateY(1px);
}

.quick-sort__button:focus-visible {
    outline: 2px solid var(--theme-palette-color-1);
    outline-offset: -2px;
    z-index: 1;
}

@media (max-width: 600px) {

    .quick-sort {
        max-width: 100%;
        overflow-x: auto;
    }

    .quick-sort__button {
        padding: 9px 14px;
        font-size: 13px;
        white-space: nowrap;
    }

}

/* FANCY HEADING */
.custom-fancy-heading {
    display: flex;
    align-items: center;
    text-align: center;
}

.custom-fancy-heading::before,
.custom-fancy-heading::after {
    content: "";
    flex: 1;
    border-bottom: 2px solid var(--theme-palette-color-5);
}

.custom-fancy-heading::before {
    margin-right: 15px;
}

.custom-fancy-heading::after {
    margin-left: 15px;
}

/* AFTER HEADER */

#main-container>*:not(header):not(main):not(footer) {
    align-self: center !important;
}

.custom-boxed {
    max-width: var(--theme-normal-container-max-width) !important;
    width: var(--theme-container-width) !important;
}

.wp-block-pullquote {
    padding-bottom: 0px !important;
}

/* SHARE */
.ct-share-box {
    justify-self: center;
}

header .ct-share-box,
footer .ct-share-box {
    justify-self: right;
}

/* HOME */
.home .hero-section {
    display: none;
}

/* POST FILTER */

.fs-label-wrap,
.fs-search,
.fs-dropdown {
    background: var(--theme-palette-color-8) !important;

}

.fs-label-wrap,
.fs-dropdown {
    border: 1px solid var(--theme-border-color) !important;
}

html[data-color-mode="dark"] .facetwp-selections .facetwp-selection-value {
    background-image: url('../images/icon-close-dark-mode.png')
}

.post-filter-selections:has(ul) {
    background: var(--theme-palette-color-8) !important;
    margin-bottom: 20px !important;
    border-radius: var(--theme-border-radius);
    padding: 10px 5px;
}

.facetwp-selection-value {
    color: var(--theme-palette-color-4) !important;
}

.facetwp-selection-value:hover {
    color: var(--theme-link-hover-color) !important;
}

.post-filter-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    align-items: end;
    gap: 16px;
    margin-bottom: 20px;
    padding: 20px;
    background: var(--theme-palette-color-8);
    /* border: 1px solid rgba(18, 41, 69, 0.12); */
    border-radius: var(--theme-border-radius);
}

.post-filter__label {
    margin: 0px 0px 7px 7px;
    color: var(--theme-text-color);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    /* justify-self: center; */
}

.post-filter .facetwp-facet {
    margin-bottom: 0;
}

.post-filter .fs-wrap {
    width: 100%;
}

.post-filter .fs-label-wrap {
    /* min-height: 44px; */
    /* border: 1px solid rgba(18, 41, 69, 0.25); */
    border-radius: 4px;
}

.post-filter .fs-label {
    padding: 11px 35px 11px 13px;
}

.post-filter-selections {
    margin-bottom: 24px;
}

.post-filter--reset .facetwp-facet {
    min-height: 44px;
    display: flex;
    align-items: center;
}

.facetwp-hidden {
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.6;
}

@media (max-width: 1024px) {
    .post-filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #footer .ct-shares-block {
        justify-self: center;
    }
}

/* @media (max-width: 600px) {
    .post-filter-bar {
        grid-template-columns: 1fr;
    }
} */

@media (max-width: 689px) {
    .ct-header-cta .ct-button {
        font-size: 0px !important;
    }
}

/* ACF BASED TABLE */
/*acf based table*/
.custom-acf-table-wrapper {
    overflow-x: auto;
    margin-top: 60px;
    margin-bottom: 60px;
    max-height: 500px;
    border-radius: 5px;
    background: var(--theme-palette-color-8);
}

body:has(#sidebar) .custom-acf-table-wrapper {
    background: var(--theme-palette-color-7);
    margin-top: 0px;
}


.custom-acf-table-wrapper {
    --theme-table-font-size: 20px;
}

.custom-acf-table-wrapper td.custom-column-name,
.custom-acf-table-wrapper td.custom-column-url {
    text-align: center;
}

.custom-acf-table-heading {
    /* background: var(--theme-palette-color-1) !important; */
    font-size: 1.25em;
}

.custom-acf-table {
    /* color: white; */
}

.custom-acf-table tr,
.custom-acf-table td {
    border: 1px solid var(--theme-palette-color-5);
    padding: 8px;
}

.custom-acf-table tr.group-head {
    color: white !important;
    font-size: 1.1em !important;
    text-transform: uppercase;
    text-align: center;
    font-weight: bold;
}

.custom-acf-table tr:nth-child(even) {
    background: var(--theme-palette-color-5);
}

.custom-acf-table .label {
    font-weight: bold;
}

.custom-acf-table th {
    padding-top: 12px;
    padding-bottom: 12px;
    text-align: center;
    background-color: var(--theme-palette-color-1);
    color: white;
    position: sticky;
    top: 0px;
    text-transform: uppercase;
}

.custom-acf-table .custom-acf-table th {
    background-color: var(--theme-palette-color-1);
}


#custom-post-content-updates tr[data-row-color]>td.custom-column-title {
    background: color-mix(in srgb, var(--custom-update-color) 30%, transparent);
}

#custom-post-content-updates tr[data-significance="level_5"] td.custom-column-significance {
    background: color-mix(in srgb, red 30%, transparent);
}

#custom-post-content-updates tr[data-significance="level_4"] td.custom-column-significance {
    background: color-mix(in srgb, orange 30%, transparent);
}

#custom-post-content-updates tr[data-significance="level_3"] td.custom-column-significance {
    background: color-mix(in srgb, yellow 30%, transparent);
}

#custom-post-content-updates tr[data-significance="level_2"] td.custom-column-significance {
    background: color-mix(in srgb, wheat 30%, transparent);
}

#custom-post-content-updates tr[data-significance="level_1"] td.custom-column-significance {
    background: color-mix(in srgb, grey 30%, transparent);
}


/*
 * Social Reels Viewer v2
 * Load this stylesheet after your theme/plugin feed styles.
 */

/* Open button */
.social-reels-open-button,
#open-social-reels {
    position: fixed;
    right: 20px;
    bottom: 90px;
    z-index: 99999;

    width: 50px;
    height: 50px;
    min-width: 50px;
    padding: 0;
    margin: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 50%;

    font-size: 26px;
    line-height: 1;

    cursor: pointer;

    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

body:has([data-shortcuts-bar="scroll:no"]) #open-social-reels {
    bottom: 24px !important;
}

body:has([data-shortcuts-bar="scroll:no"]) pwa-share-button {
    --pwa-share-bottom: 24px;
}

body:has([data-shortcuts-bar="scroll:no"]) pwa-push-notifications-button {
    --pwa-notification-bottom: 84px;
}

.social-reels-open-button[hidden],
#open-social-reels[hidden] {
    display: none !important;
}

.social-reels-open-icon {
    line-height: 1;
}

/* Viewer */
.social-reels-viewer {
    position: fixed;
    inset: 0;
    z-index: 2147483000;

    width: 100vw;
    height: 100dvh;

    margin: 0;
    padding: 0;

    overflow: hidden;

    background: #000;
    color: #fff;

    isolation: isolate;
}

.social-reels-viewer[hidden] {
    display: none !important;
}

.social-reels-viewer:fullscreen {
    width: 100vw;
    height: 100dvh;
    background: #000;
}

.social-reels-viewer.social-reels-fixed-fallback {
    position: fixed;
    inset: 0;
}

html.social-reels-page-locked,
body.social-reels-page-locked {
    overflow: hidden !important;
    overscroll-behavior: none !important;
}

/* Track and slides */
.social-reels-track {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    margin: 0;
    padding: 0;

    overflow-x: hidden;
    overflow-y: auto;

    background: #000;

    scroll-snap-type: y mandatory;
    scroll-behavior: auto;
    overscroll-behavior-y: contain;
    overflow-anchor: none;

    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.social-reels-track::-webkit-scrollbar {
    display: none;
}

.social-reels-track.social-reels-navigating {
    scroll-snap-type: none !important;
}

.social-reel-slide {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;

    margin: 0;
    padding: 0;

    overflow: hidden;

    background: #000;

    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow-anchor: none;
}

.social-reel-fit {
    --social-reel-fit-scale: 1;

    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: min(760px, calc(100vw - 40px));
    max-width: calc(100vw - 40px);
    max-height: calc(100dvh - 28px);

    transform: scale(var(--social-reel-fit-scale));
    transform-origin: center center;

    will-change: transform;
}

/* Source-card reset */
.social-reels-viewer .social-reel-source-card {
    position: relative !important;

    box-sizing: border-box !important;

    width: 100% !important;
    max-width: 760px !important;

    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    margin: 0 !important;

    overflow: visible !important;

    opacity: 1 !important;
    visibility: visible !important;

    transform: none !important;
    translate: none !important;
    scale: 1 !important;
    rotate: none !important;

    animation: none !important;
    transition: none !important;

    scroll-snap-align: none !important;
    overflow-anchor: none !important;
}

/* Article mode */
.social-reels-viewer.social-reels-mode-article .social-reel-fit {
    width: min(760px, calc(100vw - 40px));
}

.social-reels-viewer.social-reels-mode-article .social-reel-source-card {
    padding:
        clamp(20px, 3vh, 38px) clamp(20px, 4vw, 48px) !important;

    background: var(--theme-palette-color-8) !important;
    /* color: #111 !important; */

    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/*
 * Keep the embed's generated height. Do not use height:auto on
 * Instagram iframes because that can collapse the rendered embed.
 */
.social-reels-viewer.social-reels-mode-article iframe.social-reel-iframe {
    display: block !important;

    max-width: 100% !important;
    min-width: 0 !important;

    margin-right: auto !important;
    margin-left: auto !important;

    border: 0 !important;
}

/* Iframe-only mode */
.social-reels-viewer.social-reels-mode-iframe .social-reel-fit {
    width: min(560px, calc(100vw - 24px));
}

.social-reels-viewer.social-reels-mode-iframe .social-reel-source-card {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    max-width: 560px !important;

    padding: 0 !important;

    background: transparent !important;
    color: inherit !important;

    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.social-reels-viewer.social-reels-mode-iframe .social-reel-has-iframe .social-reel-hidden-part {
    display: none !important;
}

.social-reels-viewer.social-reels-mode-iframe .social-reel-has-iframe .social-reel-path:not(iframe) {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    box-sizing: border-box !important;

    width: 100% !important;
    max-width: none !important;

    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow: visible !important;

    background: transparent !important;

    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;

    transform: none !important;
}

.social-reels-viewer.social-reels-mode-iframe iframe.social-reel-iframe {
    display: block !important;

    width: min(540px, calc(100vw - 24px)) !important;
    max-width: 540px !important;
    min-width: 0 !important;

    margin: 0 auto !important;
    padding: 0 !important;

    border: 0 !important;
    box-shadow: none !important;
}

/*
 * With requireRenderedIframe:false, cards without an iframe remain
 * visible as a full-card fallback in iframe mode.
 */
.social-reels-viewer.social-reels-mode-iframe .social-reel-no-iframe {
    display: block !important;

    padding:
        clamp(20px, 3vh, 38px) clamp(20px, 4vw, 48px) !important;

    background: #fff !important;
    color: #111 !important;
}

/* Controls */
.social-reels-controls {
    position: absolute;
    inset: 0;
    z-index: 20;

    pointer-events: none;
}

.social-reels-close,
.social-reels-nav {
    appearance: none;
    -webkit-appearance: none;

    display: grid;
    place-items: center;

    padding: 0;
    border: 0;

    background: rgba(20, 20, 20, 0.82);
    color: #fff;

    font-family: Arial, sans-serif;
    line-height: 1;

    cursor: pointer;
    pointer-events: auto;

    -webkit-tap-highlight-color: transparent;
}

.social-reels-close {
    position: absolute;

    top: max(14px, env(safe-area-inset-top));
    right: max(14px, env(safe-area-inset-right));

    width: 48px;
    height: 48px;

    border-radius: 50%;

    font-size: 34px;
}

.social-reels-nav {
    position: absolute;
    top: 50%;

    width: 52px;
    height: 68px;

    border-radius: 10px;

    font-size: 42px;

    transform: translateY(-50%);
}

.social-reels-prev {
    left: max(14px, env(safe-area-inset-left));
}

.social-reels-next {
    right: max(14px, env(safe-area-inset-right));
}

.social-reels-nav:disabled {
    visibility: hidden;
    pointer-events: none;
}

.social-reels-counter {
    position: absolute;

    top: max(20px, env(safe-area-inset-top));
    left: 50%;

    padding: 7px 12px;

    border-radius: 999px;

    background: rgba(20, 20, 20, 0.74);
    color: #fff;

    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.2;

    transform: translateX(-50%);

    pointer-events: none;
}

/* Edge swipe rails */
.social-reels-swipe-rail {
    position: absolute;

    top: 72px;
    bottom: 72px;

    width: 34px;

    pointer-events: auto;
    touch-action: none;
}

.social-reels-swipe-rail-left {
    left: 0;
}

.social-reels-swipe-rail-right {
    right: 0;
}

/* Mobile */
@media (max-width: 700px) {
    .social-reel-fit {
        width: calc(100vw - 12px);
        max-width: calc(100vw - 12px);
        max-height: calc(100dvh - 78px);
    }

    .social-reels-viewer.social-reels-mode-article .social-reel-fit {
        width: calc(100vw - 12px);
    }

    .social-reels-viewer.social-reels-mode-article .social-reel-source-card {
        padding:
            max(18px, env(safe-area-inset-top)) 16px max(72px, env(safe-area-inset-bottom)) 16px !important;
    }

    .social-reels-viewer.social-reels-mode-iframe .social-reel-fit {
        width: 100vw;
        max-width: 100vw;
    }

    .social-reels-viewer.social-reels-mode-iframe iframe.social-reel-iframe {
        width: 100vw !important;
        max-width: 540px !important;
    }

    .social-reels-nav {
        top: auto;
        bottom: max(12px, env(safe-area-inset-bottom));

        width: 52px;
        height: 52px;

        transform: none;
    }

    .social-reels-prev {
        left: calc(50% - 64px);
    }

    .social-reels-next {
        right: calc(50% - 64px);
    }
}

/* Accessibility */
.social-reels-close:focus-visible,
.social-reels-nav:focus-visible,
.social-reels-open-button:focus-visible,
#open-social-reels:focus-visible,
.social-reels-track:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .social-reels-track {
        scroll-behavior: auto !important;
    }

    .social-reel-fit {
        transition: none !important;
    }
}

/* CONTRIBUTE POPUP */
:root {
    --if-contribute-publish: #2f75ed;
    --if-contribute-automatic: #5088F0;
    --if-contribute-manual: #5088F0;
    --if-contribute-chat: #7a52d1;
    --if-contribute-discuss: #3aaa55;
    --if-contribute-forum: #5CB66E;
    --if-contribute-telegram: #5CB66E;
    --if-contribute-action-text: #ffffff;
    --if-contribute-focus: #f3a712;
}

.if-contribute-overlay,
.if-contribute-overlay * {
    box-sizing: border-box;
}

.if-contribute-overlay {
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgb(0 0 0 / 72%);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.if-contribute-dialog {
    position: relative;
    width: min(100%, 660px);
    max-height: calc(100dvh - 48px);
    overflow: auto;
    padding: 32px;
    color: var(--wp--preset--color--palette-color-3);
    background: var(--wp--preset--color--palette-color-8);
    border: 1px solid rgb(255 255 255 / 10%);
    border-radius: 14px;
    box-shadow: 0 24px 70px rgb(0 0 0 / 48%);
    overscroll-behavior: contain;
}

.if-contribute-title {
    max-width: calc(100% - 48px);
    margin: 0 0 24px;
    color: var(--wp--preset--color--palette-color-3);
    font: inherit;
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    font-weight: 700;
    line-height: 1.25;
}

.if-contribute-close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    color: var(--wp--preset--color--palette-color-3);
    background: rgb(255 255 255 / 6%);
    border: 1px solid rgb(255 255 255 / 10%);
    border-radius: 50%;
    cursor: pointer;
}

.if-contribute-close:hover {
    background: rgb(255 255 255 / 12%);
}

.if-contribute-close svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.if-contribute-actions {
    display: grid;
    gap: 14px;
}

.if-contribute-action {
    width: 100%;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    min-height: 94px;
    padding: 18px 20px;
    color: var(--if-contribute-action-text);
    font: inherit;
    text-align: left;
    border: 1px solid rgb(255 255 255 / 14%);
    border-radius: 10px;
    box-shadow: 0 8px 20px rgb(0 0 0 / 15%);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    text-decoration: none;
    transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.if-contribute-action--publish {
    background: var(--if-contribute-publish);
}

.if-contribute-action--chat {
    background: var(--if-contribute-chat);
}

.if-contribute-action--discuss {
    background: var(--if-contribute-discuss);
}

.if-contribute-action--announcements {
    background: var(--if-contribute-publish);
}

.if-contribute-action--discussion {
    background: var(--if-contribute-discuss);
}

.if-contribute-action--forum {
    background: var(--if-contribute-chat);
}

.if-contribute-action:not(.if-contribute-action--group):hover {
    color: var(--if-contribute-action-text);
    filter: brightness(1.08);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgb(0 0 0 / 22%);
}

.if-contribute-action--group {
    display: block;
    cursor: default;
}

.if-contribute-action__main {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
}

.if-contribute-subactions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.if-contribute-subaction {
    display: grid;
    gap: 4px;
    min-width: 0;
    min-height: 76px;
    padding: 13px 15px;
    color: var(--if-contribute-action-text);
    font: inherit;
    text-align: left;
    border: 1px solid rgb(255 255 255 / 18%);
    border-radius: 8px;
    box-shadow: 0 5px 14px rgb(0 0 0 / 15%);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    text-decoration: none;
    transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}



.if-contribute-subaction--automatic-publish,
.if-contribute-subaction--telegram_announcements,
.if-contribute-subaction--forum_announcements {
    background: var(--if-contribute-automatic);
}

.if-contribute-subaction--manual-publish {
    background: var(--if-contribute-manual);
}

.if-contribute-subaction--forum,
.if-contribute-subaction--telegram_group,
.if-contribute-subaction--forum_discussion {
    background: var(--if-contribute-forum);
}

.if-contribute-subaction--telegram {
    background: var(--if-contribute-telegram);
}

.if-contribute-subaction:hover {
    color: var(--if-contribute-action-text);
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgb(0 0 0 / 20%);
}

.if-contribute-subaction:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(0.25);
}

.if-contribute-subaction__label {
    color: inherit;
    font-size: 0.98rem;
    line-height: 1.25;
}

.if-contribute-subaction__description {
    color: rgb(255 255 255 / 84%);
    font-size: 0.78rem;
    line-height: 1.4;
}

.if-contribute-action__icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    background: rgb(255 255 255 / 14%);
    border-radius: 10px;
}

.if-contribute-action__icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.if-contribute-action__copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.if-contribute-action__label {
    color: inherit;
    font-size: 1.05rem;
    line-height: 1.25;
}

.if-contribute-action__description {
    color: rgb(255 255 255 / 86%);
    font-size: 0.9rem;
    line-height: 1.45;
}

.if-contribute-action__arrow {
    font-size: 1.5rem;
    line-height: 1;
}

.if-contribute-close:focus-visible,
.if-contribute-action:focus-visible,
.if-contribute-subaction:focus-visible {
    outline: 3px solid var(--if-contribute-focus);
    outline-offset: 3px;
}

@media (max-width: 600px) {
    .if-contribute-overlay {
        align-items: end;
        padding: 0;
    }

    .if-contribute-dialog {
        width: 100%;
        max-height: min(88dvh, 720px);
        padding: 26px 18px max(22px, env(safe-area-inset-bottom));
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 18px 18px 0 0;
    }

    .if-contribute-title {
        margin-bottom: 20px;
        font-size: 1.35rem;
    }

    .if-contribute-close {
        top: 14px;
        right: 14px;
    }

    .if-contribute-action {
        grid-template-columns: 42px minmax(0, 1fr) auto;
        gap: 12px;
        min-height: 88px;
        padding: 15px;
    }

    .if-contribute-action__icon {
        width: 42px;
        height: 42px;
    }

    .if-contribute-action__main {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 12px;
    }

    /* .if-contribute-subactions {
        grid-template-columns: 1fr;
    } */

    .if-contribute-subaction__description {
        display: none;
    }

    .if-contribute-subaction {
        min-height: unset !important;
    }

    .if-contribute-action__description {
        font-size: 0.82rem;
    }
}

@media (max-width: 380px) {
    .if-contribute-action__arrow {
        display: none;
    }

    .if-contribute-action {
        grid-template-columns: 40px minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {

    .if-contribute-action,
    .if-contribute-subaction {
        transition: none;
    }
}