/**
 * UCB WP Grid Builder - Layout & Grid Styles
 * 
 * This file contains styles for LAYOUT (grid, positioning, facets, carousel).
 * Card appearance styles are in ucb-wpgb-cards.css which loads BEFORE this file.
 * 
 * Table of Contents:
 * 1. Facet Styles
 * 2. Tooltip System
 * 3. Dashboard Base Layout
 * 4. Search Header Layout
 * 5. Search Form Controls (Checkboxes, Selects)
 * 6. Below Search Area (Sort, View Toggle, Results)
 * 7. Term/Tag Styles
 * 8. Grid Template Layout
 * 9. Row Layout Variation
 * 10. Equal Height Card Rules
 * 11. Event Carousel - Single Card Mode
 * 12. Event Carousel - Grid/Multi-Card Mode
 * 13. Flickity Global Overrides
 * 14. Responsive / Media Queries
 */

/* ==========================================================================
   0. Grid Loading
   ========================================================================== */
/**
 * UCB Geolocation CSS - v3
 */

/* Hidden location facet - needed for JS filtering but not visible */
.ucb-hidden-facets {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Grid hidden until location determined */
[data-ucb-location-auto="true"] {
    opacity: 0;
    transition: opacity 0.4s ease-out;
}

/* Grid visible after location filter applied */
[data-ucb-location-auto="true"].ucb-geo-loaded {
    opacity: 1;
}

/* Loading state for grids */
.ucb-geo-loading {
    position: relative;
    pointer-events: none;
}

.ucb-geo-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: #333;
    border-radius: 50%;
    animation: ucb-geo-spin 0.8s linear infinite;
}

@keyframes ucb-geo-spin {
    to { transform: rotate(360deg); }
}
/* ==========================================================================
   1. Facet Styles
   ========================================================================== */

/* Load More Button */
.wpgb-facet.wpgb-facet-5 {
    text-align: center;
    margin-top: 20px;
}


/* ==========================================================================
   2. Tooltip System
   ========================================================================== */

.ucb-tooltip-wrap.center {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ucb-toolbar-button:hover {
    cursor: pointer;
}

/* Tooltip Base Styles */
.ucb-toolbar-button span.toolbar_tooltip,
.ucb-tooltip-wrap span.toolbar_tooltip {
    font-size: 16px !important;
    color: #fff !important;
    opacity: 0;
    visibility: hidden;
    left: -30px;
    position: absolute;
    top: 50px;
    background: rgba(0, 0, 0, 0.75);
    padding: 5px 10px !important;
    border-radius: 2px;
    color: #fff;
    width: auto;
    line-height: 1.3em;
    white-space: nowrap;
    z-index: -1;
    text-transform: none;
}

/* Tooltip Hover State */
.ucb-toolbar-button:hover .toolbar_tooltip,
.ucb-tooltip-wrap:hover .toolbar_tooltip {
    opacity: 1;
    z-index: 999;
    transition: all 500ms;
    transition-delay: 1s;
    visibility: visible;
}

/* Tooltip Arrow Base */
span.toolbar_tooltip.top::after,
span.toolbar_tooltip.bottom::after,
span.toolbar_tooltip.left::after,
span.toolbar_tooltip.right::after {
    content: "";
    position: absolute;
    border: 10px solid;
}

/* Tooltip Arrow - Top Position */
span.toolbar_tooltip.top::after {
    border-color: transparent transparent rgba(0, 0, 0, 0.75) transparent;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
}

/* Tooltip Arrow - Bottom Position */
span.toolbar_tooltip.bottom::after,
.single span.toolbar_tooltip.single_bottom::after {
    border-color: rgba(0, 0, 0, 0.75) transparent transparent transparent;
    top: auto;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
}

/* Tooltip Arrow - Left Position */
span.toolbar_tooltip.left::after,
.single span.toolbar_tooltip.left::after {
    content: "";
    position: absolute;
    border: 10px solid;
    border-color: transparent rgba(0, 0, 0, 0.75) transparent transparent;
    top: auto;
    left: -10px;
    transform: translateX(-50%);
}

/* Tooltip Arrow - Right Position */
span.toolbar_tooltip.right::after,
.single span.toolbar_tooltip.right::after {
    content: "";
    position: absolute;
    border: 10px solid;
    border-color: transparent transparent transparent rgba(0, 0, 0, 0.75);
    top: auto;
    right: -30px;
    transform: translateX(-50%);
}


/* ==========================================================================
   3. Dashboard Base Layout
   ========================================================================== */

.ucb-wpgb-lists-dashboard {
    position: relative;
    padding-bottom: 60px;
}

.ucb-wpgb-lists-dashboard .wpgb-select-placeholder input[type=text] {
    margin-bottom: 0 !important;
    border-style: none !important;
}

.ucb-wpgb-lists-dashboard .wpgb-facet.wpgb-facet-2 .wpgb-facet-title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ucb-wpgb-lists-dashboard .ucb-toolbar-button svg {
    fill: #777777;
    width: 100%;
    height: 100%;
}

.ucb-select-date-range {
    color: #111;
}
.wpgb-select-value span {
    color: #111;
    font-weight: 600;
    font-size: 16px;
}
/* ==========================================================================
   4. Search Header Layout
   ========================================================================== */

.ucb-wpgb-search-header {
    width: 100%;
}

/* Row Layout (Top, Middle, Bottom) */
.ucb-wpgb-search-header .ucb-wpgb-search-header-top-row,
.ucb-wpgb-search-header .ucb-wpgb-search-header-middle-row,
.ucb-wpgb-search-header .ucb-wpgb-search-header-bottom-row,
.ucb-wpgb-lists-dashboard .ucb-wpgb-below-search {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 30px;
    padding-bottom: 10px;
}

/* Top Row Facet Sizing */
.ucb-wpgb-search-header .ucb-wpgb-search-header-top-row>div.wpgb-facet:first-child {
    flex: 1 1 30%;
}

.ucb-wpgb-search-header .ucb-wpgb-search-header-top-row>div.wpgb-facet-10 {
    flex: 0 0 600px;
    padding: 0 0 0 10px;
}

/* Middle Row Facet Sizing */
.ucb-wpgb-search-header .ucb-wpgb-search-header-middle-row .wpgb-facet {
    flex: 1 1 10%;
    min-width: 190px;
}

.ucb-wpgb-search-header .ucb-wpgb-search-header-middle-row .wpgb-facet:empty {
    display: none;
}


/* ==========================================================================
   5. Search Form Controls (Checkboxes, Selects)
   ========================================================================== */

.ucb-wpgb-search-header .wpgb-facet select.wpgb-select:not([multiple]) {
    padding-inline-end: 0;
}

.ucb-wpgb-search-header .wpgb-facet>fieldset:last-child {
    margin-bottom: 0;
}

/* Animated Checkboxes */
.ucb-wpgb-search-header .wpgb-facet .wpgb-checkbox-facet .wpgb-checkbox-control {
    width: 32px;
    height: 32px;
    border-radius: 60px;
}

.ucb-wpgb-search-header .wpgb-facet .wpgb-checkbox-facet .wpgb-checkbox[aria-pressed="true"] .wpgb-checkbox-control {
    border-color: #57919b;
    background-color: #57919b;
}

.ucb-wpgb-search-header .wpgb-facet .wpgb-checkbox-facet .wpgb-checkbox-control:after {
    height: 14px;
    width: 8px;
}

/* Hierarchical Checkbox List */
.ucb-wpgb-search-header .wpgb-facet .wpgb-hierarchical-list .wpgb-checkbox-label {
    display: flex;
    align-items: center;
}

.ucb-wpgb-search-header .wpgb-facet .wpgb-hierarchical-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.ucb-wpgb-search-header .wpgb-facet .wpgb-hierarchical-list li {
    margin: 5px !important;
}


/* ==========================================================================
   6. Below Search Area (Sort, View Toggle, Results)
   ========================================================================== */

.ucb-wpgb-lists-dashboard .ucb-wpgb-below-search {
    margin-bottom: 20px;
}

.ucb-wpgb-lists-dashboard .ucb-wpgb-below-search>div {
    flex: 1 1 25%;
}

.ucb-wpgb-lists-dashboard .ucb-wpgb-below-search>div.search-results-count {
    flex-basis: 20%;
}

/* Sort Controls */
.ucb-wpgb-lists-dashboard .ucb-wpgb-below-search>div.ucb-wpgb-sort {
    display: flex;
    justify-content: flex-end;
}

.ucb-wpgb-lists-dashboard .ucb-wpgb-below-search .ucb-wpgb-sort .wpgb-facet {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.ucb-wpgb-lists-dashboard .ucb-wpgb-below-search .ucb-wpgb-sort .wpgb-sort-facet {
    max-width: 160px;
}

.ucb-wpgb-lists-dashboard .ucb-wpgb-below-search .wpgb-facet .wpgb-facet-title {
    display: block;
    font-size: 16px;
    margin-bottom: 0;
}

.ucb-wpgb-lists-dashboard .ucb-wpgb-below-search .wpgb-facet fieldset {
    margin-left: 10px;
}

.ucb-wpgb-lists-dashboard .ucb-wpgb-below-search .wpgb-facet button.wpgb-reset {
    margin-bottom: 0;
    background-color: var(--ucb-accent-scheme-1);
    font-weight: 600;
    display: inline-block;
    padding: 10px 20px;
    font-family: inherit;
}
.ucb-wpgb-lists-dashboard .wpgb-search-facet .wpgb-input::placeholder {
    color: #767676 !important;
    opacity: 1 !important;
}
.ucb-wpgb-lists-dashboard .wpgb-search-facet .wpgb-input {
    color: #111 !important;
}
.ucb-wpgb-lists-dashboard .wpgb-select-placeholder input[type=text]::placeholder {
    color:  #767676 !important;
    opacity: 1 !important;
    font-weight: 400 !important;
}
.ucb-wpgb-lists-dashboard .wpgb-select-placeholder input[type=text] {
    color: #111 !important;
}
/* View Toggle Dropdown */
.ucb-wpgb-lists-dashboard .ucb-wpgb-below-search .search-view-dropdown-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    z-index: 9;
}
@media (max-width: 767px) {
    .ucb-wpgb-lists-dashboard .ucb-wpgb-below-search .search-view-dropdown-wrapper {
        display: none;
    }
}
.ucb-wpgb-lists-dashboard .ucb-wpgb-below-search .search-view-dropdown-wrapper label {
    margin-right: 5px;
}

/* View Toggle Icons */
.ucb-wpgb-lists-dashboard .ucb-wpgb-below-search .search-view-dropdown-wrapper .select-view-icons {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.ucb-wpgb-lists-dashboard .ucb-wpgb-below-search .search-view-dropdown-wrapper .select-view-icons .select-view-icon {
    width: 32px;
    height: 32px;
    display: flex;
    border-radius: 3px;
    box-shadow: 1px 1px 4px 1px rgb(0 0 0 / 36%);
    margin: 0 0 0 15px;
    padding: 4px;
    position: relative;
}

.ucb-wpgb-lists-dashboard .ucb-wpgb-below-search .search-view-dropdown-wrapper .select-view-icons .select-view-icon.select-carousel-icon {
    margin-right: 0;
    padding: 6px;
}
.ucb-wpgb-reset-facet {
    text-align: right;
}
@media (max-width: 767px) {
    .ucb-wpgb-reset-facet {
        text-align: center;
    }
    .ucb-wpgb-reset-facet button {
        width: 100%;
    }
}
/* Selected View State */
.ucb-wpgb-lists-dashboard .ucb-wpgb-below-search .search-view-dropdown-wrapper .select-view-icons .select-view-icon.selected_view {
    box-shadow: none;
    background-color: #14a1b6;
}

.ucb-wpgb-lists-dashboard .ucb-wpgb-below-search .search-view-dropdown-wrapper .select-view-icons .select-view-icon.selected_view svg path {
    fill: #fff;
}


/* ==========================================================================
   7. Term/Tag Styles
   ========================================================================== */

.ucb-terms-list .wpgb-block-term {
    margin-bottom: 0;
}

/* Specific Term Overrides by ID */
span.wpgb-block-term[data-id="64"] {
    /* background-color: #9D9DCC !important; */
    background-color: #71719d !important;
}

span.wpgb-block-term[data-id="62"] {
    display: none !important;
}


/* ==========================================================================
   8. Grid Template Layout
   ========================================================================== */

.ucb-event-grid-wrapper .wpgb-template.wp-grid-builder,
.ucb-event-carousel-wrapper.direction-row .flickity-slider .carousel-cell {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
    margin-bottom: 10px !important;
}

.ucb-event-grid-wrapper.column .wpgb-template.wp-grid-builder .wpgb-card,
.ucb-event-carousel-wrapper.direction-row .flickity-slider .carousel-cell .wpgb-card {
    flex: 0 0 calc(25% - 15px);
    max-width: calc(25% - 15px);
}

.ucb-event-carousel-wrapper.direction-column .flickity-slider .carousel-cell .wpgb-card,
.ucb-event-grid-wrapper.row .wpgb-template.wp-grid-builder .wpgb-card {
    flex: 1 1 100%;
    max-width: 100%;
}

/* ==========================================================================
   9. Row Layout Variation
   ========================================================================== */

/* Row layout changes card orientation to horizontal */
@media (min-width: 900px) {
    .ucb-event-grid-wrapper.row .wpgb-template.wp-grid-builder .wpgb-card .wpgb-card-inner {
        flex-direction: row-reverse;
    }

    .ucb-event-grid-wrapper.row .wpgb-template.wp-grid-builder {
        grid-template-columns: 1fr;
    }

    .ucb-event-grid-wrapper.row .wpgb-template.wp-grid-builder .wpgb-card-21 .wpgb-card-media {
        width: 66.6%;
        border-top-right-radius: 10px !important;
        border-bottom-right-radius: 10px !important;
        border-top-left-radius: 0 !important;
        border-bottom-left-radius: 0 !important;
    }

    .ucb-event-grid-wrapper.row .wpgb-template.wp-grid-builder .wpgb-card-21 .wpgb-card-media+.wpgb-card-content {
        width: 33.4%;
    }
}


/* ==========================================================================
   10. Equal Height Card Rules
   ========================================================================== */

/* These rules ensure cards stretch to equal heights within grid rows */
.wpgb-template .wpgb-card {
    display: flex;
    flex-direction: column;
}

.wpgb-template .wpgb-card-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.wpgb-template .wpgb-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.wpgb-template .wpgb-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.wpgb-template .wpgb-card-body {
    flex: 1;
}

/* Card media sizing */
.wpgb-template .wpgb-card-media {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.wpgb-template .wpgb-card-media-thumbnail {
    position: relative;
    width: 100%;
}

.wpgb-template .wpgb-card-media-thumbnail>div {
    background-size: cover;
    background-position: center;
}


/* ==========================================================================
   11. Event Carousel 
   ========================================================================== */

/* Wrapper */
.ucb-event-carousel-wrapper {
    margin: 0;
    position: relative;
    width: 100%;
}

/* Container */
.ucb-event-carousel {
    background: transparent;
    width: 100%;
}

.ucb-event-carousel.flickity-enabled {
    overflow: hidden;
}

/* Carousel Cells */
.ucb-event-carousel-wrapper.direction-column .flickity-slider .carousel-cell {
    display: block;
    width: 100%;
    margin-right: 0;
}

.ucb-event-carousel-wrapper.direction-column .flickity-slider .carousel-cell .wpgb-card {
    margin-bottom: 10px;
}

.ucb-event-carousel-wrapper.direction-column .flickity-slider .carousel-cell .wpgb-card:last-child {
    margin-bottom: 0;
}

/* Cards Fill Cells */
.ucb-event-carousel-wrapper.direction-column .flickity-slider .wpgb-card {
    margin: 0;
    width: 100%;
}

/* Card Media */
.ucb-event-carousel-wrapper.direction-column .flickity-slider .wpgb-ucb-carousel-card.wpgb-card-media {
    width: 100%;
}

/* Event Post Date */
.ucb-event-carousel-wrapper .wpgb-ucb-carousel-card .event-post-date {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    display: none;
}

.ucb-event-carousel-wrapper.show-date-block .wpgb-ucb-carousel-card .event-post-date {
    display: block;
    padding: 5px;
}

.ucb-event-carousel-wrapper.show-date-block .wpgb-ucb-carousel-card .event-post-date a {
    color: #111111;
    text-decoration: none;
}

/* Elementor Editor - Hide Non-First Cells */
.ucb-event-carousel-wrapper.direction-column .flickity-slider .elementor-editor-active .carousel-cell:not(:first-child) {
    display: none;
}

/* Grid carousel */
.ucb-event-carousel-wrapper.direction-row .flickity-slider .carousel-cell {
    padding: 0 5px;
}

/* Single Card Flickity Viewport */
.ucb-event-carousel-wrapper .flickity-slider .ucb-event-carousel-wrapper .flickity-viewport {
    overflow: hidden;
    width: 100%;
}

.ucb-event-carousel .flickity-viewport {
    transition: height 0.2s ease;
}

/* Single Card Flickity Slider */
.ucb-event-carousel .flickity-slider {
    display: flex;
    align-items: flex-start;
}

/* Single Card Navigation Buttons */
.ucb-event-carousel-wrapper .flickity-button {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.25;
    transition: all 0.4s ease-in-out;
}

.ucb-event-carousel-wrapper.small-nav .flickity-button {
    width: 25px;
    height: 25px;
}

.ucb-event-carousel-wrapper .flickity-button:hover {
    background: #fff;
    opacity: 1;
}

.ucb-event-carousel-wrapper .flickity-button-icon {
    fill: #111;
}

.ucb-event-carousel-wrapper .flickity-button:hover .flickity-button-icon {
    fill: #a52c24;
}

.ucb-event-carousel-wrapper .flickity-button:disabled {
    opacity: 0.3;
}

.ucb-event-carousel-wrapper .flickity-button.previous {
    left: 10px;
}

.ucb-event-carousel-wrapper.small-nav .flickity-button.previous {
    left: 3px;
}

.ucb-event-carousel-wrapper .flickity-button.next {
    right: 10px;
}

.ucb-event-carousel-wrapper.small-nav .flickity-button.next {
    right: 3px;
}

/* Single Card Page Dots */
.ucb-event-carousel-wrapper .flickity-page-dots {
    bottom: -10px;
    position: relative;
}

.ucb-event-carousel-wrapper .flickity-page-dots .dot {
    width: 12px;
    height: 12px;
    background: #ccc;
    border-radius: 50%;
    opacity: 1;
    margin: 0 8px;
}

.ucb-event-carousel-wrapper .flickity-page-dots .dot.is-selected {
    background: #333;
}


/* ==========================================================================
   12. Event Carousel - Grid/Multi-Card Mode
   ========================================================================== */

/* Grid Override for Carousel Mode */
.ucb-event-carousel-grid.wp-grid-builder {
    display: block !important;
    grid-template-columns: none !important;
}

/* Container */
.ucb-event-carousel-grid {
    width: 100%;
}

/* Carousel Cells - 4 Cards Desktop */
.ucb-event-carousel-grid .carousel-cell {
    width: 25%;
}

.ucb-event-carousel-grid .wpgb-card {
    margin: 0 10px;
}

/* Grid Flickity Viewport */
.ucb-event-carousel-grid .flickity-viewport {
    width: 100%;
    overflow: hidden;
}

/* Grid Flickity Slider */
.ucb-event-carousel-grid .flickity-slider {
    display: flex;
    padding-bottom: 20px !important;
}

/* Grid Navigation Buttons */
.ucb-event-carousel-grid .flickity-button {
    background: rgba(0, 0, 0, 0.6);
}

.ucb-event-carousel-grid .flickity-button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.ucb-event-carousel-grid .flickity-button .flickity-button-icon {
    fill: white;
}

.ucb-event-carousel-grid .flickity-prev-next-button {
    width: 44px;
    height: 44px;
}

.ucb-event-carousel-grid .flickity-prev-next-button.previous {
    left: 10px;
}

.ucb-event-carousel-grid .flickity-prev-next-button.next {
    right: 10px;
}

/* Grid Page Dots */
.ucb-event-carousel-grid .flickity-page-dots {
    bottom: -40px;
}

.ucb-event-carousel-grid .flickity-page-dots .dot {
    width: 12px;
    height: 12px;
    background: #333;
    opacity: 0.5;
}

.ucb-event-carousel-grid .flickity-page-dots .dot.is-selected {
    opacity: 1;
    background: #000;
}


/* ==========================================================================
   13. Flickity Global Overrides
   ========================================================================== */

/* Prevent Disabled Button Click-Through */
.flickity-button:disabled {
    pointer-events: all !important;
}

.flickity-button:disabled:hover {
    border: none !important;
}

/* ==========================================================================
   14. Responsive / Media Queries
   ========================================================================== */

/* ----- Grid Responsive ----- */
@media screen and (max-width: 1280px) {

    .ucb-event-grid-wrapper.column .wpgb-template.wp-grid-builder .wpgb-card,
    .ucb-event-carousel-wrapper.direction-row .flickity-slider .carousel-cell .wpgb-card {
        flex: 0 0 calc(33.333% - 14px);
        max-width: calc(33.333% - 14px);
    }
}

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

    .ucb-event-grid-wrapper.column .wpgb-template.wp-grid-builder .wpgb-card,
    .ucb-event-carousel-wrapper.direction-row .flickity-slider .carousel-cell .wpgb-card {
        flex: 0 0 calc(50% - 15px);
        max-width: calc(50% - 15px);
    }
}

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

    .ucb-event-grid-wrapper.column .wpgb-template.wp-grid-builder .wpgb-card,
    .ucb-event-carousel-wrapper.direction-row .flickity-slider .carousel-cell .wpgb-card {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* ----- Carousel Grid Responsive ----- */
@media (max-width: 1023px) {

    /* Tablet - 3 Cards */
    .ucb-event-carousel-grid .carousel-cell {
        width: 33.333%;
    }
}

@media (max-width: 767px) {

    /* Small Tablet - 2 Cards */
    .ucb-event-carousel-grid .carousel-cell {
        width: 50%;
    }
}

@media (max-width: 479px) {

    /* Mobile - 1 Card */
    .ucb-event-carousel-grid .carousel-cell {
        width: 100%;
    }
}


/* ==========================================================================
   15. Filmstrip Video Selector
   ========================================================================== */

/* --- 15.1 Variables & Container --- */
.ucb-filmstrip-wrapper {
    --filmstrip-bg: #1a1a1a;
    --filmstrip-bg-light: #2a2a2a;
    --filmstrip-accent: #a52c24;
    --filmstrip-text: #ffffff;
    --filmstrip-text-muted: #999999;
    --filmstrip-border: #333333;

    background: var(--filmstrip-bg);
    padding: 30px;
    position: relative;
}

.ucb-filmstrip-wrapper.theme-light {
    --filmstrip-bg: #f5f5f5;
    --filmstrip-bg-light: #ffffff;
    --filmstrip-text: #1a1a1a;
    --filmstrip-text-muted: #666666;
    --filmstrip-border: #dddddd;
}

.ucb-filmstrip-empty {
    color: var(--filmstrip-text-muted);
    padding: 60px 30px;
    text-align: center;
    font-size: 16px;
}


/* --- 15.2 Preview Area Layout --- */
.ucb-filmstrip-preview {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-bottom: 30px;
}

.ucb-filmstrip-preview-media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
}

.ucb-filmstrip-preview-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.ucb-filmstrip-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.ucb-filmstrip-preview-media:hover .ucb-filmstrip-preview-image {
    transform: scale(1.02);
}

/* Play Button Overlay */
.ucb-filmstrip-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: none;
}

.ucb-filmstrip-preview-media:hover .ucb-filmstrip-play-overlay {
    background: var(--filmstrip-accent);
    transform: translate(-50%, -50%) scale(1.1);
}

.ucb-filmstrip-play-icon {
    width: 40px;
    height: 40px;
    color: #fff;
    margin-left: 5px;
}

/* Duration Badge */
.ucb-filmstrip-duration-badge {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 3px;
    font-variant-numeric: tabular-nums;
}

.ucb-filmstrip-duration-badge:empty {
    display: none;
}


/* --- 15.3 Preview Info Panel --- */
.ucb-filmstrip-preview-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--filmstrip-text);
}

.ucb-filmstrip-preview-date {
    font-size: 14px;
    color: var(--filmstrip-text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ucb-filmstrip-preview-date:empty {
    display: none;
}

.ucb-filmstrip-preview-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 15px 0;
}

.ucb-filmstrip-preview-title a {
    color: var(--filmstrip-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.ucb-filmstrip-preview-title a:hover {
    color: var(--filmstrip-accent);
}

.ucb-filmstrip-preview-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: var(--filmstrip-text-muted);
    margin-bottom: 25px;
}

.ucb-filmstrip-preview-excerpt:empty {
    display: none;
}

/* Watch Now Button */
.ucb-filmstrip-watch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--filmstrip-accent);
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    padding: 14px 30px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.ucb-filmstrip-watch-btn:hover {
    background: #8a241e;
    transform: translateY(-2px);
}


/* --- 15.4 Filmstrip Navigation --- */
.ucb-filmstrip-nav-wrapper {
    position: relative;
    overflow: hidden;
}

.ucb-filmstrip-nav-wrapper .wpgb-template {
    background: transparent;
}

/* Flickity overrides for filmstrip */
.ucb-filmstrip-wrapper .flickity-viewport {
    overflow: visible;
}

.ucb-filmstrip-wrapper .flickity-button {
    background: var(--filmstrip-bg-light);
    border: 1px solid var(--filmstrip-border);
    width: 44px;
    height: 44px;
    border-radius: 0;
}

.ucb-filmstrip-wrapper .flickity-button:hover {
    background: var(--filmstrip-accent);
    border-color: var(--filmstrip-accent);
}

.ucb-filmstrip-wrapper .flickity-button-icon {
    fill: var(--filmstrip-text);
}

.ucb-filmstrip-wrapper .flickity-button:disabled {
    opacity: 0.3;
}

.ucb-filmstrip-wrapper .flickity-prev-next-button.previous {
    left: 0;
}

.ucb-filmstrip-wrapper .flickity-prev-next-button.next {
    right: 0;
}


/* --- 15.5 Filmstrip Responsive --- */
@media (max-width: 1200px) {
    .ucb-filmstrip-preview {
        grid-template-columns: 1fr 300px;
        gap: 25px;
    }

    .ucb-filmstrip-preview-title {
        font-size: 22px;
    }

    .ucb-filmstrip-wrapper .flickity-prev-next-button.previous {
        left: 10px;
    }

    .ucb-filmstrip-wrapper .flickity-prev-next-button.next {
        right: 10px;
    }
}

@media (max-width: 992px) {
    .ucb-filmstrip-wrapper {
        padding: 20px;
    }

    .ucb-filmstrip-preview {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ucb-filmstrip-preview-title {
        font-size: 20px;
    }

    .ucb-filmstrip-play-overlay {
        width: 60px;
        height: 60px;
    }

    .ucb-filmstrip-play-icon {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 768px) {
    .ucb-filmstrip-wrapper {
        padding: 15px;
    }

    .ucb-filmstrip-preview {
        margin-bottom: 20px;
    }

    .ucb-filmstrip-preview-title {
        font-size: 18px;
    }

    .ucb-filmstrip-preview-excerpt {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .ucb-filmstrip-watch-btn {
        width: 100%;
        padding: 12px 20px;
    }

    .ucb-filmstrip-wrapper .flickity-button {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .ucb-filmstrip-duration-badge {
        font-size: 12px;
        padding: 3px 6px;
    }

    .ucb-filmstrip-play-overlay {
        width: 50px;
        height: 50px;
    }

    .ucb-filmstrip-play-icon {
        width: 24px;
        height: 24px;
    }
}
/* ==========================================================================
   15.7 Filmstrip Lightbox & Buy Buttons
   ========================================================================== */

/* Read More Link */
.ucb-filmstrip-read-more {
    /* color: var(--filmstrip-accent); */
    color:#fff;
    text-decoration: underline;
    font-size: 14px;
    cursor: pointer;
    display: inline-block;
    margin-bottom: 15px;
}

.ucb-filmstrip-read-more:hover {
    color: #8a241e;
}

/* Preview Actions Container */
.ucb-filmstrip-preview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

/* Buy Buttons */
.ucb-filmstrip-buy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--filmstrip-accent);
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 24px;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.ucb-filmstrip-buy-btn:hover {
    background: #8a241e;
    transform: translateY(-2px);
}

.ucb-filmstrip-buy-btn.ucb-filmstrip-buy-ga {
    background: #57919b;
}

.ucb-filmstrip-buy-btn.ucb-filmstrip-buy-ga:hover {
    background: #4a7d86;
}

/* Watch Now button styling adjustment */
.ucb-filmstrip-preview-actions .ucb-filmstrip-watch-btn {
    background: transparent;
    border: 2px solid var(--filmstrip-text);
    color: var(--filmstrip-text) !important;
}

.ucb-filmstrip-preview-actions .ucb-filmstrip-watch-btn:hover {
    background: var(--filmstrip-text);
    color: var(--filmstrip-bg) !important;
}

/* --- Magnific Popup Lightbox Styles --- */

.ucb-filmstrip-mfp .mfp-container {
    padding: 20px;
}

.ucb-filmstrip-lightbox-popup {
    background: #fff;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    position: relative;
    border-radius: 4px;
}

.ucb-filmstrip-lightbox-popup .mfp-close {
    color: #333;
    font-size: 28px;
    right: 10px;
    top: 10px;
}

.ucb-lightbox-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #1a1a1a;
    line-height: 1.3;
}

.ucb-lightbox-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.ucb-lightbox-date,
.ucb-lightbox-location {
    font-size: 14px;
    color: #666;
}

.ucb-lightbox-date::before {
    content: '📅 ';
}

.ucb-lightbox-location::before {
    content: '📍 ';
}

.ucb-lightbox-content {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    margin-bottom: 30px;
}

.ucb-lightbox-content p {
    margin-bottom: 1em;
}

.ucb-lightbox-content p:last-child {
    margin-bottom: 0;
}

.ucb-lightbox-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.ucb-lightbox-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.ucb-lightbox-btn-livestream {
    background: #a52c24;
    color: #fff !important;
}

.ucb-lightbox-btn-livestream:hover {
    background: #8a241e;
}

.ucb-lightbox-btn-ga {
    background: #57919b;
    color: #fff !important;
}

.ucb-lightbox-btn-ga:hover {
    background: #4a7d86;
}

.ucb-lightbox-btn-link {
    background: transparent;
    border: 2px solid #333;
    color: #333 !important;
}

.ucb-lightbox-btn-link:hover {
    background: #333;
    color: #fff !important;
}

/* Magnific Popup Animation */
.ucb-filmstrip-lightbox-popup.mfp-with-anim {
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.mfp-ready .ucb-filmstrip-lightbox-popup.mfp-with-anim {
    opacity: 1;
    transform: translateY(0);
}

.mfp-removing .ucb-filmstrip-lightbox-popup.mfp-with-anim {
    opacity: 0;
    transform: translateY(-20px);
}

/* Responsive Lightbox */
@media (max-width: 768px) {
    .ucb-filmstrip-lightbox-popup {
        padding: 25px;
        margin: 10px;
    }
    
    .ucb-lightbox-title {
        font-size: 22px;
    }
    
    .ucb-lightbox-actions {
        flex-direction: column;
    }
    
    .ucb-lightbox-btn {
        width: 100%;
    }
}

/* Responsive Buy Buttons */
@media (max-width: 768px) {
    .ucb-filmstrip-preview-actions {
        flex-direction: column;
    }
    
    .ucb-filmstrip-buy-btn,
    .ucb-filmstrip-preview-actions .ucb-filmstrip-watch-btn {
        width: 100%;
    }
}

/* ==========================================================================
   16. Carousel Thumbnail Navigation
   ========================================================================== */

.ucb-event-carousel-wrapper.has-thumbs {
    /* Container adjustments when thumbs enabled */
}

.ucb-carousel-thumbs-wrapper {
    overflow: hidden;
    position: relative;
}

.ucb-carousel-thumbs-wrapper .wpgb-template {
    background: transparent;
}

/* Thumbnail card styling - inherits from Card 6 */
.ucb-carousel-thumbs-wrapper .wpgb-card-6 .wpgb-card-inner {
    background: transparent;
    box-shadow: none;
}

/* Hide duration badge on carousel thumbs */
.ucb-carousel-thumbs-wrapper .wpgb-card-6 .ucb-filmstrip-duration {
    display: none;
}

.ucb-carousel-thumbs-wrapper .wpgb-card-6 .wpgb-card-media-thumbnail img {
    filter: brightness(0.5);
    transition: filter 0.3s ease;
}

.ucb-carousel-thumbs-wrapper .wpgb-card-6:hover .wpgb-card-media-thumbnail img {
    filter: brightness(0.8);
}

.ucb-carousel-thumbs-wrapper .wpgb-card-6.is-active .wpgb-card-media-thumbnail img {
    filter: brightness(1);
}

/* Flickity nav for thumbs */
.ucb-carousel-thumbs-wrapper .flickity-button {
    background: rgba(0, 0, 0, 0.6);
    width: 36px;
    height: 36px;
}

.ucb-carousel-thumbs-wrapper .flickity-button:hover {
    background: var(--ucb-accent-scheme-1);
}

.ucb-carousel-thumbs-wrapper .flickity-button-icon {
    fill: #fff;
}

.ucb-carousel-thumbs-wrapper .flickity-prev-next-button.previous {
    left: 5px;
}

.ucb-carousel-thumbs-wrapper .flickity-prev-next-button.next {
    right: 5px;
}

/* Responsive thumb counts */
@media (max-width: 1200px) {
    .ucb-carousel-thumbs-wrapper .wpgb-card {
        /* Handled by inline styles, but fallback */
    }
}

@media (max-width: 768px) {
    .ucb-carousel-thumbs-wrapper .flickity-button {
        width: 30px;
        height: 30px;
    }
}