/******* Do not edit this file *******
Simple Custom CSS and JS - by Silkypress.com
Saved: Nov 13 2026 | 22:39:50 */
/* ==========================================================
   FIN — FEED | FEATURE INDEX
   ==========================================================

   HOME FEED / POST COMPOSER
   - Posting bar and post-creation trigger
   - Desktop post-creation modal sizing and rounded corners
   - Native posting-space selection retained
   - Single posting space: hide dropdown, show destination note

   FAMILY FEED / LAYOUT
   - Main feed grid, content width and native posts column
   - Right rail and no-rail fallback
   - Family Feed banner and mobile image corners
   - Tablet stacking and mobile gutters

   FEED WIDGETS / EVENT PREVIEWS
   - Widget containers, headings and content spacing
   - Upcoming-event placeholder and event summary
   - Event date badge, title and time
   - Upcoming-event links, live status and Join button

   GIPHY / MOBILE GIF PICKER
   - Mobile GIF modal viewport containment
   - Search input sizing, focus outline and iOS zoom prevention
   - Three-column GIF results and thumbnail sizing

   DEPENDENCY
   - Single-posting-space styles rely on separate logic adding
     .fin-one-posting-space to the modal and rendering the
     .fin-posting-destination-note element.

   SHARED FEED GUTTERS
   - Native discussion-space mobile gutters
   - Family Feed, Featured FIN, FIT Training and future spaces
   - Home Feed custom layout mobile gutters
   - Shared 12px value defined in FIN — Global

   POST EXPANSION / SEE MORE — SEE LESS
   - Eight rendered text lines across desktop, tablet and mobile
   - Short posts display fully without expansion controls
   - Longer posts expand and collapse inline
   - Post titles, author details and actions remain unaffected
   - Images and GIFs preserve their original content order
   - Media beyond the eight-line cutoff appears upon expansion
   - Native SureDash Full Preview required
   - .fin-post-text-segment and .fin-post-expand-toggle styling
   - Companion Code Snippet: FIN — Feed Post Expansion (8 Lines)
   - Supports infinite scrolling and dynamically loaded posts
   - STATUS: Implemented / tested

   SINGLE DISCUSSION POST / COVER ALIGNMENT
   - Covered individual discussion posts: cover flush to rounded top edge
   - No-cover posts, feed cards, Featured FIN grid and Events untouched
   - Companion PHP: Single Discussion Post Image-First v0.2.0
   - STATUS: Proposed / requires browser verification

	MOBILE FEED COVER — TOP CORNERS ONLY
   - Round only top-left and top-right cover-image corners
   - Bottom corners remain square
   - Preserve existing mobile image inset and gutters
   - No changes to image dimensions, crop or positioning
   - Scope: FIN image-first feed cards, mobile only
   - Desktop and single-post presentation unchanged

   SORTING CONTROLS
   - Tighten spacing between sorting controls and posting box
   - Reduce excess space above controls on desktop and tablet
   - Preserve aggregate Home Feed spacing
   - Keep native Sort / List / Grid functionality

   DISCUSSION POST CARD SPACING
   - Reduce spacing between cover images and post titles
   - Tighten spacing between titles and author information
   - Apply to Home Feed, Family Feed and FIT Training
   - Include Event announcements displayed in discussion feeds
   - Preserve individual full-post and original Event layouts
   - Preserve Featured FIN editorial grid
   - Leave posts without cover images unaffected by cover rules

   MOBILE FEED SPACING
   - Reduce space between Home Feed banner and sorting controls
   - Keep horizontal divider beside sorting controls
   - Increase spacing between discussion cards on mobile
   - Apply to Home Feed, Family Feed and FIT Training
   - Preserve desktop, individual posts and Featured FIN grid

   MOBILE DISCUSSION CARD SEPARATION
   - Add 16px spacing between consecutive discussion cards
   - Apply to Home Feed, Family Feed and FIT Training
   - Include Event announcements appearing in discussion feeds
   - Preserve Featured FIN grid and individual post pages

   HOME FEED / MOBILE SORTING GAP
   - Tighten spacing between First In Family banner and sorting controls
   - Preserve horizontal divider and Sort / List / Grid buttons
   - Leave posting box and discussion card spacing unchanged
   - Mobile Home Feed only

   MOBILE AUTHOR INFORMATION & BADGES
   - Display emoji badges beside the member's name
   - Allow longer member names and badges to wrap
   - Show the complete profile tagline on its own line
   - Display timestamp and originating feed beneath tagline
   - Preserve bookmark and post-action buttons
   - Protect full-post pages and original Event layouts

   FEED AUTHOR EMOJI BADGES — RESTORED
   - Use FIN's existing custom PHP emoji badge output
   - Display all assigned emojis, without native text pills or +N
   - Retain PHP-provided title and aria-label descriptions
   - Only hide native badges when custom badges exist
   - Leave individual profiles and Member Directory unchanged

   SINGLE DISCUSSION POST / AUTHOR EMOJI BADGE PARITY
   - Version: v0.1.0
   - Display all assigned FIN emojis beside author name
   - Remove native text pills and +1/+2 counters
   - Preserve native fallback when FIN emojis are absent
   - Applies to individual discussion posts, desktop and PWA
   - Depends on PHP #108 and PHP #98
   - CSS section located at bottom of stylesheet
   - STATUS: Previously owner-verified; restoration pending retest




   ========================================================== */



/* =========================================
   NATIVE DISCUSSION FEEDS — MOBILE GUTTERS
   Family Feed, FIT Training, Featured FIN,
   and other native discussion spaces
   ========================================= */

@media (max-width: 767px) {
    .portal-content-type-posts_discussion[id^="portal-post-"] {
        padding-left: var(--fin-mobile-gutter) !important;
        padding-right: var(--fin-mobile-gutter) !important;
        box-sizing: border-box !important;
    }
}


/* =========================================
   FAMILY FEED — MASTER LAYOUT
   ========================================= */




.fin-family-feed-layout {
    display: grid;
    grid-template-columns: minmax(0, 780px) 360px;
    gap: 24px;

    width: 100%;
    max-width: 1164px;

    margin-left: auto;
    margin-right: auto;

    align-items: start;
    justify-content: center;

    box-sizing: border-box;
}


/* =========================================
   NATIVE SUREDASH FEED
   ========================================= */

.fin-family-feed-main {
    width: 100%;
    min-width: 0;
    max-width: 780px;
}

/* FIN — Home Feed desktop column alignment
   v0.1.0 TEST — user-approved */
@media (min-width: 1024px) {
  body.fin-feed-home
  .fin-family-feed-layout.fin-feed-has-rail
  > .fin-family-feed-main {
    margin-top: -10px;
  }
}

.fin-family-feed-main .portal-feed-posts {
    width: 100%;
    max-width: 780px;
    margin: 0;
}


/* =========================================
   RIGHT RAIL
   ========================================= */

.fin-family-feed-rail {
    width: 100%;
    min-width: 0;
    max-width: 360px;
}


/* =========================================
   FEED WIDGET
   ========================================= */

.fin-feed-widget {
    width: 100%;
    box-sizing: border-box;

    background: var(--portal-content-bg-color, #fff);
    border: 1px solid var(--portal-border-color, #e5e7eb);
    border-radius: 12px;

    overflow: hidden;
}

.fin-feed-widget-header {
    padding: 20px 20px 12px;
}

.fin-feed-widget-header h3 {
    margin: 0;

    font-size: 18px;
    line-height: 1.3;

    color: var(--portal-heading-color);
}

.fin-feed-widget-body {
    padding: 8px 20px 20px;
}


/* Temporary placeholder */

.fin-event-placeholder {
    display: flex;
    flex-direction: column;
    gap: 4px;

    padding: 14px 0;
}

.fin-event-placeholder span {
    font-size: 14px;
    color: var(--portal-text-color);
}


/* =========================================
   TABLET — EXISTING NO-SIDEBAR LAYOUT
   ========================================= */

@media (max-width: 1023px) {

    .fin-family-feed-layout {
        grid-template-columns: 1fr;
        max-width: 850px;
    }

    .fin-family-feed-main,
    .fin-family-feed-main .portal-feed-posts {
        max-width: 850px;
    }

    .fin-family-feed-rail {
        max-width: none;
    }
}


/* =========================================
   NARROW DESKTOP — SUREDASH SIDEBAR OPEN
   F-014 / F-025 responsive rail v0.1.0 TEST

   Sidebar opens at 1026px.
   Stack FIN rail through 1359px.
   Preserve 1024–1025px and 1360px+ layouts.
   ========================================= */

@media (min-width: 1026px) and (max-width: 1359px) {

    /* Home: Event above a full-width feed. */
    .fin-family-feed-layout.fin-feed-has-rail {
        grid-template-columns: minmax(0, 1fr);
        max-width: 850px;
        row-gap: 16px;
    }

    .fin-family-feed-layout.fin-feed-has-rail
    > .fin-family-feed-rail {
        order: -1;
        max-width: none;
    }

    .fin-family-feed-layout.fin-feed-has-rail
    > .fin-family-feed-main {
        max-width: 850px;
        margin-top: 0 !important;
    }

    .fin-family-feed-main .portal-feed-posts {
        max-width: 850px;
    }

    /* Match tablet: hide contextual Resources card. */
    .fin-family-feed-rail > .fin-family-resources {
        display: none;
    }

    /* Resources-only Home: eliminate empty rail. */
    .fin-family-feed-layout.fin-feed-resources-only {
        display: block;
        max-width: 780px;
    }

    .fin-family-feed-layout.fin-feed-resources-only
    > .fin-family-feed-rail {
        display: none;
    }

    /* Family Feed Space 20: native feed full-width. */
    .fin-family-feed-layout.fin-family-feed-space-layout {
        display: block;
        max-width: 850px;
    }

    .fin-family-feed-layout.fin-family-feed-space-layout
    > .fin-family-feed-rail {
        display: none !important;
    }
}



/* =========================================
   MOBILE
   ========================================= */


@media (max-width: 767px) {
    .fin-family-feed-layout {
        padding-left: var(--fin-mobile-gutter);
        padding-right: var(--fin-mobile-gutter);
    }
}


/* =========================================
   FEED WITH NO UPCOMING EVENTS
   ========================================= */

.fin-family-feed-layout.fin-feed-no-rail {
    display: block;
    max-width: 780px;
}

.fin-feed-no-rail .fin-family-feed-main {
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   FAMILY FEED BANNER
   ========================================= */

.fin-family-feed-banner {
    width: 100%;
    max-width: 1200px;

    margin: 0 auto 24px;

    box-sizing: border-box;
}

.fin-family-feed-banner-image {
    display: block;

    width: 100%;
    height: auto;

    border-radius: 10px;
}


/* =========================================
   BANNER — TABLET / MOBILE
   ========================================= */

@media (max-width: 767px) {

    .fin-family-feed-banner {
        padding-left: 0px;
        padding-right: 0px;

        margin-bottom: 16px;
    }

    .fin-family-feed-banner-image {
        border-radius: 8px;
    }

}


/* =========================================
   FIN — HOME FEED COMPOSER
   ========================================= */

/* Native-style posting bar */

.fin-feed-home .portal-feed-posts
> .fin-home-post-trigger {
    display: flex !important;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 16px 20px;
    margin: 0 0 24px;
    cursor: pointer;
    text-decoration: none !important;
    color: inherit;
}

.fin-home-post-trigger
.portal-write-a-post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.fin-home-post-trigger
.portal-write-a-post-heading {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    min-height: 48px;
    box-sizing: border-box;
}

/* =========================================
   DESKTOP — CENTERED POST MODAL
   Keep native space-selection functionality.
   ========================================= */

@media (min-width: 768px) {

    body.fin-feed-home
    #portal-post-creation-modal.full-screen-post-form
    .portal-modal-content {

        width: min(90vw, 800px) !important;
        max-width: 800px !important;

        height: min(82vh, 800px) !important;
        max-height: 85vh !important;

        border-radius: 12px !important;
		
		margin-left: auto !important;
		margin-right: auto !important;
    }

}


/* =========================================
   FIN — SINGLE POSTING SPACE
   ========================================= */

/* Hide only the dropdown when there is
   exactly one available posting space. */

body.fin-feed-home
#portal-post-creation-modal.fin-one-posting-space
#portal-posting-in-selection {
    display: none !important;
}

/* Display the automatic destination clearly. */

body.fin-feed-home
#portal-post-creation-modal
.fin-posting-destination-note {
    display: block;
    width: 100%;
    padding: 10px 0;
    font-size: 13px;
    line-height: 20px;
    font-weight: 600;
    color: var(--portal-text-color);
}



/* ==========================================================
   FIN — SUREDASH POST / COMMENT TOOLBAR PARITY
   Version: v0.2.0 TEST — October 29, 2026
   Owner: FIN — Feed CSS (#142)

   REPLACES:
   - FIN — SUREDASH POST COMPOSER GIF BADGE
   - FIN — POST COMPOSER ICON BALANCE
   - FIN — POST COMPOSER ICON SPACING

   CONTEXTS:
   - Create Post modal
   - Edit Post modal
   - Native comments and threaded replies
   - Full-post and preview comment editors

   PRESERVED APPEARANCE:
   - GIF: 27px x 20px, 2px border, radius 3px
   - GIF: 11px bold, 0.75 opacity
   - Desktop: 20px SVG / 19px text
   - Desktop: 3px spacing
   - Mobile/PWA: 20px SVG / 19px text
   - Mobile/PWA: 2px spacing

   Native GIPHY behavior is unchanged.
   ========================================================== */


/* ----------------------------------------------------------
   1. CENTER EXISTING GIPHY BUTTON
   ---------------------------------------------------------- */

:is(
  #portal-post-creation-modal .portal-modal-footer .jodit-toolbar__box.post-comment-options,
  #portal-thread-edit-modal .portal-modal-footer .jodit-toolbar__box,
  .jodit-comment-box-wrapper .jodit-toolbar__box
)
:is(.jodit-toolbar-button_giphy, [data-ref="giphy"])
.jodit-toolbar-button__button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}


/* ----------------------------------------------------------
   2. HIDE ORIGINAL GIPHY ARTWORK ONLY
   ---------------------------------------------------------- */

:is(
  #portal-post-creation-modal .portal-modal-footer .jodit-toolbar__box.post-comment-options,
  #portal-thread-edit-modal .portal-modal-footer .jodit-toolbar__box,
  .jodit-comment-box-wrapper .jodit-toolbar__box
)
:is(.jodit-toolbar-button_giphy, [data-ref="giphy"])
:is(.jodit-toolbar-button__icon, .custom-jodit-icons, svg) {
  display: none !important;
}


/* ----------------------------------------------------------
   3. FIN OUTLINED GIF BADGE
   ---------------------------------------------------------- */

:is(
  #portal-post-creation-modal .portal-modal-footer .jodit-toolbar__box.post-comment-options,
  #portal-thread-edit-modal .portal-modal-footer .jodit-toolbar__box,
  .jodit-comment-box-wrapper .jodit-toolbar__box
)
:is(.jodit-toolbar-button_giphy, [data-ref="giphy"])
.jodit-toolbar-button__button::after {
  content: 'GIF';

  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;

  min-width: 27px;
  height: 20px;
  padding: 0 2px;

  border: 2px solid currentColor;
  border-radius: 3px;

  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.3px;

  color: var(--portal-text-color, #111827);
  opacity: 0.75;
  pointer-events: none;
}


/* ----------------------------------------------------------
   4. DESKTOP ICONS AND SPACING
   ---------------------------------------------------------- */

@media (min-width: 768px) {

  /* Text-based icons at 19px. */

  :is(
    #portal-post-creation-modal .portal-modal-footer .jodit-toolbar__box.post-comment-options,
    #portal-thread-edit-modal .portal-modal-footer .jodit-toolbar__box,
    .jodit-comment-box-wrapper .jodit-toolbar__box
  )
  .jodit-toolbar-button:not(.jodit-toolbar-button_giphy):not([data-ref="giphy"])
  .jodit-toolbar-button__button {
    font-size: 19px !important;
  }

  /* Native SVG icons at 20px. */

  :is(
    #portal-post-creation-modal .portal-modal-footer .jodit-toolbar__box.post-comment-options,
    #portal-thread-edit-modal .portal-modal-footer .jodit-toolbar__box,
    .jodit-comment-box-wrapper .jodit-toolbar__box
  )
  .jodit-toolbar-button:not(.jodit-toolbar-button_giphy):not([data-ref="giphy"])
  .jodit-toolbar-button__button svg {
    width: 20px !important;
    height: 20px !important;
  }

  /* Custom Jodit icons. */

  :is(
    #portal-post-creation-modal .portal-modal-footer .jodit-toolbar__box.post-comment-options,
    #portal-thread-edit-modal .portal-modal-footer .jodit-toolbar__box,
    .jodit-comment-box-wrapper .jodit-toolbar__box
  )
  .jodit-toolbar-button:not(.jodit-toolbar-button_giphy):not([data-ref="giphy"])
  .custom-jodit-icons {
    font-size: 19px !important;
  }

  /* Desktop spacing: 3px. */

  :is(
    #portal-post-creation-modal .portal-modal-footer .jodit-toolbar__box.post-comment-options,
    #portal-thread-edit-modal .portal-modal-footer .jodit-toolbar__box,
    .jodit-comment-box-wrapper .jodit-toolbar__box
  )
  .jodit-toolbar-button:not(:last-child) {
    margin-inline-end: 3px !important;
  }
}


/* ----------------------------------------------------------
   5. MOBILE AND INSTALLED PWA
   ---------------------------------------------------------- */

@media (max-width: 767px) {

  /* #116 already handles Create Post icon sizing.
     Apply equivalent sizing to Edit Post and comments.
     Do not modify the mobile modal's safe-area behavior. */

  :is(
    #portal-thread-edit-modal .portal-modal-footer .jodit-toolbar__box,
    .jodit-comment-box-wrapper .jodit-toolbar__box
  )
  .jodit-toolbar-button:not(.jodit-toolbar-button_giphy):not([data-ref="giphy"])
  .jodit-toolbar-button__button,

  :is(
    #portal-thread-edit-modal .portal-modal-footer .jodit-toolbar__box,
    .jodit-comment-box-wrapper .jodit-toolbar__box
  )
  .jodit-toolbar-button:not(.jodit-toolbar-button_giphy):not([data-ref="giphy"])
  .custom-jodit-icons {
    font-size: 19px !important;
  }

  /* SVG sizing. */

  :is(
    #portal-thread-edit-modal .portal-modal-footer .jodit-toolbar__box,
    .jodit-comment-box-wrapper .jodit-toolbar__box
  )
  .jodit-toolbar-button:not(.jodit-toolbar-button_giphy):not([data-ref="giphy"])
  .jodit-toolbar-button__button svg {
    width: 20px !important;
    height: 20px !important;
  }

  /* All supported editors: 2px mobile spacing. */

  :is(
    #portal-post-creation-modal .portal-modal-footer .jodit-toolbar__box.post-comment-options,
    #portal-thread-edit-modal .portal-modal-footer .jodit-toolbar__box,
    .jodit-comment-box-wrapper .jodit-toolbar__box
  )
  .jodit-toolbar-button:not(:last-child) {
    margin-inline-end: 2px !important;
  }
}


/* ==========================================================
   END — FIN SUREDASH POST / COMMENT TOOLBAR PARITY
   ========================================================== */



/* =========================================
   FIN — GIPHY MOBILE FIX
   Native SureDash GIF picker
   ========================================= */

@media (max-width: 767px) {

    /* Keep the complete GIF dialog inside the viewport */

    .sd-modal-dialog:has(#giphy-modal) {
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        overscroll-behavior-x: none !important;
    }

    /* Prevent iOS automatic input zoom */

    #giphy-search-box {
        font-size: 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        min-height: 56px !important;
        height: 56px !important;
    }

    /* Keep focused search indicator inside the dialog */

    #giphy-search-box:focus,
    #giphy-search-box:focus-visible {
        outline: 1px solid var(--portal-link-active-color) !important;
        outline-offset: -1px !important;
    }

    /* Contain the Giphy content area */

    #giphy-modal {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        overscroll-behavior-x: none !important;
    }

    /* Keep GIF columns within the available width */

    #giphy-modal .gif-grid {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: clip !important;
    }

    #giphy-modal .gif-grid > *,
    #giphy-modal .portal-user-results {
        min-width: 0 !important;
        max-width: 100% !important;
    }

    #giphy-modal .gif-grid img {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
}

/* ==========================================================
   FIN — FEED POST EXPANSION | SEE MORE / SEE LESS
   ==========================================================
   Eight rendered text lines on desktop, tablet and mobile.
   JavaScript controls line measurement and expansion.
   Requires SureDash Full Preview.
   ========================================================== */


/* Text segments */

.portal-store-list-post .fin-post-text-segment {
    position: relative;
    min-width: 0;
}

.portal-store-list-post .fin-post-text-segment.fin-is-clamped {
    overflow: hidden !important;
}

.portal-store-list-post .fin-post-text-segment.fin-is-hidden {
    display: none !important;
}


/* Images and GIFs beyond the eight-line cutoff */

.portal-store-list-post .fin-post-media-hidden {
    display: none !important;
}


/* See more / See less button */

.portal-store-list-post .fin-post-expand-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: flex-start;

    width: auto !important;
    min-width: 0 !important;
    min-height: 32px;

    margin: 8px 0 0 !important;
    padding: 4px 0 !important;

    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;

    background: transparent !important;
    color: #2563eb !important;

    font: inherit !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;

    text-align: left !important;
    text-decoration: none !important;
    cursor: pointer;
}

.portal-store-list-post .fin-post-expand-toggle:hover {
    text-decoration: underline !important;
}

.portal-store-list-post .fin-post-expand-toggle:focus-visible {
    outline: 2px solid currentColor !important;
    outline-offset: 3px;
    border-radius: 3px;
}

.portal-store-list-post .fin-post-expand-toggle[hidden] {
    display: none !important;
}


/* =========================================
   SINGLE DISCUSSION POST — COVER TOP EDGE
   FIN — Feed CSS / Cover Edge v0.1.0 TEST
   Only on individual SureDash discussion post pages
   with the confirmed image-first PHP marker and cover.
   ========================================= */

/* Let the cover reach the top of the boxed post card. */
.fin-post-image-first.portal-content-area.sd-boxed-post:has(> .portal-post-cover-image) {
    padding-top: 0 !important;
}

/* Give the exposed image the same rounded upper edge as its card. */
.fin-post-image-first.portal-content-area.sd-boxed-post > .portal-post-cover-image {
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}


/* =========================================
   MOBILE FEED COVER — TOP CORNERS ONLY
   FIN — Feed CSS / Mobile Top Corners v0.1.0 TEST
   Adjusts no gutters, sizing, crop, bottom radius or positioning.
   ========================================= */

@media (max-width: 767px) {
    .portal-store-list-post.fin-post-image-first > .portal-post-cover-image {
        border-radius: 12px 12px 0 0 !important;
    }
}


/* =========================================
   FIN — MOBILE SINGLE POST COVER ALIGNMENT
   Version: v0.1.1 TEST
   Preserve native mobile side gutters.
   Round top corners only.
   ========================================= */

@media (max-width: 767px) {

    .fin-post-image-first.portal-content-area.sd-boxed-post
    > .portal-post-cover-image {

        width: 100% !important;

        margin-top: var(--fin-mobile-gutter, 12px) !important;
        margin-left: 0 !important;
        margin-right: 0 !important;

        border-radius: 12px 12px 0 0 !important;
    }
}



/* =========================================
   SORTING CONTROLS — POSITION & SPACING
   ========================================= */

/* Reduce space below sorting controls. */
.portal-feeds-controls:has(+ #portal-write-a-post) {
    margin-bottom: 8px !important;
}

/* Remove extra space above the posting box. */
.portal-feeds-controls + #portal-write-a-post {
    margin-top: 0 !important;
}

/* Tighten spacing beneath navigation on desktop/tablet. */
@media (min-width: 768px) {
    .portal-feeds-controls:has(+ #portal-write-a-post) {
        margin-top: -12px !important;
    }
}


/* =========================================
   DISCUSSION CARDS — TITLE / AUTHOR SPACING
   ========================================= */

/* Reduce space beneath the post title container. */
.portal-store-list-post.fin-post-image-first
> .fin-post-title-below-cover {
    padding-bottom: 8px !important;
}

/* Remove excess space above author information. */
.portal-store-list-post.fin-post-image-first
> .fin-post-title-below-cover
+ .portal-store-post-header {
    padding-top: 0 !important;
}

/* Prevent title margins from adding extra space. */
.portal-store-list-post.fin-post-image-first
> .fin-post-title-below-cover
> .portal-store-post-title {
    margin-bottom: 0 !important;
}


/* =========================================
   DISCUSSION CARDS — COVER IMAGE / TITLE
   ========================================= */

/* Remove default margin beneath cover images. */
.portal-store-list-post.fin-post-image-first
> .portal-post-cover-image {
    margin-bottom: 0 !important;
}

/* Set spacing between cover image and title. */
.portal-store-list-post.fin-post-image-first
> .portal-post-cover-image
+ .fin-post-title-below-cover {
    padding-top: 16px !important;
}


/* =========================================
   FIN — MOBILE DISCUSSION CARD SEPARATION
   Version: 0.1.1 TEST

   - Add space between consecutive feed cards
   - Home Feed, Family Feed and FIT Training
   - Include normal posts and Event announcements
   - Preserve Featured FIN editorial grid
   - Preserve desktop and individual post pages
   ========================================= */

@media (max-width: 767px) {

    body.fin-feed-home .portal-feeds-posts-container
    > .portal-store-list-post.fin-post-image-first
    ~ .portal-store-list-post.fin-post-image-first,

    .portal-content-type-posts_discussion[id^="portal-post-"]:not(#portal-post-18)
    .portal-feeds-posts-container
    > .portal-store-list-post.fin-post-image-first
    ~ .portal-store-list-post.fin-post-image-first {
        margin-top: 24px !important;
    }

}


/* =========================================
   FIN — HOME FEED MOBILE SORTING GAP
   Reduce space between the Family banner
   and the Sort / List / Grid controls.
   ========================================= */

@media (max-width: 767px) {

    /* Reduce space below the Family banner. */
    body.fin-feed-home .fin-family-feed-banner {
        margin-bottom: 0px !important;
    }

    /* Tighten the top of the sorting controls. */
    body.fin-feed-home .fin-family-feed-main
    .portal-feed-posts > .portal-feeds-controls {
        padding-top: 4px !important;
    }

}


/* ==========================================================
   FIN — FEED AUTHOR EMOJI BADGES + MOBILE AUTHOR DETAILS
   Version: 0.2.1 TEST — RESTORE after October 22 Event CSS merge

   TYPE: CSS | SCOPE: FIN image-first discussion feed cards
   DEPENDENCY: EXISTING FIN — Feed Author Emoji Badges v0.1.0
               PHP snippet (suredash_before_user_badges).

   The native SureDash display is limited to two pills + counter
   on desktop and one pill + counter on mobile. FIN's existing
   PHP outputs all badges as .fin-feed-author-emoji elements.

   IMPORTANT: Do NOT hide native badges unless custom output is
   present. This preserves a fallback if the PHP isn't active.
   ========================================================== */

/* Keep the author name and custom emoji row flexible at all sizes. */
.portal-store-list-post.fin-post-image-first
.portal-post-author > a.sd-mobile-flex-wrap {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    column-gap: 6px !important;
    row-gap: 3px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    white-space: normal !important;
}

.portal-store-list-post.fin-post-image-first
.portal-post-author .portal-store-post-author {
    min-width: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
}

/* Expose the existing FIN PHP-generated emoji badges. */
.portal-store-list-post.fin-post-image-first
.portal-post-author .fin-feed-author-emoji-badges {
    display: inline-flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    column-gap: 5px !important;
    row-gap: 3px !important;
    flex: 0 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle;
}

.portal-store-list-post.fin-post-image-first
.portal-post-author .fin-feed-author-emoji-badges
> .fin-feed-author-emoji {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 16px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: inherit;
    font-size: 16px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

/* If FIN custom badges exist, suppress BOTH native groups,
   including the text labels and +1 / +2 counters.
   If custom output is absent, leave native badges as fallback. */
.portal-store-list-post.fin-post-image-first
.portal-post-author > a.sd-mobile-flex-wrap:has(.fin-feed-author-emoji-badges)
.portal-user-badges-wrap {
    display: none !important;
}

/* Allow the author column to shrink without truncating metadata. */
.portal-store-list-post.fin-post-image-first
.portal-store-post-author-wrap,
.portal-store-list-post.fin-post-image-first
.portal-post-author {
    min-width: 0 !important;
}

/* Mobile: show the FULL tagline, then relative time / feed. */
@media (max-width: 767px) {
    .portal-store-list-post.fin-post-image-first
    .portal-post-author > a.portal-thread-details {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: visible !important;
        text-overflow: clip !important;
        white-space: normal !important;
    }

    .portal-store-list-post.fin-post-image-first
    .portal-thread-details > .sd-user-headline {
        display: block !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: visible !important;
        text-overflow: clip !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }

    /* Keep time/feed below tagline rather than adding a dot
       at the end of the standalone tagline row. */
    .portal-store-list-post.fin-post-image-first
    .sd-user-headline + .portal-reaction-separator {
        display: none !important;
    }

    .portal-store-list-post.fin-post-image-first
    .portal-thread-details > .portal-store-post-publish-date {
        display: inline !important;
        max-width: 100% !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }
}


/* ==========================================================
   FIN — HOME FEED EVENTS | CONSOLIDATED
   v0.2.0 TEST — October 24, 2026

   Scope: SureDash Event preview in FIN Home Feed.
   Existing PHP #28 v0.2.0a: KEEP UNCHANGED.
   Preserves accepted Live / Upcoming layouts and media behavior.

   Shared .fin-event-* foundations remain available for other
   Event summaries; .fin-next-event rules style only this widget.
   ========================================================== */

/* --- Event summary foundations (also used outside Home) --- */

.fin-event-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    color: inherit;
    text-decoration: none !important;
}

.fin-event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 52px;
    min-width: 52px;
    height: 56px;
    border: 1px solid var(--portal-border-color, #e5e7eb);
    border-radius: 8px;
    background: var(--portal-secondary-color, #f8fafc);
}

.fin-event-day {
    font-size: 18px;
    line-height: 1;
    font-weight: 700;
    color: var(--portal-heading-color);
}

.fin-event-month {
    margin-top: 5px;
    font-size: 10px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--portal-text-color);
}

.fin-event-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.fin-event-title {
    font-size: 16px;
    line-height: 1.3;
    color: var(--portal-heading-color);
}

.fin-event-time {
    font-size: 13px;
    line-height: 1.45;
    color: var(--portal-text-color);
}

/* Outside the FIN Home widget: retain native-like action styles. */
.fin-event-text-link {
    display: inline-block;
    margin-top: 14px;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
    color: var(--portal-link-color);
    text-decoration: none !important;
}

.fin-event-text-link:hover {
    text-decoration: underline !important;
}

.fin-event-join {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    margin-top: 16px;
    padding: 9px 16px;
    border: 1px solid #FFC72C;
    border-radius: 7px;
    background: var(--portal-secondary-button-bg-color, #fff);
    color: var(--portal-heading-color);
    font-size: 13px;
    line-height: 1.2;
    font-weight: 700;
    text-decoration: none !important;
}

.fin-event-join:hover {
    background: #FFC72C;
    color: #111827;
}

.fin-live-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--portal-heading-color);
}

.fin-live-dot {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dc2626;
}

/* --- FIN Home Event widget: shared appearance --- */

.fin-next-event .fin-feed-widget-header {
    padding: 14px 16px 8px;
}

.fin-next-event .fin-feed-widget-header h3,
.fin-next-event .fin-live-label {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.025em;
}

.fin-next-event .fin-feed-widget-header h3 {
    text-transform: uppercase;
}

.fin-next-event .fin-feed-widget-body {
    padding: 4px 16px 16px;
}

.fin-next-event .fin-event-summary--compact {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    grid-template-rows: auto;
    column-gap: 12px;
    row-gap: 0;
    align-items: center;
    min-width: 0;
}

.fin-next-event .fin-event-summary--compact > .fin-event-date-link {
    grid-column: 1;
    align-self: center;
    width: 52px;
    min-width: 52px;
    height: 56px;
    text-decoration: none;
}

.fin-next-event .fin-event-summary--compact > .fin-event-info {
    display: flex;
    flex-direction: column;
    gap: 0;
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
}

.fin-next-event .fin-event-summary--compact .fin-event-title-link {
    display: block;
    min-width: 0;
    align-self: stretch;
    color: var(--portal-heading-color, #111827);
    font-size: 16px;
    font-weight: 650;
    line-height: 1.16;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.fin-next-event .fin-event-title-link:hover {
    text-decoration: underline;
}

.fin-next-event .fin-event-summary--compact .fin-event-time {
    min-width: 0;
    align-self: stretch;
    font-size: 13px;
    line-height: 1.16;
    overflow-wrap: break-word;
}

.fin-next-event .fin-event-summary--compact > .fin-event-action-slot {
    min-width: 0;
}

.fin-next-event .fin-event-action-slot .fin-event-join,
.fin-next-event .fin-event-action-slot .fin-event-text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: auto;
    margin: 0;
    min-height: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none !important;
}

/* --- Live Event: title/status beside JOIN --- */


/* F-025 — Live title fit | v0.1.0 TEST
   Preserve accepted vertical alignment and JOIN placement. */

.fin-next-event .fin-event-summary--compact.fin-event-is-live {
    column-gap: 8px;
}

.fin-next-event .fin-event-summary--compact.fin-event-is-live .fin-event-title-link {
    letter-spacing: -0.25px;
}


.fin-next-event .fin-event-is-live > .fin-event-date-link {
    grid-row: 1;
}

.fin-next-event .fin-event-summary--compact.fin-event-is-live > .fin-event-info {
    align-self: center;
}

.fin-next-event .fin-event-summary--compact.fin-event-is-live > .fin-event-action-slot {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: center;
}

.fin-next-event .fin-event-action-slot .fin-event-join {
    border: 0;
    background: #FFC72C;
    color: #151515;
}

.fin-next-event .fin-event-action-slot .fin-event-join:hover {
    background: #04E3FF;
    color: #151515;
}

/* Compact centering used on wider mobile phones for Live only. */
@media (min-width: 420px) and (max-width: 767px) {
    .fin-next-event .fin-event-summary--compact.fin-event-is-live {
        grid-template-columns: 52px minmax(0, 1fr) max-content;
        max-width: clamp(336px, calc(100vw - 104px), 100%);
        margin-inline: auto;
    }

    .fin-next-event .fin-event-is-live > .fin-event-info {
        justify-self: start;
        max-width: 100%;
    }
}

/* Standard link stays theme-controlled, including the LIVE no-link fallback. */
.fin-next-event .fin-event-action-slot .fin-event-text-link {
    padding-left: 0;
    padding-right: 0;
    color: var(--portal-link-color, #151515);
}

/* --- Upcoming Event: title -> schedule -> theme-colored link --- */

.fin-next-event .fin-event-summary--compact.fin-event-is-upcoming {
    grid-template-columns: 52px minmax(0, 1fr);
    grid-template-rows: auto auto;
}

.fin-next-event .fin-event-summary--compact.fin-event-is-upcoming > .fin-event-date-link {
    grid-row: 1 / 3;
    transform: translateY(-4px);
}

.fin-next-event .fin-event-summary--compact.fin-event-is-upcoming > .fin-event-info {
    align-self: end;
}

.fin-next-event .fin-event-summary--compact.fin-event-is-upcoming > .fin-event-action-slot {
    display: flex;
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    align-self: start;
    align-items: flex-start;
}

.fin-next-event .fin-event-is-upcoming .fin-event-action-slot .fin-event-text-link {
    height: auto;
    min-height: 24px;
    padding: 0;
    align-items: flex-start;
    justify-content: flex-start;
    line-height: 1.18;
    white-space: normal;
}

/* --- Keyboard accessibility --- */
.fin-next-event .fin-event-date-link:focus-visible,
.fin-next-event .fin-event-title-link:focus-visible,
.fin-next-event .fin-event-action-slot a:focus-visible {
    outline: 2px solid #04E3FF;
    outline-offset: 3px;
}

/* Exception: very narrow phones */
@media (max-width: 359px) {

  .fin-next-event .fin-event-summary--compact {
    grid-template-columns: 52px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
  }

  .fin-next-event
  .fin-event-summary--compact > .fin-event-date-link {
    grid-row: 1 / 4;
  }

  .fin-next-event
  .fin-event-summary--compact .fin-event-title-link,
  .fin-next-event
  .fin-event-summary--compact .fin-event-time,
  .fin-next-event
  .fin-event-summary--compact > .fin-event-action-slot {
    grid-column: 2; 
  }

  .fin-next-event
  .fin-event-summary--compact > .fin-event-action-slot {
    grid-row: 3;
    justify-self: start;
  }
}

/* ==========================================================
   MOBILE POSITIONING — PRESERVE WORKING SPACING
   ========================================================== */

@media (max-width: 1023px) {

  .fin-family-feed-layout.fin-feed-has-rail
  > .fin-family-feed-rail {
    order: -1;
  }

  .fin-family-feed-banner:has(
    + .fin-family-feed-layout.fin-feed-has-rail
  ) {
    margin-top: 20px !important;
    margin-bottom: 0 !important;
  }

  .fin-family-feed-layout.fin-feed-has-rail {
    margin-top: 16px !important;
    row-gap: 0 !important;
  }

  .fin-family-feed-layout.fin-feed-has-rail
  > .fin-family-feed-main {
    margin-top: -4px !important;
  }
}

/* Preserve current mobile banner corners */
@media (max-width: 767px) {

  .fin-family-feed-banner:has(
    + .fin-family-feed-layout.fin-feed-has-rail
  ) .fin-family-feed-banner-image {
    border-radius: 0 !important;
  }
}


/* ==========================================================
   FIN — F-014 FAMILY RESOURCES CARD
   Version: v0.1.0 TEST
   NEW — Desktop-only contextual rail card

   Existing Event card styling remains unchanged.
   ========================================================== */

/* Space Family Resources below an existing Event. */
.fin-family-feed-rail > .fin-next-event + .fin-family-resources {
    margin-top: 16px;
}

/* Match the compact Event card heading. */
.fin-family-resources .fin-feed-widget-header {
    padding: 14px 16px 8px;
}

.fin-family-resources .fin-feed-widget-header h3 {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

/* Family Resources content. */
.fin-family-resources .fin-feed-widget-body {
    padding: 4px 16px 16px;
}

.fin-family-resources .fin-feed-widget-body p {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--portal-text-color);
}

/* Desktop-only Family Resources.
   Preserve original no-Event mobile/tablet layout. */
@media (max-width: 1023px) {

    .fin-family-feed-rail > .fin-family-resources {
        display: none;
    }

    .fin-family-feed-layout.fin-feed-resources-only {
        display: block;
        max-width: 780px;
        margin-top: 0 !important;
    }

    .fin-family-feed-layout.fin-feed-resources-only
    > .fin-family-feed-rail {
        display: none;
    }

    .fin-family-feed-layout.fin-feed-resources-only
    > .fin-family-feed-main {
        margin-top: 0 !important;
    }

    .fin-family-feed-banner:has(
        + .fin-family-feed-layout.fin-feed-resources-only
    ) {
        margin-top: 0 !important;
        margin-bottom: 24px !important;
    }
}

/* Restore accepted no-Event phone spacing. */
@media (max-width: 767px) {

    .fin-family-feed-banner:has(
        + .fin-family-feed-layout.fin-feed-resources-only
    ) {
        margin-bottom: 16px !important;
    }

    .fin-family-feed-banner:has(
        + .fin-family-feed-layout.fin-feed-resources-only
    ) .fin-family-feed-banner-image {
        border-radius: 8px !important;
    }
}


/* ==========================================================
   FIN — F-014 FAMILY DISCUSSION SPACE 20 DESKTOP RAIL
   v0.1.1 TEST — APPEND AFTER existing F-014 v0.1.0 block
   Existing Home and Event layouts remain unchanged.
   ========================================================== */

/* Match the Home Feed's 780 / 360 / 24 column composition. */
@media (min-width: 1024px) {
    #portal-post-20.portal-content-type-posts_discussion {
        width: 100%;
        max-width: 1164px;
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }

    .fin-family-feed-layout.fin-family-feed-space-layout {
        width: 100%;
        max-width: 1164px;
    }
}

/* Family and FIT contextual cards stay desktop-only.
   The existing native Family Feed has normal single-column
   presentation and gutters on tablet and phone. */
@media (max-width: 1023px) {
    .fin-family-feed-layout.fin-feed-has-rail.fin-family-feed-space-layout {
        display: block;
        width: 100%;
        max-width: 100%;
        margin-top: 0 !important;
        padding: 0 !important;
    }

    .fin-family-feed-layout.fin-family-feed-space-layout
    > .fin-family-feed-rail {
        display: none !important;
    }

    .fin-family-feed-layout.fin-feed-has-rail.fin-family-feed-space-layout
    > .fin-family-feed-main {
        width: 100%;
        max-width: 100%;
        margin-top: 0 !important;
    }
}


/* ==========================================================
   FIN — F-014 FAMILY FEED DESKTOP RAIL ALIGNMENT
   v0.1.2 TEST — NEW | Family Space 20 only
   ========================================================== */

@media (min-width: 1024px) {
  .fin-family-feed-layout.fin-family-feed-space-layout
  > .fin-family-feed-rail {
    margin-top: -12px;
  }
}



/* ==========================================================
   FIN — HOME / FAMILY BANNER SPACING + FULL IMAGE
   v0.1.1 TEST — REPLACE previous Spacing & Edge block
   Preserve the image's original white border.
   Desktop only.
   ========================================================== */

@media (min-width: 1024px) {

  /* Home banner spacing */
  body.fin-feed-home .fin-family-feed-banner {
    margin-top: 18px !important;
  }

  /* Family Feed native banner wrapper */
  #portal-post-20.portal-content-type-posts_discussion
  > .portal-item-featured-image-wrap {
    margin-top: -18px !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    overflow: visible !important;
    border-radius: 0 !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12) !important;
  }

  /* Display the COMPLETE original image */
  #portal-post-20.portal-content-type-posts_discussion
  > .portal-item-featured-image-wrap
  > img.portal-item-featured-image {
    display: block;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    border-radius: 0 !important;
  }

}


/* ==========================================================
   FIN — MOBILE ATTACHMENT DIALOG CONTAINMENT
   Version: v0.1.0 TEST | F-046
   ADD to existing FIN — Feed CSS (#142).

   - Consistent mobile dialog side margins
   - Prevent iPhone focus zoom on Video URL input
   - Protect Image URL and search fields from the same issue
   - Preserve native upload, GIF, video, and posting logic
   ========================================================== */

@media (max-width: 767px) {

  /* Contain SureDash dialogs while creating a post. */
  body:has(#portal-post-creation-modal.active)
  .sd-modal-dialog {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    margin-inline: auto !important;
    box-sizing: border-box !important;
  }

  /* Prevent iOS automatic zoom on focused attachment inputs. */
  body:has(#portal-post-creation-modal.active)
  .sd-modal-dialog #video-url-input,

  body:has(#portal-post-creation-modal.active)
  .sd-modal-dialog
  input:is([type="text"], [type="url"], [type="search"]) {
    font-size: 16px !important;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

}

/* FIN — Attachment Dialog Focus Highlight
   Match the existing GIF search field styling.
   Mobile post composer only.
*/

@media (max-width: 767px) {

  body:has(#portal-post-creation-modal.active)
  .sd-modal-dialog
  input:is([type="text"], [type="url"], [type="search"]):focus,

  body:has(#portal-post-creation-modal.active)
  .sd-modal-dialog
  input:is([type="text"], [type="url"], [type="search"]):focus-visible {
    outline: 1px solid var(--portal-link-active-color) !important;
    outline-offset: -1px !important;
  }

}

/* FIN — Mobile Video URL Input
   Match GIF search field height and padding.
*/
@media (max-width: 767px) {

  body:has(#portal-post-creation-modal.active)
  .sd-modal-dialog #video-url-input {
    height: 56px !important;
    min-height: 56px !important;
    padding: 12px 20px !important;
    line-height: 24px !important;
    box-sizing: border-box !important;
  }

}


/* ==========================================================
   FIN — FEED HYBRID EXPANSION + NATURAL INLINE IMAGES
   v0.2.0 TEST — APPEND to existing FIN Feed CSS #142.
   Requires replacement FIN — Feed Post Expansion #55 v0.2.0.
   Keep existing See More / See Less CSS and Giphy styles.
   ========================================================== */

/* Height-limited media remain clipped only in the collapsed feed. */
.portal-store-list-post .fin-post-media-clamped {
    overflow: hidden !important;
}

/* Override SureDash's inline 300px tall-image preview within post content;
   actual feed length is managed by the hybrid See more/See less feature. */
.portal-store-list-post .portal-space-post-content .suredash-image-preview,
body.single-community-post .portal-content-area .suredash-single-content .suredash-image-preview {
    max-height: none !important;
    overflow: visible !important;
}

.portal-store-list-post .portal-space-post-content .suredash-image-preview img,
body.single-community-post .portal-content-area .suredash-single-content .suredash-image-preview img {
    display: block;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}

/* No longer suggest that a lightbox is required to view the full image.
   SureDash's original lightbox handler remains available when clicked. */
.portal-store-list-post .portal-space-post-content .suredash-expand-overlay,
body.single-community-post .portal-content-area .suredash-single-content .suredash-expand-overlay {
    display: none !important;
}


/* ==========================================================
   FIN — SINGLE DISCUSSION POST AUTHOR BADGE PARITY
   Version: v0.1.0 | F-016 adjacent visual regression
   ACTION: APPEND to FIN — Feed CSS (#142)
   DEPENDS ON: PHP #108 Feed Author Emoji Badges
               PHP #98 Single Discussion Image-First
   SCOPE: Individual discussion posts, desktop/mobile/PWA
   ========================================================== */

/* Match the approved feed's flexible author-name/emoji row. */
.portal-content-area.sd-boxed-post.fin-post-image-first
.portal-post-author > a.sd-mobile-flex-wrap {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    column-gap: 6px !important;
    row-gap: 3px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    white-space: normal !important;
}

/* Reveal all FIN PHP-generated emoji badges. */
.portal-content-area.sd-boxed-post.fin-post-image-first
.portal-post-author .fin-feed-author-emoji-badges {
    display: inline-flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    column-gap: 5px !important;
    row-gap: 3px !important;
    flex: 0 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle;
}

.portal-content-area.sd-boxed-post.fin-post-image-first
.portal-post-author .fin-feed-author-emoji-badges > .fin-feed-author-emoji {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 16px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: inherit;
    font-size: 16px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

/* Hide native text badge pills and +N counters
   ONLY when FIN custom emoji badges exist. */
.portal-content-area.sd-boxed-post.fin-post-image-first
.portal-post-author > a.sd-mobile-flex-wrap:has(.fin-feed-author-emoji-badges)
.portal-user-badges-wrap {
    display: none !important;
}


/* ==========================================================
   FIN — COMMENT + REPLY AUTHOR EMOJI BADGE PARITY
   Version: v0.1.0 TEST | F-008 visual consistency
   ACTION: APPEND to FIN — Feed CSS (#142)
   DEPENDS ON: PHP #108 Feed Author Emoji Badges
   Scope: Native SureDash comments and threaded replies
   ROLLBACK: Remove only this section.
   ========================================================== */

/* Allow names and emojis to wrap on smaller screens. */
.portal-comment .portal-comment-bubble-header
> .sd-no-space:has(> .fin-feed-author-emoji-badges) {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    column-gap: 6px !important;
    row-gap: 3px !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

/* Reveal the FIN-generated emoji badges. */
.portal-comment .portal-comment-bubble-header
> .sd-no-space > .fin-feed-author-emoji-badges {
    display: inline-flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    column-gap: 5px !important;
    row-gap: 3px !important;
    flex: 0 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle;
}

.portal-comment .portal-comment-bubble-header
> .sd-no-space > .fin-feed-author-emoji-badges
> .fin-feed-author-emoji {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 16px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: inherit;
    font-size: 16px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

/* Hide native pills and +N only when FIN emojis exist. */
.portal-comment .portal-comment-bubble-header
> .sd-no-space:has(> .fin-feed-author-emoji-badges)
> .portal-user-badges-wrap {
    display: none !important;
}

/* ==========================================================
   FIN — FEATURED FIN | DARK-MODE CARD SURFACES
   F-031 v0.1.0 TEST

   APPEND ONLY to FIN — Featured FIN (#139).
   Space #18 only. Light mode unchanged.
   ========================================================== */

/* Use SureDash's selected dark-mode surface and text colors. */

body.palette-dark #portal-post-18
.portal-feeds-posts-container[data-view-mode="grid"]
> .portal-store-list-post {
    background: var(
        --portal-content-bg-color, #292D31
    ) !important;

    color: var(
        --portal-text-color, #F5F5F5
    ) !important;

    box-shadow:
        0 12px 30px -12px
        rgba(0, 0, 0, 0.4) !important;
}

/* Keep Featured FIN post titles readable in dark mode. */

body.palette-dark #portal-post-18
.portal-feeds-posts-container[data-view-mode="grid"]
> .portal-store-list-post
.portal-store-post-title {
    color: var(
        --portal-heading-color, #F5F5F5
    ) !important;
}



/* ==========================================================
   FIN — EVENT ACTION LINKS | v0.1.1 TEST

   Light: charcoal text
   Dark:  soft silver text
   Normal: gold underline
   Hover/focus: cyan underline

   Event links only. No global link changes.
   ========================================================== */

/* Shared event-link styling — LIGHT MODE */

.fin-next-event .fin-event-action-slot .fin-event-text-link,
.portal-store-list-post .portal-space-post-content a[href*="/event/"]:not(.portal-button):not(.button):not([role="button"]):not(:has(img, svg)),
body.single-community-post .suredash-single-content a[href*="/event/"]:not(.portal-button):not(.button):not([role="button"]):not(:has(img, svg)) {
    color: #505050 !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    text-decoration: underline !important;
    text-decoration-color: #FFC72C !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 3px !important;
}

/* Cyan underline on hover and keyboard focus */

.fin-next-event .fin-event-action-slot .fin-event-text-link:is(:hover, :focus-visible),
.portal-store-list-post .portal-space-post-content a[href*="/event/"]:not(.portal-button):not(.button):not([role="button"]):not(:has(img, svg)):is(:hover, :focus-visible),
body.single-community-post .suredash-single-content a[href*="/event/"]:not(.portal-button):not(.button):not([role="button"]):not(:has(img, svg)):is(:hover, :focus-visible) {
    text-decoration-color: #04E3FF !important;
    text-decoration-thickness: 3px !important;
}

/* DARK MODE — SureDash native theme classes */

body:is(.dark-mode, .palette-dark) .fin-next-event .fin-event-action-slot .fin-event-text-link,
body:is(.dark-mode, .palette-dark) .portal-store-list-post .portal-space-post-content a[href*="/event/"]:not(.portal-button):not(.button):not([role="button"]):not(:has(img, svg)),
body.single-community-post:is(.dark-mode, .palette-dark) .suredash-single-content a[href*="/event/"]:not(.portal-button):not(.button):not([role="button"]):not(:has(img, svg)) {
    color: #B8C0CC !important;
}


/*
 * FIN — FIT Training Rail and Banner
 * F-014 v0.1.0 TEST
 *
 * APPEND to existing FIN — Feed CSS #142.
 * Scope: FIT Discussion Space 82.
 * Home and Family Space 20 unchanged.
 */

/* Preserve the complete FIT banner image. */
#portal-post-82.portal-content-type-posts_discussion
> .portal-item-featured-image-wrap {
    height: auto !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    overflow: visible !important;
    border-radius: 0 !important;
}

#portal-post-82.portal-content-type-posts_discussion
> .portal-item-featured-image-wrap
> img.portal-item-featured-image {
    display: block;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
}

/* Match existing FIN resource-card styling. */
.fin-fit-feed-space-layout
.fin-fit-resources .fin-feed-widget-header {
    padding: 14px 16px 8px;
}

.fin-fit-feed-space-layout
.fin-fit-resources .fin-feed-widget-header h3 {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.fin-fit-feed-space-layout
.fin-fit-resources .fin-feed-widget-body {
    padding: 4px 16px 16px;
}

.fin-fit-feed-space-layout
.fin-fit-resources .fin-feed-widget-body p {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--portal-text-color);
}

/* Wide desktop: same alignment as Family Feed. */
@media (min-width: 1360px) {
    #portal-post-82.portal-content-type-posts_discussion {
        width: 100%;
        max-width: 1164px;
        margin-inline: auto;
        box-sizing: border-box;
    }

    .fin-family-feed-layout.fin-fit-feed-space-layout
    > .fin-family-feed-rail {
        margin-top: -12px;
    }
}

/* Smaller screens: native feed, no FIT sidebar. */
@media (max-width: 1359px) {
    .fin-family-feed-layout.fin-fit-feed-space-layout {
        display: block;
        width: 100%;
        max-width: 850px;
        margin-inline: auto;
        padding: 0;
    }

    .fin-family-feed-layout.fin-fit-feed-space-layout
    > .fin-family-feed-rail {
        display: none !important;
    }

    .fin-family-feed-layout.fin-fit-feed-space-layout
    > .fin-family-feed-main {
        width: 100%;
        max-width: 850px;
        margin-top: 0 !important;
    }
}

@media (max-width: 767px) {
    .fin-family-feed-layout.fin-fit-feed-space-layout {
        max-width: 100%;
    }

    .fin-family-feed-layout.fin-fit-feed-space-layout
    > .fin-family-feed-main {
        max-width: 100%;
    }
}


/*
 * FIN — Natural Space Banner Images
 * v0.2.0 TEST
 *
 * Native Collection and Discussion Space banners.
 * Display each image at its original aspect ratio.
 *
 * Does not modify card thumbnails, post images,
 * Featured FIN grids, events, or course content.
 */

/* Native banner containers */
.portal-content-area.portal-content-type-collection
> .portal-item-featured-image-wrap,
.portal-content-area.portal-content-type-posts_discussion
> .portal-item-featured-image-wrap {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    overflow: visible !important;
}

/* Preserve the complete uploaded image */
.portal-content-area.portal-content-type-collection
> .portal-item-featured-image-wrap
> img.portal-item-featured-image,
.portal-content-area.portal-content-type-posts_discussion
> .portal-item-featured-image-wrap
> img.portal-item-featured-image {
    display: block !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center !important;
}
