/* ================================================================
   FB Page Feed – Frontend Stijlen
   ================================================================ */

/* Variabelen — volgt automatisch het actieve thema */
.fbf-feed {
    --fbf-cols: 3;
    --fbf-cols-tablet: 2;
    --fbf-cols-mobile: 1;
    --fbf-gap: 20px;
    --fbf-radius: 8px;
    --fbf-shadow: 0 2px 8px rgba(0,0,0,.15);
    --fbf-fb-blue: #1877f2;

    /* Thema-kleuren: erft van het actieve thema via inherit/currentColor */
    --fbf-text: inherit;
    --fbf-text-muted: currentColor;
    --fbf-border: rgba(128,128,128,.25);
    --fbf-bg: transparent;
    --fbf-bg-alt: rgba(128,128,128,.08);

    color: inherit;
    box-sizing: border-box;
}
.fbf-feed *, .fbf-feed *::before, .fbf-feed *::after { box-sizing: inherit; }

/* ----------------------------------------------------------------
   Header
   ---------------------------------------------------------------- */
.fbf-header { margin-bottom: 24px; border: 1px solid var(--fbf-border); border-radius: var(--fbf-radius); overflow: hidden; background: var(--fbf-bg); color: inherit; }
.fbf-header__cover img { width: 100%; height: 200px; object-fit: cover; display: block; }
.fbf-header__inner { display: flex; align-items: flex-start; gap: 16px; padding: 16px; }
.fbf-header__avatar { width: 72px; height: 72px; border-radius: 50%; border: 3px solid #fff; box-shadow: var(--fbf-shadow); flex-shrink: 0; }
.fbf-header__meta { flex: 1; }
.fbf-header__name { margin: 0 0 4px; font-size: 1.25rem; }
.fbf-header__name a { color: inherit; text-decoration: none; }
.fbf-header__name a:hover { color: var(--fbf-fb-blue); }
.fbf-header__bio { margin: 0 0 8px; color: currentColor; opacity: .7; font-size: .9rem; }
.fbf-header__likes { font-size: .85rem; color: currentColor; opacity: .7; }
.fbf-likebox { display: inline-block; margin-top: 10px; padding: 8px 18px; background: var(--fbf-fb-blue); color: #fff; border-radius: 6px; text-decoration: none; font-size: .9rem; font-weight: 600; transition: background .2s; }
.fbf-likebox:hover { background: #166fe5; color: #fff; }

/* ----------------------------------------------------------------
   Posts container – lay-outs
   ---------------------------------------------------------------- */

/* List */
.fbf-feed--list .fbf-posts { display: flex; flex-direction: column; gap: var(--fbf-gap); }

/* Grid */
.fbf-feed--grid .fbf-posts {
    display: grid;
    grid-template-columns: repeat(var(--fbf-cols), 1fr);
    gap: var(--fbf-gap);
}

/* Masonry (CSS-only columns) */
.fbf-feed--masonry .fbf-posts {
    columns: var(--fbf-cols);
    column-gap: var(--fbf-gap);
}
.fbf-feed--masonry .fbf-post { break-inside: avoid; margin-bottom: var(--fbf-gap); }

/* Carousel */
.fbf-feed--carousel .fbf-posts {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: var(--fbf-gap);
    padding-bottom: 12px;
    scrollbar-width: thin;
}
.fbf-feed--carousel .fbf-post {
    flex: 0 0 calc( 100% / var(--fbf-cols) - var(--fbf-gap) );
    scroll-snap-align: start;
}

/* ----------------------------------------------------------------
   Post-kaart
   ---------------------------------------------------------------- */
.fbf-post {
    background: var(--fbf-bg);
    border: 1px solid var(--fbf-border);
    border-radius: var(--fbf-radius);
    box-shadow: var(--fbf-shadow);
    overflow: hidden;
    transition: box-shadow .2s;
    color: inherit;
}
.fbf-post:hover { box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.fbf-post__body { padding: 14px 16px 12px; }
.fbf-post__meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.fbf-post__author { font-weight: 600; font-size: .9rem; }
.fbf-post__date { font-size: .8rem; color: currentColor; opacity: .65; }
.fbf-post__text { margin: 0 0 10px; font-size: .92rem; line-height: 1.55; white-space: pre-line; word-break: break-word; color: inherit; }

/* Media */
.fbf-post__media img { width: 100%; display: block; max-height: 400px; object-fit: cover; }
.fbf-post__media--album { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; }
.fbf-post__media--album img { max-height: 180px; object-fit: cover; width: 100%; }
.fbf-post__media--video { position: relative; cursor: pointer; }
.fbf-play-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); background: rgba(0,0,0,.6); color: #fff; width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; pointer-events: none; }

/* Link-preview */
.fbf-post__link { border: 1px solid var(--fbf-border); border-radius: var(--fbf-radius); padding: 10px 12px; margin: 8px 0; }
.fbf-post__link a { text-decoration: none; color: inherit; display: block; }
.fbf-post__link-title { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 2px; }
.fbf-post__link-desc { display: block; font-size: .82rem; color: var(--fbf-text-muted); }

/* Social counts */
.fbf-post__social { display: flex; gap: 14px; font-size: .83rem; color: currentColor; opacity: .7; margin: 8px 0; }

/* Facebook link */
.fbf-post__fb-link { display: inline-block; margin-top: 6px; font-size: .82rem; color: var(--fbf-fb-blue); text-decoration: none; }
.fbf-post__fb-link:hover { text-decoration: underline; }

/* Expand/collapse */
.fbf-text-full { display: none; }
.fbf-text-full.is-visible { display: inline; }
.fbf-expand, .fbf-collapse { color: var(--fbf-fb-blue); cursor: pointer; font-size: .85rem; }

/* ----------------------------------------------------------------
   Video-post
   ---------------------------------------------------------------- */
.fbf-video__player { aspect-ratio: 16/9; }
.fbf-video__player iframe, .fbf-video__player video { width: 100%; height: 100%; border: 0; }
.fbf-video__thumb img { width: 100%; display: block; }
.fbf-video__title { margin: 0 0 6px; font-size: 1rem; }

/* ----------------------------------------------------------------
   Album-post
   ---------------------------------------------------------------- */
.fbf-album__cover { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; }
.fbf-album__cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.fbf-album-trigger:hover .fbf-album__cover img { transform: scale(1.04); }
.fbf-album__info { padding: 10px 12px 12px; text-align: center; }
.fbf-album__title { margin: 0 0 4px; font-size: 1rem; font-weight: 600; line-height: 1.3; }
.fbf-album__count { display: block; font-size: .82rem; color: var(--fbf-text-muted); margin-top: 2px; }

/* ----------------------------------------------------------------
   Event-post
   ---------------------------------------------------------------- */
.fbf-event__cover img { width: 100%; max-height: 200px; object-fit: cover; display: block; }
.fbf-event__title { margin: 0 0 6px; font-size: 1rem; }
.fbf-event__date { font-size: .85rem; color: var(--fbf-fb-blue); margin-bottom: 4px; }
.fbf-event__location { font-size: .85rem; color: var(--fbf-text-muted); }

/* ----------------------------------------------------------------
   Review-post
   ---------------------------------------------------------------- */
.fbf-review__stars { font-size: 1.3rem; color: #f0a500; margin-bottom: 8px; }
.fbf-review__reviewer { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.fbf-review__avatar { width: 36px; height: 36px; border-radius: 50%; }
.fbf-review__name { font-weight: 600; font-size: .9rem; }

/* ----------------------------------------------------------------
   Load More
   ---------------------------------------------------------------- */
.fbf-load-more { text-align: center; margin-top: 24px; }
.fbf-load-more__btn {
    padding: 10px 28px;
    background: var(--fbf-fb-blue);
    color: #fff;
    border: 0;
    border-radius: 6px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, opacity .2s;
}
.fbf-load-more__btn:hover { background: #166fe5; }
.fbf-load-more__btn:disabled { opacity: .6; cursor: default; }

/* ----------------------------------------------------------------
   Diversen
   ---------------------------------------------------------------- */
.fbf-no-posts { color: currentColor; opacity: .65; padding: 24px; text-align: center; }
.fbf-credit { text-align: center; font-size: .75rem; color: currentColor; opacity: .5; margin-top: 12px; }
.fbf-credit a { color: inherit; }
.fbf-gdpr-placeholder { border: 1px solid var(--fbf-border); border-radius: var(--fbf-radius); padding: 24px; text-align: center; color: inherit; opacity: .7; }
.fbf-admin-notice { padding: 12px; background: #fff3cd; border-left: 4px solid #ffc107; margin: 8px 0; font-size: .9rem; }

/* ----------------------------------------------------------------
   Responsive
   ---------------------------------------------------------------- */
@media ( max-width: 900px ) {
    .fbf-feed--grid .fbf-posts { grid-template-columns: repeat(var(--fbf-cols-tablet), 1fr); }
    .fbf-feed--masonry .fbf-posts { columns: var(--fbf-cols-tablet); }
    .fbf-feed--carousel .fbf-post { flex: 0 0 calc( 100% / var(--fbf-cols-tablet) - var(--fbf-gap) ); }
}
@media ( max-width: 600px ) {
    .fbf-feed--grid .fbf-posts { grid-template-columns: repeat(var(--fbf-cols-mobile), 1fr); }
    .fbf-feed--masonry .fbf-posts { columns: var(--fbf-cols-mobile); }
    .fbf-feed--carousel .fbf-post { flex: 0 0 calc( 100% / var(--fbf-cols-mobile) - var(--fbf-gap) ); }
    .fbf-header__inner { flex-direction: column; }
    .fbf-header__cover img { height: 130px; }
}

/* ----------------------------------------------------------------
   Album trigger + overlay
   ---------------------------------------------------------------- */
.fbf-album-trigger { cursor: pointer; transition: transform .15s; }
.fbf-album-trigger:hover { transform: translateY(-2px); }
.fbf-album-trigger:focus { outline: 2px solid currentColor; outline-offset: 2px; }

.fbf-album__cover { position: relative; overflow: hidden; }
.fbf-album__overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.35);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .2s;
    font-size: 2rem;
}
.fbf-album-trigger:hover .fbf-album__overlay { opacity: 1; }

/* ----------------------------------------------------------------
   Album modal
   ---------------------------------------------------------------- */
#fbf-album-modal {
    background: rgba(0,0,0,.95);
}
#fbf-album-modal-header {
    background: rgba(255,255,255,.05);
    border-bottom: 1px solid rgba(255,255,255,.1);
}

/* ----------------------------------------------------------------
   Album foto viewer (pijltjes navigatie)
   ---------------------------------------------------------------- */
#fbf-album-photo-viewer {
    display: none;
}
