/* Property Stories: the vertical feed (roadmap stage 7.1). */

/* One card fills the viewport below the navbar and snaps into place, so a
   thumb-flick lands on a story rather than between two. */
.st-feed {
    --st-nav: 64px;
    height: calc(100vh - var(--st-nav));
    height: calc(100dvh - var(--st-nav));
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    background: #05070a;
    scrollbar-width: none;
}

.st-feed::-webkit-scrollbar { display: none; }

.st-card {
    position: relative;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.st-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Until the first frame arrives this is what is on screen, so it is a
       stage rather than a black hole. */
    background: linear-gradient(160deg, #10221b 0%, #05070a 60%);
}

/* The type sits on video, so it needs its own floor to stand on. */
.st-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5, 7, 10, 0.92) 0%, rgba(5, 7, 10, 0.55) 30%,
                rgba(5, 7, 10, 0) 62%);
    pointer-events: none;
}

.st-sound {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(5, 7, 10, 0.55);
    color: #fff;
    font-size: 1rem;
    display: grid;
    place-items: center;
}

/* Only while the clip is stopped, so it never sits over moving video. */
.st-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 68px;
    border: 0;
    border-radius: 50%;
    background: rgba(5, 7, 10, 0.5);
    color: #fff;
    font-size: 2rem;
    display: none;
    place-items: center;
    padding-left: 5px;
}

.st-card.is-paused .st-play { display: grid; }

.st-body {
    position: relative;
    width: 100%;
    max-width: 620px;
    padding: 0 18px 26px;
    color: #fff;
}

.st-sponsored {
    display: inline-block;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 3px 9px;
    border-radius: 999px;
    margin-bottom: 8px;
}

.st-price { font-size: 1.6rem; font-weight: 800; margin: 0 0 2px; }
.st-price small { font-size: 0.85rem; font-weight: 600; opacity: 0.8; }

.st-where { margin: 0 0 8px; font-size: 0.95rem; font-weight: 700; }
.st-where span { display: block; font-size: 0.82rem; font-weight: 500; opacity: 0.85; }
.st-caption { font-size: 0.86rem; opacity: 0.9; margin: 0 0 12px; }

.st-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.st-viewing-form { margin: 0; display: contents; }

.st-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.83rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    white-space: nowrap;
}

.st-btn:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }
.st-btn-main { background: #008751; border-color: #008751; }
.st-btn-main:hover { background: #00a763; }

/* Whose tour this is. A row rather than a line of text, because it is a
   destination now: the face and the name open that agent's page, where the
   rest of their work is. */
.st-agent {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    text-decoration: none;
    transition: background 0.18s ease;
}

.st-agent:hover,
.st-agent:focus-visible {
    background: rgba(255, 255, 255, 0.20);
    color: #fff;
}

.st-agent-face {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 38px;
    border: 2px solid rgba(255, 255, 255, 0.85);
    background: #fff;
}

.st-agent-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #008751;
    font-weight: 800;
}

.st-agent-name {
    display: flex;
    flex-direction: column;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.2;
    min-width: 0;
}

.st-agent-name small {
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0.75;
}

.st-agent-name .bi-patch-check-fill { color: #2ed573; font-size: 0.8rem; }

.st-agent-plain { font-size: 0.76rem; opacity: 0.75; margin: 0; }

.st-empty {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #fff;
    text-align: center;
    padding: 24px;
}

.st-empty h1 { font-size: 1.3rem; font-weight: 800; margin: 10px 0 0; }
.st-empty p { opacity: 0.75; font-size: 0.9rem; }

/* On a wide screen the video is still portrait, so the card is centred on a
   dark stage rather than stretched into a letterbox. */
@media (min-width: 768px) {
    .st-card { justify-content: center; }
    .st-video { max-width: 460px; left: 50%; transform: translateX(-50%); }
    .st-shade { max-width: 460px; left: 50%; transform: translateX(-50%); }
    .st-body { max-width: 460px; }
}


/* ------------------------------------------------------------------------
   The Property Tours filter: a floating button top-right, over the video,
   and the panel it opens. Top-right because the bottom of the screen already
   carries the price, the actions and the agent - a thumb reaching down there
   is reaching for those.
   ------------------------------------------------------------------------ */
.tf-fab {
    position: fixed;
    top: 76px;
    right: 16px;
    z-index: 1030;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 0;
    background: rgba(18, 24, 36, 0.78);
    color: #fff;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    transition: transform 0.15s ease, background 0.15s ease;
}

.tf-fab:hover,
.tf-fab:focus-visible { background: #008751; transform: scale(1.05); }

.tf-fab.is-on { background: #008751; }

/* A filter is on: said with a dot, so the feed never looks thinner than it
   is without a reason. */
.tf-dot {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffc107;
    border: 2px solid #008751;
}

.tf-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1040;
}

.tf-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    --tf-lift: 0px;
    width: min(380px, 100vw);
    z-index: 1045;
    background: #fff;
    color: #121824;
    padding: 20px 20px calc(96px + var(--tf-lift, 0px));
    overflow-y: auto;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.25);
}

.tf-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.tf-head h2 { font-size: 1.1rem; font-weight: 800; margin: 0; }

.tf-close {
    border: 0;
    background: #f1f3f5;
    width: 38px;
    height: 38px;
    border-radius: 50%;
}

.tf-group {
    border: 0;
    padding: 0;
    margin: 18px 0 0;
}

.tf-group legend {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 8px;
}

.tf-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.tf-chip input { position: absolute; opacity: 0; pointer-events: none; }

.tf-chip span {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 20px;
    border: 1px solid #dfe3e8;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tf-chip input:checked + span {
    background: #008751;
    border-color: #008751;
    color: #fff;
}

.tf-chip input:focus-visible + span { outline: 2px solid #008751; outline-offset: 2px; }

.tf-input {
    width: 100%;
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.95rem;
    margin-bottom: 8px;
    background: #fff;
}

.tf-row { display: flex; gap: 8px; }

.tf-actions {
    position: fixed;
    right: 0;
    /* Lifted clear of the cookie banner on a first visit; 0 after that. */
    bottom: var(--tf-lift, 0px);
    width: min(380px, 100vw);
    display: flex;
    gap: 10px;
    padding: 14px 20px;
    background: #fff;
    border-top: 1px solid #eef0f3;
    z-index: 1046;
}

.tf-clear {
    flex: 0 0 auto;
    padding: 11px 18px;
    border-radius: 10px;
    border: 1px solid #dfe3e8;
    color: #121824;
    text-decoration: none;
    font-weight: 600;
}

.tf-apply {
    flex: 1;
    border: 0;
    border-radius: 10px;
    background: #008751;
    color: #fff;
    font-weight: 700;
    padding: 11px 18px;
}

.tf-panel[hidden] + .tf-actions,
.tf-panel[hidden] .tf-actions { display: none; }

@media (max-width: 575.98px) {
    .tf-fab { top: 70px; right: 12px; }
}


/* "Swipe up for more tours": shown once, over the first clip. A full-screen
   video with nothing around it does not read as a list. */
.st-more {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 1020;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 16px;
    border-radius: 22px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    pointer-events: none;
    backdrop-filter: blur(4px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.st-more i {
    font-size: 1.1rem;
    animation: stNudge 1.6s ease-in-out infinite;
}

.st-more.is-gone {
    opacity: 0;
    transform: translate(-50%, 12px);
}

@keyframes stNudge {
    0%, 100% { transform: translateY(2px); }
    50%      { transform: translateY(-4px); }
}

/* The words still say it; only the nudging stops. */
@media (prefers-reduced-motion: reduce) {
    .st-more i { animation: none; }
}
