/* UK Tropical Fish - video-first layer for the Nine theme (loads after theme.css) */

:root {
    --vf-green: #15803d;
    --vf-ink: #14263a;
    --vf-overlay: rgba(0, 0, 0, 0.62);
}

/* ---------- shared badge ---------- */
.vf-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--vf-overlay);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    pointer-events: none;
}

/* ---------- LISTING PAGE: video hero ---------- */
.listing-details .media-section.vf-has-video .carousel-item {
    background: transparent;
}

.listing-details .vf-frame {
    position: relative;
}

/* the theme gives .video-js a fixed 420px height - the frame takes the clip's own ratio instead */
.listing-details .vf-frame.vf-sized {
    position: relative;
    height: auto !important;
    aspect-ratio: var(--vf-ratio);
    width: min(100%, calc(78vh * var(--vf-ratio-n))) !important;
    max-height: 78vh;
    margin: 0 auto;
    background-color: transparent;
    border-radius: 14px;
    overflow: hidden;
}

.listing-details .vf-frame.vf-sized video,
.listing-details .vf-frame.vf-sized .video-js {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    background-color: transparent;
}

.listing-details .vf-badge-live {
    top: 14px;
    left: 14px;
    background: var(--vf-green);
}

.listing-details .vf-badge-live.vf-badge-old {
    background: var(--vf-overlay);
}

.vf-sound {
    position: absolute;
    left: 50%;
    bottom: 64px;
    transform: translateX(-50%);
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: var(--vf-overlay);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.vf-sound:hover,
.vf-sound:focus-visible {
    background: rgba(0, 0, 0, 0.8);
}

/* thumbnails strip: smaller, so the video owns the space */
.listing-details .vf-has-video .carousel-indicators [data-bs-target] {
    width: 84px;
    height: 84px;
}

/* ---------- LISTING PAGE: sticky buy bar ---------- */
.vf-buybar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    background: #fff;
    border-top: 1px solid #e3e9f1;
    box-shadow: 0 -4px 16px rgba(20, 38, 58, 0.08);
    transform: translateY(110%);
    transition: transform 0.22s ease;
}

.vf-buybar.vf-show {
    transform: translateY(0);
}

.vf-buybar-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.vf-buybar-info {
    flex: 1 1 auto;
    min-width: 0;
}

.vf-buybar-title {
    display: block;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vf-buybar-price {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0c579b;
    white-space: nowrap;
}

.vf-buybar-btn {
    min-height: 46px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    font-weight: 600;
    white-space: nowrap;
}

body.vf-buybar-on {
    padding-bottom: 72px;
}

@media (max-width: 575.98px) {
    .vf-buybar-title { display: none; }
    .vf-buybar-btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .vf-buybar { transition: none; }
}

/* ---------- CARDS: video preview ---------- */
/* badge is rendered by partials/listing-card.phtml, so position it before JS runs */
.listings-cards .card-img > a {
    position: relative;
    display: block;
}

.listings-cards .vf-badge-fresh {
    background: var(--vf-green);
}

.listings-cards .vf-thumb {
    position: relative;
    display: block;
    overflow: hidden;
}

.listings-cards .vf-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 2;
    pointer-events: none;
}

.listings-cards .vf-thumb.vf-playing .vf-preview {
    opacity: 1;
}

.listings-cards .vf-thumb.vf-playing .vf-badge {
    background: var(--vf-green);
}

/* photo-only cards sit back a little so video listings stand out */
.listings-cards .card.vf-no-video .card-img-top {
    filter: saturate(0.85);
}

@media (prefers-reduced-motion: reduce) {
    .listings-cards .vf-preview { transition: none; }
}

/* ---------- dark mode ---------- */
.dark .vf-buybar {
    background: #1b1f24;
    border-top-color: #2c333b;
}

.dark .vf-buybar-price {
    color: #74b5f8;
}


/* Watch Fish in Motion portrait rail */
.vf-motion-rail{overflow:hidden}.vf-motion-rail .listings-cards{display:flex!important;gap:16px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;scrollbar-width:none;padding:3px 4px 14px}.vf-motion-rail .listings-cards::-webkit-scrollbar{display:none}.vf-motion-rail .listing-card{position:relative;flex:0 0 clamp(235px,29vw,350px)!important;width:clamp(235px,29vw,350px)!important;height:clamp(420px,48vw,570px);overflow:hidden;scroll-snap-align:start;border:0;border-radius:18px;background:#102b36;box-shadow:0 12px 30px rgba(8,36,43,.18)}.vf-motion-rail .listing-card .card-img,.vf-motion-rail .listing-card .vf-thumb,.vf-motion-rail .listing-card .card-img-top,.vf-motion-rail .listing-card .vf-preview{display:block;width:100%;height:100%;object-fit:cover}.vf-motion-rail .listing-card .vf-badge{top:12px;left:12px}.vf-motion-rail .listing-card .card-body{position:absolute;z-index:4;inset:auto 0 0;min-height:43%;padding:62px 16px 66px;color:#fff;background:linear-gradient(0deg,rgba(4,19,25,.96) 7%,rgba(4,19,25,.71) 63%,transparent 100%);pointer-events:none}.vf-motion-rail .listing-card .card-seller{margin:0 0 7px;color:rgba(255,255,255,.82);font-size:12px}.vf-motion-rail .listing-card .reputation-score,.vf-motion-rail .listing-card .card-short-description,.vf-motion-rail .listing-card .card-details,.vf-motion-rail .listing-card>.btn-wishlist-async{display:none!important}.vf-motion-rail .listing-card .card-title{margin:0 0 8px;font-size:17px;line-height:1.2}.vf-motion-rail .listing-card .card-title a{color:#fff;text-decoration:none}.vf-motion-rail .listing-card .au-price{color:#baf4d1;font-weight:800;font-size:18px}.vf-motion-rail .listing-card .card-footer{position:absolute;z-index:5;right:14px;bottom:14px;margin:0;padding:0;border:0;background:transparent}.vf-motion-rail .listing-card .card-footer .btn{border:0;border-radius:999px;padding:9px 14px;color:#102b36;background:#fff;font-weight:700}.vf-motion-rail .vf-motion-clone{user-select:none}@media(max-width:575.98px){.vf-motion-rail .listings-cards{gap:12px}.vf-motion-rail .listing-card{flex-basis:78vw!important;width:78vw!important;height:126vw;max-height:560px}.vf-motion-rail .listing-card .card-body{padding:68px 15px 66px}}
