/* ZP_FB_FRONTEND_FEED_RESPONSIVE_V1
   ZP_FB_FRONTEND_CSS_CONSOLIDATION_4ZL

   Social Studio settings remain authoritative.
   Frontend-only proportional rendering.
   External Martfury footer grid is untouched.
*/

/* =====================================================
   1. SHARED COMPONENT GEOMETRY
   ===================================================== */

[data-zp-fb-widget] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    container-type: inline-size;
    overflow-wrap: anywhere;
}

[data-zp-fb-widget],
[data-zp-fb-widget] *,
[data-zp-fb-widget] *::before,
[data-zp-fb-widget] *::after {
    box-sizing: border-box;
    border-radius: 0 !important;
}

[data-zp-fb-widget] > section {
    min-width: 0;
    max-width: 100%;
}

[data-zp-fb-widget] .zp-fb-widget__header,
[data-zp-fb-widget] .zp-fb-widget__info,
[data-zp-fb-widget] .zp-fb-widget__feed {
    min-width: 0;
    max-width: 100%;
}

[data-zp-fb-widget] .zp-fb-widget__feed {
    container-type: inline-size;
    padding: clamp(8px, 1.5cqi, 18px);
    overflow: hidden;
}

/* =====================================================
   2. ORIGINAL HEADER PROPORTIONS
   ===================================================== */

[data-zp-fb-widget] .zp-fb-widget__cover {
    width: 100%;
    height: clamp(92px, 15cqi, 180px);
    overflow: hidden;
}

[data-zp-fb-widget] .zp-fb-widget__cover > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

[data-zp-fb-widget] .zp-fb-widget__identity {
    min-width: 0;
    gap: clamp(7px, 1.2cqi, 14px);
    padding: clamp(8px, 1.4cqi, 16px);
}

[data-zp-fb-widget] .zp-fb-widget__identity > div {
    min-width: 0;
}

[data-zp-fb-widget] .zp-fb-widget__identity strong {
    font-size: clamp(12px, 1.35cqi, 18px);
    line-height: 1.35;
    overflow-wrap: anywhere;
}

[data-zp-fb-widget] .zp-fb-widget__identity p {
    font-size: clamp(11px, 1.1cqi, 14px);
    line-height: 1.5;
}

/* =====================================================
   3. INFORMATION BLOCK
   ===================================================== */

[data-zp-fb-widget] .zp-fb-widget__info {
    padding: clamp(8px, 1.4cqi, 18px);
    overflow: hidden;
}

[data-zp-fb-widget] .zp-fb-widget__brand {
    min-width: 0;
    max-width: 100%;
}

[data-zp-fb-widget] .zp-fb-widget__brand img {
    display: block;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain;
}

[data-zp-fb-widget] .zp-fb-widget__info p,
[data-zp-fb-widget] .zp-fb-widget__contact,
[data-zp-fb-widget] .zp-fb-widget__social {
    min-width: 0;
    max-width: 100%;
    font-size: clamp(11px, 1.05cqi, 14px);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

[data-zp-fb-widget] .zp-fb-widget__social {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(4px, .6cqi, 9px);
}

[data-zp-fb-widget] .zp-fb-widget__social a,
[data-zp-fb-widget] .zp-fb-widget__actions a {
    max-width: 100%;
    padding: 5px 7px;
    font-size: inherit;
    overflow-wrap: anywhere;
}

/* =====================================================
   4. FEED CARD SYSTEM
   ===================================================== */

[data-zp-fb-widget] .zp-fb-widget__feed-top {
    min-width: 0;
    gap: 8px;
    align-items: center;
}

[data-zp-fb-widget] .zp-fb-widget__feed-top strong {
    min-width: 0;
    font-size: clamp(12px, 1.2cqi, 17px);
    line-height: 1.4;
}

[data-zp-fb-widget] .zp-fb-widget__posts {
    display: grid;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: clamp(7px, 1cqi, 14px);
    margin-top: 12px;
}

[data-zp-fb-widget] .zp-fb-widget__posts > [data-zp-post] {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
    padding: clamp(8px, 1cqi, 15px);
    overflow: hidden;
    overflow-wrap: anywhere;
}

[data-zp-fb-widget]
.zp-fb-widget__posts > [data-zp-post]:first-child {
    grid-column: auto;
}

[data-zp-fb-widget] [data-zp-post][hidden] {
    display: none !important;
}

/* A lone visible card must span the complete feed grid.
   This is based on visible posts, not their original index. */

[data-zp-fb-widget]
.zp-fb-widget__posts:not(
    :has(
        > [data-zp-post]:not([hidden])
        ~ [data-zp-post]:not([hidden])
    )
)
> [data-zp-post]:not([hidden]) {
    grid-column: 1 / -1 !important;
}

[data-zp-fb-widget] [data-zp-post] time {
    display: block;
    font-size: clamp(11px, .95cqi, 13px);
    line-height: 1.4;
}

[data-zp-fb-widget] [data-zp-post] p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 8;
    line-clamp: 8;
    max-width: 100%;
    min-width: 0;
    margin: 10px 0;
    overflow: hidden;
    overflow-wrap: anywhere;
    white-space: pre-line;
    font-size: clamp(11px, 1.1cqi, 14px);
    line-height: 1.55;
}

[data-zp-fb-widget] [data-zp-post] img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: clamp(170px, 24cqi, 380px);
    object-fit: contain;
    margin: 10px 0;
}

[data-zp-fb-widget] [data-zp-post] a {
    display: inline-block;
    max-width: 100%;
    font-size: clamp(11px, 1cqi, 13px);
    line-height: 1.45;
    overflow-wrap: anywhere;
}

[data-zp-fb-widget] .zp-fb-widget__pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

[data-zp-fb-widget] .zp-fb-widget__pagination button {
    min-width: 30px;
    min-height: 30px;
}

/* =====================================================
   5. HONOR SAVED LIST LAYOUT
   ===================================================== */

[data-zp-fb-widget].zp-fb-widget--list
.zp-fb-widget__posts {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

[data-zp-fb-widget].zp-fb-widget--list
.zp-fb-widget__posts > [data-zp-post] {
    grid-column: 1 / -1;
}

/* =====================================================
   6. FOOTER INSIDE MARTFURY EQUAL GRID
   Preserve three external footer columns and
   the user-configured info/feed percentage.
   ===================================================== */

#footer-links.zp-footer-links--equal-grid
.widget_facebook.zp-facebook-widget-host {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

#footer-links
.widget_facebook
[data-zp-fb-widget][data-zp-variant="footer"] {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    grid-template-columns:
        minmax(0, var(--zp-info-width, 30%))
        minmax(0, 1fr);
    column-gap: clamp(4px, .65cqi, 12px);
    row-gap: clamp(6px, .8cqi, 12px);
}

/* The saved columns mode retains its DOM placement.
   Do not force a new presentation mode. */

#footer-links
[data-zp-variant="footer"] .zp-fb-widget__info,
#footer-links
[data-zp-variant="footer"] .zp-fb-widget__feed {
    padding: clamp(4px, .7cqi, 12px);
}

/* Footer grid cards keep their saved two-column
   presentation, scaled to the actual feed width. */

#footer-links
[data-zp-variant="footer"]:not(.zp-fb-widget--list)
.zp-fb-widget__posts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(3px, .55cqi, 10px);
}

#footer-links
[data-zp-variant="footer"] [data-zp-post] {
    padding: clamp(3px, .55cqi, 10px);
}

#footer-links
[data-zp-variant="footer"] [data-zp-post] p {
    font-size: clamp(10px, 1.1cqi, 13px);
    line-height: 1.45;
    -webkit-line-clamp: 7;
    line-clamp: 7;
}

#footer-links
[data-zp-variant="footer"] [data-zp-post] img {
    max-height: clamp(110px, 19cqi, 260px);
}

/* =====================================================
   7. SECTION AND ASIDE RETAIN THEIR OWN SETTINGS
   ===================================================== */

[data-zp-variant="section"] .zp-fb-widget__posts {
    align-items: start;
}

[data-zp-variant="aside"] .zp-fb-widget__posts {
    align-items: start;
}

[data-zp-variant="aside"] [data-zp-post] img {
    object-fit: contain;
}

/* =====================================================
   8. PROTECT CONSENT AND ACCESSIBILITY
   ===================================================== */

[data-zp-fb-widget] .zp-fb-consent-action,
[data-zp-fb-widget] .zp-fb-consent-action__button {
    border-radius: 0 !important;
}

[data-zp-fb-widget] a:focus-visible,
[data-zp-fb-widget] button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    [data-zp-fb-widget] [data-zp-post] {
        animation: none !important;
        transition: none !important;
    }
}


/* ZP_FB_FRONTEND_SAVED_WIDTH_SYNC_4ZO
   The two persisted Social Studio width settings are
   authoritative for the frontend grid track proportions.
   This corrects the former 30% + 70% + gap overflow.
   Does not change the outside Martfury footer grid.
*/

[data-zp-fb-widget]:is(
    .zp-fb-widget--grid,
    .zp-fb-widget--columns
):not(.zp-fb-widget--no-info):not(.zp-fb-widget--no-feed) {
    grid-template-columns:
        minmax(0, var(--zp-info-fr, 30fr))
        minmax(0, var(--zp-feed-fr, 70fr)) !important;
}

#footer-links
.widget_facebook.zp-facebook-widget-host
[data-zp-fb-widget][data-zp-variant="footer"]:is(
    .zp-fb-widget--grid,
    .zp-fb-widget--columns
):not(.zp-fb-widget--no-info):not(.zp-fb-widget--no-feed) {
    grid-template-columns:
        minmax(0, var(--zp-info-fr, 30fr))
        minmax(0, var(--zp-feed-fr, 70fr)) !important;
}

/* Do not alter the selected list layout. */
[data-zp-fb-widget].zp-fb-widget--list {
    grid-template-columns: none;
}


/* ============================================================
   ZP_FB_FOOTER_20_20_60_V1

   Martfury Footer:
     Payment  20%
     Contact  20%
     Facebook 60%

   Only the three existing footer widgets are affected.
   Social Studio internal proportions remain unchanged.
   ============================================================ */

/* Desktop: allocate the real available width. */
@media screen and (min-width: 992px) {

    #footer-links.zp-footer-links--equal-grid {
        display: grid !important;

        grid-template-columns:
            minmax(0, 2fr)
            minmax(0, 2fr)
            minmax(0, 6fr) !important;

        align-items: start;
        column-gap: clamp(12px, 1.4vw, 24px);
        row-gap: 20px;

        width: 100%;
        min-width: 0;
    }

    #footer-links.zp-footer-links--equal-grid
    > .widget_payment-methods {
        grid-column: 1;
        min-width: 0;
        max-width: 100%;
    }

    #footer-links.zp-footer-links--equal-grid
    > .widget_contact-us.widget_footer_contact {
        grid-column: 2;
        min-width: 0;
        max-width: 100%;
    }

    #footer-links.zp-footer-links--equal-grid
    > .widget_facebook.zp-facebook-widget-host {
        grid-column: 3;
        min-width: 0;
        max-width: 100%;
    }
}

/* Payment methods: prevent oversized assets from
   overflowing their 20% footer column. */

#footer-links.zp-footer-links--equal-grid
> .widget_payment-methods {
    overflow-wrap: anywhere;
}

#footer-links.zp-footer-links--equal-grid
> .widget_payment-methods
.zp-barion-payment-banner {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

#footer-links.zp-footer-links--equal-grid
> .widget_payment-methods
.zp-barion-payment-banner img {
    display: block;
    width: 60%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

#footer-links.zp-footer-links--equal-grid
> .widget_payment-methods
.zp-barion-payment-banner__note {
    max-width: 100%;
    font-size: clamp(11px, .85vw, 13px);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

/* Contact: retain existing visual hierarchy while
   making its content fit the narrower column. */

#footer-links.zp-footer-links--equal-grid
> .widget_contact-us.widget_footer_contact
.widget_content {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

#footer-links.zp-footer-links--equal-grid
> .widget_contact-us.widget_footer_contact
.widget_content h3 {
    max-width: 100%;
    font-size: clamp(15px, 1.25vw, 21px);
    line-height: 1.35;
    overflow-wrap: anywhere;
}

#footer-links.zp-footer-links--equal-grid
> .widget_contact-us.widget_footer_contact
.widget_content p {
    max-width: 100%;
    font-size: clamp(11px, .85vw, 13px);
    line-height: 1.6;
    overflow-wrap: anywhere;
}

#footer-links.zp-footer-links--equal-grid
> .widget_contact-us.widget_footer_contact
.ps-list--social {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    max-width: 100%;
}

/* Facebook: use the 60% footer column without
   overriding the Social Studio settings. */

#footer-links.zp-footer-links--equal-grid
> .widget_facebook.zp-facebook-widget-host
[data-zp-fb-widget][data-zp-variant="footer"] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

/* The existing theme determines the mobile layout.
   Prevent the desktop three-column rule from
   forcing narrow columns on smaller screens. */

@media screen and (max-width: 991.98px) {

    #footer-links.zp-footer-links--equal-grid
    > .widget_payment-methods,
    #footer-links.zp-footer-links--equal-grid
    > .widget_contact-us.widget_footer_contact,
    #footer-links.zp-footer-links--equal-grid
    > .widget_facebook.zp-facebook-widget-host {
        min-width: 0;
        max-width: 100%;
    }
}


/* =========================================================
   ZP_FB_FRONTEND_PAGINATION_SYNC_4ZR
   Frontend pagination, card layout and navigation parity.
   Existing admin configuration remains authoritative.
   ========================================================= */

/* Prevent hidden cards from taking up grid space. */
[data-zp-fb-widget]
[data-zp-post][hidden] {
    display: none !important;
}

/* The number of visible cards, not the source index,
   determines their layout on every pagination page. */

[data-zp-fb-widget]
[data-zp-posts][data-zp-visible-count="1"] {
    grid-template-columns: minmax(0, 1fr) !important;
}

[data-zp-fb-widget]
[data-zp-posts][data-zp-visible-count="1"]
> [data-zp-post]:not([hidden]) {
    grid-column: 1 / -1 !important;
    width: 100%;
}

/* In list mode keep the administrator's selection. */
[data-zp-fb-widget].zp-fb-widget--list
[data-zp-posts] {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
}

[data-zp-fb-widget].zp-fb-widget--list
[data-zp-post]:not([hidden]) {
    grid-column: 1 / -1 !important;
}

/* Consistent card geometry before and after pagination. */
[data-zp-fb-widget]
[data-zp-post] {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    align-self: start;
    border-radius: 0 !important;
}

[data-zp-fb-widget]
[data-zp-post] img {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Section can use available feed width.
   Footer keeps its saved two-card grid when configured.
   Aside retains its own component layout. */
[data-zp-variant="section"]
[data-zp-posts],
[data-zp-variant="footer"]
[data-zp-posts],
[data-zp-variant="aside"]
[data-zp-posts] {
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

/* Navigation: shared visual language, separate state. */
[data-zp-fb-widget]
[data-zp-pages] {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    min-width: 0;
    padding: 12px 0 0;
    margin: 14px 0 0;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 !important;
}

[data-zp-fb-widget]
[data-zp-pages][hidden] {
    display: none !important;
}

[data-zp-fb-widget]
[data-zp-pages] button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 32px;
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid #d8e3ee;
    border-radius: 0 !important;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: background-color .18s ease,
                border-color .18s ease;
}

[data-zp-fb-widget]
[data-zp-pages] button:hover {
    background: rgb(100 130 160 / 8%);
    border-color: #9eb4c9;
}

[data-zp-fb-widget]
[data-zp-pages] button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

[data-zp-fb-widget]
[data-zp-pages] [data-zp-page-status] {
    display: inline-block;
    min-width: 38px;
    font-size: 12px;
    line-height: 1.5;
    font-weight: 600;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* Avoid forcing a white pagination background in Dark mode. */
[data-zp-fb-widget]
[data-zp-pages],
[data-zp-fb-widget]
[data-zp-pages] button {
    color: inherit;
}

/* No animation for visitors requesting reduced motion. */
@media (prefers-reduced-motion: reduce) {
    [data-zp-fb-widget]
    [data-zp-post] {
        transition: none !important;
        animation: none !important;
    }

    [data-zp-fb-widget]
    [data-zp-pages] button {
        transition: none !important;
    }
}


/* ===========================================================
   ZP_FB_STUDIO_FRONTEND_SYNC_4ZS

   Real frontend cards follow the Social Studio presentation:
   - grid: two equal cards when configured
   - profile/identity header
   - contained post media
   - consistent card footer
   - dot navigation
   - independent component settings
   =========================================================== */

[data-zp-fb-widget] [data-zp-posts] {
    align-items: stretch;
    min-width: 0;
}

[data-zp-fb-widget]
[data-zp-posts] > .zp-fb-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dce5ee;
    color: #24364c;
    box-shadow: 0 2px 7px rgb(25 47 71 / 5%);
    border-radius: 0 !important;
}

[data-zp-fb-widget]
[data-zp-posts] > .zp-fb-card time {
    display: block;
    padding: 12px 12px 9px;
    border-bottom: 1px solid #e9eef4;
    color: #72859b;
    font-size: 12px;
    line-height: 1.4;
}

[data-zp-fb-widget]
[data-zp-posts] > .zp-fb-card p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 9;
    line-clamp: 9;
    flex: 1 0 auto;
    min-width: 0;
    margin: 0;
    padding: 14px 12px;
    overflow: hidden;
    overflow-wrap: anywhere;
    white-space: pre-line;
    font-size: clamp(12px, 1.15cqi, 14px);
    line-height: 1.6;
}

[data-zp-fb-widget]
[data-zp-posts] > .zp-fb-card img {
    display: block;
    width: calc(100% - 24px);
    max-width: calc(100% - 24px);
    height: auto;
    max-height: 230px;
    min-height: 0;
    margin: 0 12px 12px;
    object-fit: contain;
    background: #e9eef4;
}

[data-zp-fb-widget]
[data-zp-posts] > .zp-fb-card > a {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-top: auto;
    padding: 12px;
    border-top: 1px solid #e6edf4;
    text-align: center;
    color: #2775bd;
    font-size: 12px;
    line-height: 1.5;
}

/* Preserve the chosen list mode. */
[data-zp-fb-widget].zp-fb-widget--list
[data-zp-posts] {
    grid-template-columns: minmax(0, 1fr) !important;
}

/* Grid cards: 2 columns when the saved pagination
   displays two cards, regardless of the source index. */
[data-zp-fb-widget]:not(.zp-fb-widget--list)
[data-zp-posts][data-zp-visible-count="2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

[data-zp-fb-widget]
[data-zp-posts][data-zp-visible-count="1"] {
    grid-template-columns: minmax(0, 1fr) !important;
}

/* Footer inherits the external 20/20/60 arrangement.
   The feed stays inside the saved 30/70 inner tracks. */
#footer-links.zp-footer-links--equal-grid
> .widget_facebook.zp-facebook-widget-host
[data-zp-variant="footer"]
[data-zp-posts][data-zp-visible-count="2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

/* Three external footer columns: explicitly clear
   inherited Martfury equal-column width constraints. */
@media (min-width: 992px) {
    #footer-links.zp-footer-links--equal-grid:has(> .widget_facebook.zp-facebook-widget-host) {
        grid-template-columns:
            minmax(0, 2fr)
            minmax(0, 2fr)
            minmax(0, 6fr) !important;
    }

    #footer-links.zp-footer-links--equal-grid
    > .widget_footer {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        flex: none !important;
    }
}

/* The Studio dot-navigation selection. */
[data-zp-fb-widget]
[data-zp-pages][data-zp-navigation="dots"] {
    justify-content: center;
    position: relative;
}

[data-zp-fb-widget]
[data-zp-pages][data-zp-navigation="dots"]
> [data-zp-prev],
[data-zp-fb-widget]
[data-zp-pages][data-zp-navigation="dots"]
> [data-zp-next] {
    display: none !important;
}

[data-zp-fb-widget]
[data-zp-pages] .zp-fb-pagination-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

[data-zp-fb-widget]
[data-zp-pages] .zp-fb-pagination-dot {
    display: block;
    flex: 0 0 auto;
    min-width: 0;
    min-height: 0;
    width: 9px;
    height: 9px;
    padding: 0;
    border: 1px solid #b9c8d7;
    background: #c7d3df;
    border-radius: 0 !important;
}

[data-zp-fb-widget]
[data-zp-pages] .zp-fb-pagination-dot.is-active {
    border-color: #f2ac21;
    background: #f2ac21;
}

[data-zp-fb-widget]
[data-zp-pages][data-zp-navigation="dots"]
[data-zp-page-status] {
    position: absolute;
    right: 0;
    font-size: 11px;
    font-weight: 400;
    color: #71849b;
}

/* The preview's square-corner design. */
[data-zp-fb-widget],
[data-zp-fb-widget] * {
    border-radius: 0 !important;
}


/* ZP_FACEBOOK_NATIVE_POST_4ZBH START */
.zp-fb-card--native {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
    border: 1px solid #e4e6eb !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    color: #1c1e21 !important;
}

.zp-fb-card--native:hover {
    box-shadow: none !important;
}

.zp-fb-card--native .zp-fb-card__header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    height: auto !important;
    min-height: 60px !important;
    padding: 10px 12px !important;
    margin: 0 !important;
    border-bottom: 0 !important;
    box-sizing: border-box !important;
}

.zp-fb-card--native .zp-fb-card__avatar {
    display: grid !important;
    place-items: center !important;
    flex: 0 0 40px !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    border: 1px solid #e4e6eb !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    background: #f0f2f5 !important;
    color: #203b5b !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
}

.zp-fb-card--native .zp-fb-card__identity {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    min-width: 0 !important;
    gap: 3px !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
}

.zp-fb-card--native .zp-fb-card__identity strong {
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    color: #1c1e21 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    margin: 0 !important;
}

.zp-fb-card--native .zp-fb-card__date {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #65676b !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
}

.zp-fb-card--native .zp-fb-card__dots {
    display: block !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
    color: #65676b !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    line-height: 1 !important;
}

.zp-fb-card--native .zp-fb-card__content {
    display: block !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    padding: 5px 12px 12px !important;
    margin: 0 !important;
    border: 0 !important;
    color: #1c1e21 !important;
    background: transparent !important;
    box-sizing: border-box !important;
    overflow-wrap: anywhere !important;
}

.zp-fb-card--native .zp-fb-card__content p {
    margin: 0 !important;
    padding: 0 !important;
    color: #1c1e21 !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    white-space: pre-line !important;
    overflow-wrap: anywhere !important;
}

.zp-fb-card--native .zp-fb-card__media {
    display: block !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
}

.zp-fb-card--native .zp-fb-card__media img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    object-fit: contain !important;
}

.zp-fb-card--native .zp-fb-card__actions {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-around !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
    min-height: 42px !important;
    padding: 8px 12px !important;
    margin: 0 !important;
    border-top: 1px solid #e4e6eb !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #65676b !important;
    font-size: 12px !important;
    box-sizing: border-box !important;
}

.zp-fb-card--native .zp-fb-card__actions a,
.zp-fb-card--native .zp-fb-card__actions span {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 4px 2px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #65676b !important;
    text-decoration: none !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
}

.zp-fb-card--native .zp-fb-card__actions a:hover {
    color: #1877f2 !important;
    text-decoration: underline !important;
}

.zp-options .zp-options__stage[data-skin="dark"]
.zp-fb-card--native {
    background: #29394d !important;
    border-color: #465a73 !important;
    color: #f0f5fc !important;
}

.zp-options .zp-options__stage[data-skin="dark"]
.zp-fb-card--native .zp-fb-card__header,
.zp-options .zp-options__stage[data-skin="dark"]
.zp-fb-card--native .zp-fb-card__content,
.zp-options .zp-options__stage[data-skin="dark"]
.zp-fb-card--native .zp-fb-card__media,
.zp-options .zp-options__stage[data-skin="dark"]
.zp-fb-card--native .zp-fb-card__actions {
    background: #29394d !important;
}

.zp-options .zp-options__stage[data-skin="dark"]
.zp-fb-card--native .zp-fb-card__identity strong,
.zp-options .zp-options__stage[data-skin="dark"]
.zp-fb-card--native .zp-fb-card__content p {
    color: #f0f5fc !important;
}

@container (max-width: 350px) {
    .zp-fb-card--native .zp-fb-card__header {
        gap: 8px !important;
        padding: 9px 10px !important;
    }

    .zp-fb-card--native .zp-fb-card__identity strong {
        font-size: 12px !important;
    }

    .zp-fb-card--native .zp-fb-card__content {
        padding: 4px 10px 10px !important;
    }
}
/* ZP_FACEBOOK_NATIVE_POST_4ZBH END */

/* ZP_FB_FRONTEND_SECTION_GEOMETRY_4ZBN START */

/* The frontend post must not inherit full-height stretching. */
[data-zp-fb-widget] .zp-fb-widget__posts {
    align-items: start !important;
    grid-auto-rows: auto !important;
    min-height: 0 !important;
    height: auto !important;
}

[data-zp-fb-widget] .zp-fb-widget__posts
> .zp-fb-card--native {
    display: flex !important;
    flex-direction: column !important;
    align-self: start !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
}

/* Section / Aside / Footer use the same card geometry. */
[data-zp-fb-widget] .zp-fb-card--native
.zp-fb-card__header {
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    min-height: 60px !important;
    height: auto !important;
    padding: 10px 12px !important;
    box-sizing: border-box !important;
}

[data-zp-fb-widget] .zp-fb-card--native
.zp-fb-card__avatar {
    flex: 0 0 40px !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
}

[data-zp-fb-widget] .zp-fb-card--native
.zp-fb-card__content {
    flex: 0 0 auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 8px 12px 12px !important;
    box-sizing: border-box !important;
}

[data-zp-fb-widget] .zp-fb-card--native
.zp-fb-card__content p {
    margin: 0 !important;
    height: auto !important;
    max-height: none !important;
    white-space: pre-line !important;
    overflow-wrap: anywhere !important;
}

/* Equal responsive media frame, no stretched or distorted image. */
[data-zp-fb-widget] .zp-fb-card--native
.zp-fb-card__media {
    display: block !important;
    flex: 0 0 auto !important;
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 16 / 9 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    border-radius: 0 !important;
    background: #f0f2f5 !important;
}

[data-zp-fb-widget] .zp-fb-card--native
.zp-fb-card__media > img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    max-width: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    border-radius: 0 !important;
}

/* Direct post-image rules must not override nested media. */
[data-zp-fb-widget] .zp-fb-widget__posts
> .zp-fb-card--native > .zp-fb-card__media > img {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: cover !important;
}

[data-zp-fb-widget] .zp-fb-card--native
.zp-fb-card__actions {
    display: flex !important;
    align-items: center !important;
    justify-content: space-around !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    min-height: 42px !important;
    height: auto !important;
    margin-top: auto !important;
    padding: 8px 10px !important;
    box-sizing: border-box !important;
    border-radius: 0 !important;
}

/* The Section must never inherit full-screen post dimensions. */
[data-zp-variant="section"] .zp-fb-widget__posts,
.zp-fb-widget--section .zp-fb-widget__posts,
.zp-fb-parity-host--section .zp-fb-widget__posts {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    align-items: start !important;
    grid-auto-rows: auto !important;
}

[data-zp-variant="section"] .zp-fb-card--native,
.zp-fb-widget--section .zp-fb-card--native,
.zp-fb-parity-host--section .zp-fb-card--native {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

/* Keep pagination independent of the tallest post. */
[data-zp-fb-widget] .zp-fb-widget__pagination,
[data-zp-fb-widget] [data-zp-pages] {
    height: auto !important;
    min-height: 0 !important;
}

/* ZP_FB_FRONTEND_SECTION_GEOMETRY_4ZBN END */
