/* =========================
       Video archive UI
       Clean rewrite (hero + search + facets)
       ========================= */

/* ---- HERO BANNER ---- */
.ky-video-hero{
    margin-top: -30px; /* cancels #Content padding-top */
    width: 100%;
    min-height: clamp(120px, 18vw, 220px);

    background-image: url('/wp-content/uploads/2026/02/Side-Plank-cropped-space.jpg');
    background-size: cover;
    background-position: center 20%;
    background-repeat: no-repeat;

    position: relative;
    display: flex;
    align-items: center;
}

.ky-video-hero::before{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    /* Optional overlay, uncomment if you need more contrast */
    /* background: linear-gradient(to right, rgba(255,255,255,0.55), rgba(255,255,255,0)); */
}

.ky-video-hero__inner{
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 22px 20px;
    text-align: left;
}

.ky-video-hero__title{
    font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
    font-weight: 700;
    font-size: clamp(20px, 3.2vw, 40px);
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: #1e2328;
    margin: 0 0 14px 0;
    margin: 0 0 8px;
}

.ky-video-hero__blurb{
    margin: 0;
    width: min(40%, 900px);
    text-align: left;
}


/* ---- FACETWP GLOBAL (archive scoped) ---- */
.ky-search-bar .facetwp-facet {
    flex: 1 1 auto;
    min-width: 0; /* critical in flex layouts */
}

.ky-search-filters .facetwp-facet {
    margin-bottom: 4px;
    margin-right: 60px !important;
}

.facetwp-type-checkboxes .facetwp-counter{ display:none; }

.ky-videos-results.facetwp-template {
    gap: 20px;
    display: grid;
}

/* ---- SEARCH SHELL LAYOUT ---- */
.ky-search-shell{
    position: relative;
    max-width: 900px;
    margin: 18px auto;

}

.ky-search-bar{
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.ky-search-shell .facetwp-facet-video_search{
    flex: 1 1 auto;
    margin: 0;
    min-width: 260px;

    width: 100%;
}

/* Input wrap is the positioning context for icons */
.ky-search-shell .facetwp-input-wrap{
    position: relative;
    display: block;
    width: 100%;
}

/* Search input */
.ky-search-shell .facetwp-search{
    width: 100%;
    /* height: 62px; */
    padding: 16px 92px 16px 18px;
    border-radius: 999px;
    font-size: clamp(0.9rem, 1.2rem, 1.5rem);
    /* line-height: 1.3em; */
    border: 1px solid rgba(0, 0, 0, 0.14);
    background: #fff;
    box-sizing: border-box;
}

input.facetwp-search::placeholder {
    opacity: 1;
    color: #999;
    font-size: 1em !important;
}

input.facetwp-search:focus::placeholder {
    opacity: 0.3;
}

/* Magnifier icon */
.ky-search-shell .facetwp-icon{
    right: 82px;
    top: 50%;
    transform: translateY(-50%);
    height: 32px;
    width: 32px;
    opacity: 0.55;
    z-index: 100;
}

.ky-search-shell .facetwp-icon:before{
    width: 32px;
    height: 32px;
    background-position: 50% 50%;
    background-size: 24px 24px;
}

/* Clear X icon */
.ky-search-shell .ky-search-clear{
    position: absolute;
    right: 120px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: none; /* JS toggles */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(0,0,0,0.6);
    opacity: 0.55;
}

.ky-search-shell .ky-search-clear:hover{
    background: rgba(0,0,0,0.06);
    color: rgba(0,0,0,0.8);
    opacity: 1;
}

/* Filters toggle button (chip-like) */
.ky-search-shell button.ky-filters-toggle{
    appearance: none;
    -webkit-appearance: none;

    background: transparent;
    box-shadow: none;
    border: 1px solid rgba(0,0,0,0.14);
    border-radius: 999px;

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

    color: rgba(0,0,0,0.70);
    cursor: pointer;

    margin: 0;
    text-transform: none;
    letter-spacing: 0;

    position: absolute;
    right: 10px;
    display: block;
}

.ky-search-shell button.ky-filters-toggle[aria-expanded="true"]{
    background: rgba(0,152,182,0.10);
    border-color: rgba(0,152,182,0.35);
    color: rgb(0,152,182);
}

.ky-search-shell button.ky-filters-toggle:focus{
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,151,183,0.22);
}

/* ---- FILTERS PANEL (no layout-bounce) ---- */
.ky-search-shell .ky-search-filters{
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 12px);
    z-index: 100;

    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.08);
    background: rgba(255,255,255,0.96);

    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    visibility: hidden;

    transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
}

.ky-search-shell.is-open .ky-search-filters{
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;

    transition: opacity 180ms ease, transform 180ms ease;
}

/* Panel inner layout */
.ky-filter-grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 0px;
    align-items: start;
}

.ky-filter-group{
    position: relative;
    padding-top: 5px;
    border-top: 1px solid rgba(0,0,0,0.06);
    min-width: 0;
}

.ky-filter-group:first-child{
    border-top: 0;
    padding-top: 0;
}
.ky-filter-group:nth-child(2) {padding-right: 20px !important;}
.ky-filter-group:nth-child(2) .ky-filter-clear {right:10px}
.ky-filter-group:nth-child(3) {
    border-left: 1px solid #f0f0f0;
    padding-left: 10px;
}
/* Full-width rows */
.ky-filter-group:nth-child(1),
.ky-filter-group:nth-child(4),
.ky-filter-group:nth-child(5),
.ky-filter-group:nth-child(6),
.ky-filter-group:nth-child(7){
    grid-column: 1 / -1;
}

/* Keep actions full width too */
.ky-filter-actions{
    grid-column: 1 / -1;
    border-top: 0;
    padding-top: 0;
}
.ky-filter-label{
    font-family: "Montserrat","Lato",Arial,sans-serif;
    font-size: clamp(0.78rem, 1.2vw, 0.9rem);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.55);
    margin: 2px 0 2px 2px;
}

.ky-filter-actions{
    border-top: 0;
    padding-top: 0;
}

.ky-filter-clear{
    position: absolute;
    right: 0;
    top: 40px;
    display: inline-block;
    margin-left: 4px;
}

/* Link styling (clear + change) */
.facetwp-toggle,
.ky-filter-clear,
.ky-active-filters__change{
    font-size: clamp(0.8rem, 0.9vw, 0.9rem);
    color: #5a9fb2;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.ky-filter-clear:hover,
.ky-active-filters__change:hover{
    text-decoration: underline;
}

/* ---- FACET GROUP ROW (if used elsewhere) ---- */
.post-type-archive-ky_videos .ky-facets{
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    margin: 14px 0 18px;
}

/* ---- CHIPS (FacetWP checkbox chips + active chips) ---- */
.post-type-archive-ky_videos .facetwp-type-checkboxes .facetwp-checkbox  {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid #d7e5e8;
    background: #d7e5e86b;
    color: #0e1922;

    font-family: "Montserrat","Lato",Arial,sans-serif;
    font-size: clamp(12px, 1.6vw, 13px);
    font-weight: 600;
    line-height: 1;

    margin: 0 8px 8px 0;
    cursor: pointer;
    user-select: none;
}


.post-type-archive-ky_videos .facetwp-type-checkboxes .facetwp-checkbox:hover{
    background: #d2e3e6;
    border-color: #d2e3e6;
}

.post-type-archive-ky_videos .facetwp-type-checkboxes .facetwp-checkbox.checked{
    background: #0098b6;
    border-color: #0098b6;
    color: #fff;
}

/* Active chips (selected summary row) */
.ky-active-chip, .button-flat .ky-active-chip   {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 6px 7px 10px;
    border-radius: 999px;
    border: 1px solid #0098b6;
    font-family: "Montserrat","Lato",Arial,sans-serif;
    font-size: clamp(12px, 1.6vw, 13px);
    font-weight: 600;
    line-height: 1;
    margin: 0;
    cursor: pointer;
    user-select: none;
    gap: 0 10px;
    background: #0098b6;
    color: #fff;
}

.ky-active-chip__x{
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 18px;
    height: 18px;
    border-radius: 999px;

    font-size: clamp(16px, 2vw, 18px);
    opacity: 0.9;
}

/* ---- ACTIVE FILTERS ROW ---- */
.ky-active-filters{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
}

.ky-active-filters__row{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.ky-active-filters[hidden]{ display:none !important; }

/* ---- DURATION SLIDER (your wrap fix) ---- */
.facetwp-facet-duration .facetwp-slider-label::after{
    content: " mins";
    margin-left: 2px;
}

.facetwp-facet-duration .facetwp-slider-wrap{
    position: relative;
    display: block;
    padding-bottom: 0;
}

.facetwp-facet.facetwp-facet-duration.facetwp-type-slider{
    width: 100px;
}

.facetwp-facet-duration .facetwp-slider-wrap-bottom{
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.facetwp-facet-duration .facetwp-slider-label{
    white-space: nowrap;
    opacity: 0.7;
    font-size: 14px;
}

.facetwp-facet-duration .facetwp-slider-reset{
    appearance: none;
    background: transparent;
    border: 0;
    padding: 0;

    color: rgba(0,0,0,0.6);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin: 0 !important;
}

.facetwp-facet-duration .facetwp-slider-reset:hover{
    color: rgba(0,0,0,0.8);
    text-decoration: underline;
}

input.facetwp-slider-reset{ display:none; }

.facetwp-facet-duration .noUi-connect{
    background: #dee9ee;
}

/* ---- NUMBER RANGE ---- */
.post-type-archive-ky_videos .facetwp-type-number_range input[type="text"],
.post-type-archive-ky_videos .facetwp-type-number_range input[type="number"]{
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 16px;
    width: 110px;
    background: #fff;
}

.post-type-archive-ky_videos .facetwp-type-number_range .facetwp-submit{
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    background: #fff;
    cursor: pointer;
}

.post-type-archive-ky_videos .facetwp-type-number_range .facetwp-submit:hover{
    background: #e5edef;
}

/* ---- DURATION BUCKET CHIPS (if separate facet) ---- */
.facetwp-facet-duration_bucket .facetwp-checkbox{
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: clamp(6px, 1.4vw, 7px) 12px;
    border-radius: 999px;

    font-family: "Montserrat","Lato",Arial,sans-serif;
    font-size: clamp(13px, 1.9vw, 14px);
    font-weight: 600;
    line-height: 1;

    background: #d7e5e86b;
    border: 1px solid #d7e5e8;
    color: #0e1922;

    cursor: pointer;
    margin-right: 10px;
}

.facetwp-facet-duration_bucket .facetwp-checkbox.checked{
    background: #0098b6;
    border-color: #0098b6;
    color: #fff;
}

/* ---- RESET BUTTON (chip style) ---- */
.post-type-archive-ky_videos .facetwp-type-reset{ display:block; }

.post-type-archive-ky_videos .facetwp-reset{
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 7px 12px;
    border-radius: 999px;

    border: 1px solid #b9d9e0;
    background: transparent;
    color: #046f86;

    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

.post-type-archive-ky_videos .facetwp-reset:hover{
    background: #b9d9e0;
    border-color: #89b6bf;
    color: #0e1922;
}

/* ---- LOAD MORE ---- */
.ky-facetwp-load-more{
    display: flex;
    justify-content: center;
    margin: 30px 0 20px;
    width: 100%;
}

.ky-facetwp-load-more .facetwp-load-more{
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 44px;
    height: 44px;
    padding: 0 14px;

    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.12);

    background: #90c2ce;
    border-color: #6caab8;
    color: #fff;

    text-decoration: none;
    font-weight: 600;
    line-height: 1;

    box-shadow: 0 6px 16px rgba(0,0,0,0.14);
    transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.ky-facetwp-load-more .facetwp-load-more:hover{
    transform: translateY(-1px);
}

.ky-video-archive-intro {
    max-width: 900px;
    margin: 10px auto;
    text-align: center;
    font-size: 1.3rem;
    line-height: 1.7;
    color: var(--ky-navy-muted);
}
.ky-video-archive-description {
    max-width: 900px;
    margin: 10px auto;
    text-align: left;
    font-size:1rem;
    line-height: 1.7;
}

/* ---- PACE/STYLE PILLS (compact) ---- */
.ky-style-nav{
    /*max-width: 900px;*/
    margin: 6px auto 18px;
    text-align: center;
}

.ky-style-nav__title{ /* in main stylesheet */}

.ky-style-nav__chips{
    justify-content: center;
    margin: 0;
}

.ky-style-nav__desc{
    margin-top: 10px;
    font-size: 14px;
    color: rgba(0,0,0,0.62);
    line-height: 1.35;
}

/* --- NO VIDEOS FOUND -- */
.ky-no-results-actions {
    display: block;
    text-align: center;
}
.ky-no-results-actions__buttons {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: center;
    justify-items: center;
    align-items: center;
    align-content: center;
    width: auto;
    margin: 20px auto;
    gap: 40px;
}
.ky-no-results-actions__buttons .ky-clear-search    {
    cursor: pointer;
}

/* ---- ALWAYS SCROLLABLE PILL ROW ---- */

.ky-chip-row-scroll{
    display: flex;
    flex-wrap: nowrap;        /* never wrap */
    gap: 10px;
}


.ky-chip-row-scroll::-webkit-scrollbar{
    display: none; /* Chrome/Safari hide */
}

.ky-chip-row-scroll .ky-chip{
    flex: 0 0 auto;           /* prevent shrinking */
    white-space: nowrap;      /* prevent text wrap */
    margin: 0;                /* override any margin from base chip style */
    scroll-snap-align: start; /* optional */
}

.ky-style-nav__chips{
    position: relative;
}
.ky-style-pill.ky-button-primary {
    min-width: 150px;
    font-size: 14px;
    line-height: 18px;
    padding-left: 10px;
    padding-right: 10px;
}
.ky-style-pill.ky-button-primary.ky-chip-active {
    background: #6caab8;
}
.video-series-block .video-boxes, .ky-videos-results .video-boxes, .ky-results-area .video-boxes {
    display: grid;
    /* grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); */
    gap: 30px;
    grid-auto-rows: masonry;
    margin: 0;
    padding: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ky-results-toolbar{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin: 18px 0 18px;
    flex-wrap: wrap;
}

.ky-results-toolbar__count{
    font-size: 0.95rem;
    color: rgba(0,0,0,0.65);
}

.ky-results-toolbar__sort{
    display: flex;
    align-items: center;
    gap: 10px;
}

.ky-results-toolbar__label{
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.55);
}

.ky-results-toolbar .facetwp-facet{
    margin-bottom: 0;
}
.facetwp-counts {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    /* text-transform: uppercase; */
    color: rgba(0, 0, 0, 0.55);
}

.ky-results-area,.ky-results-toolbar {
    display: none;
}
body.ky-show-results .ky-results-area {
    display: block;
}
body.ky-show-results .ky-style-nav   {
    display: none;
}
.ky-show-results-active-chip .ky-style-nav {
    display: none;
}
body.ky-show-results .ky-results-toolbar, body.ky-show-results-active-chip .ky-results-toolbar  {
    display: flex;
}
body.ky-show-results .ky-landing-sections {
    display: none;
}

@media (max-width: 1100px) {
    .video-series-block .video-boxes, .ky-videos-results .video-boxes, .ky-results-area .video-boxes {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Scrollable with no box shadow */
    .ky-chip-row-scroll {
        padding-bottom: 6px;
        overflow-x: auto;         /* allow horizontal scroll */
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch; /* smooth on iOS */
        scroll-snap-type: x proximity; /* optional but nice */
        scrollbar-width: none; /* Firefox hide */
    }

    .ky-chip-row-scroll .ky-style-pill.ky-button-primary:hover    {
        box-shadow: none;
    }
}



@media (max-width: 360px) {

    .video-series-block .video-boxes, .ky-videos-results .video-boxes, .ky-results-area .video-boxes {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 500px) {

    input.facetwp-search:focus::placeholder, input.facetwp-search::placeholder {
        opacity: 0 !important;
    }
}

@media (max-width: 767px) {
    .video-series-block .video-boxes, .ky-videos-results .video-boxes, .ky-results-area .video-boxes {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .ky-style-nav__chips .ky-chip-row {
        flex-wrap: wrap;
        justify-content: center;
    }

    .ky-results-toolbar{
        align-items: stretch;
    }

    .ky-results-toolbar__sort{
        width: 100%;
        justify-content: space-between;
    }

    .ky-video-hero__inner{ padding: 18px 16px; }
    .ky-video-hero__blurb{ display: none; }

    .ky-style-pill.ky-button-primary {
        min-width: auto;
        font-size: 12px;
        line-height: 12px;
        padding-left: 8px;
        padding-right: 8px;
    }
    .ky-filter-grid{
        grid-template-columns: 1fr;
    }

    .ky-filter-group,
    .ky-filter-actions{
        grid-column: auto !important;
    }

    .ky-filter-group:nth-child(2) {padding-right: 0px !important;}
    .ky-filter-group:nth-child(2) .ky-filter-clear {right:0px}
    .ky-filter-group:nth-child(3) {
        border-left: none;
        padding-left: 0px;
    }
}