/* ══════════════════════════════════════════════════════
   Document Your Journey — CamsTeacher
   TikTok/Reels-style vertical video feed
   ══════════════════════════════════════════════════════ */

:root {
    --j-primary: #1d93d1;
    --j-primary-dark: #1578ab;
    --j-live-red: #e74c3c;
    --j-live-green: #27ae60;
    --j-radius: 12px;
    --j-radius-pill: 100px;
}

/* Force full-viewport immersive mode */
body.journey-page {
    overflow: hidden;
    background: #fff;
}

/* Option E — Diagonal Split background */
body.journey-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1d93d1 0%, #29ABE2 100%);
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 70%);
    z-index: 0;
    pointer-events: none;
}
body.journey-page::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(29,171,226,0.08) 0%, transparent 100%);
    clip-path: polygon(0 68%, 100% 43%, 100% 50%, 0 75%);
    z-index: 0;
    pointer-events: none;
}
body.journey-page main {
    margin: 0; padding: 0;
}
body.journey-page footer,
body.journey-page .whatsapp-widget,
body.journey-page .cookie-consent,
body.journey-page #wa,
body.journey-page .cky-consent-container,
body.journey-page .cky-btn-revisit-wrapper {
    display: none !important;
}
/* Prevent Video.js from styling our video elements */
body.journey-page .video-js,
body.journey-page .vjs-big-play-button,
body.journey-page .vjs-control-bar,
body.journey-page .vjs-loading-spinner,
body.journey-page .vjs-text-track-display,
body.journey-page .vjs-poster,
body.journey-page .vjs-modal-dialog {
    display: none !important;
}

/* ── Filter bar (hidden by default, shown when hashtag clicked) ── */
.journey-filter-bar {
    position: fixed;
    top: 70px; /* below header */
    left: 0; right: 0; z-index: 95;
    background: #fff;
    padding: 12px 16px;
    display: flex; gap: 10px; align-items: center;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    transition: transform .25s ease, opacity .25s ease;
    min-height: 48px;
    box-sizing: border-box;
}
.journey-filter-bar.jfilter-hidden {
    transform: translateY(-100%);
    opacity: 0; pointer-events: none;
}
.jfilter-clear {
    display: inline-flex; align-items: center; gap: 6px;
    background: #f2f2f2; color: #555;
    font-size: 13px; font-weight: 700;
    padding: 8px 14px;
    border-radius: var(--j-radius-pill);
    cursor: pointer; text-decoration: none;
    border: 1px solid #e0e0e0;
    transition: all .2s;
}
.jfilter-clear:hover { background: #e0e0e0; }
.jfilter-active-tag {
    display: inline-flex; align-items: center;
    background: var(--j-primary); color: #fff;
    font-size: 13px; font-weight: 700;
    padding: 8px 16px;
    border-radius: var(--j-radius-pill);
}

/* ── Feed container ── */
.journey-feed {
    position: fixed;
    top: 70px; /* just below header; shifts down when filter bar shows */
    left: 0; right: 0; bottom: 0;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: transparent;
    z-index: 1;
}
.journey-feed::-webkit-scrollbar { display: none; }
.journey-feed-inner {
    max-width: 440px;
    margin: 0 auto;
}

/* ── Video card ── */
.jvideo-card {
    position: relative;
    width: 100%;
    height: calc(100vh - 70px);
    height: calc(100svh - 70px);
    overflow: hidden;
    background: #000;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.jposter {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
}
.jmodel-silhouette {
    position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 60%; height: 70%;
    background: radial-gradient(ellipse at 50% 25%, rgba(255,255,255,.05) 0%, transparent 55%);
    pointer-events: none;
}

/* Video element */
.jvideo-el {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    background: #000;
    z-index: 1;
}

/* Bottom scrim */
.jvideo-card::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(transparent, rgba(0,0,0,.8));
    pointer-events: none; z-index: 2;
}

/* ── Play / Pause ── */
.jplay-overlay {
    position: absolute; inset: 0; z-index: 5;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none;
}
.jplay-btn { pointer-events: auto; }
.jplay-btn {
    width: 68px; height: 68px; border-radius: 50%;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,.3);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: transform .3s, opacity .3s;
    color: #fff;
}
.jplay-btn:hover { transform: scale(1.08); background: rgba(255,255,255,.25); }
.jplay-btn i { font-size: 24px; margin-left: 4px; }
.jvideo-card.playing .jplay-btn { opacity: 0; transform: scale(.5); pointer-events: none; }
.jvideo-card:not(.playing) .jplay-btn { opacity: 1; transform: scale(1); }

/* Progress bar */
.jprogress-bar {
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 3px; z-index: 10; background: rgba(255,255,255,.12);
    opacity: 0; transition: opacity .3s;
}
.jvideo-card.playing .jprogress-bar { opacity: 1; }
.jprogress-fill {
    height: 100%; width: 0%;
    background: var(--j-primary); border-radius: 0 2px 2px 0;
    transition: width .25s linear;
}

/* Equalizer bars — hidden */
.jeq-bars { display: none; }

/* Scroll hint */
.jscroll-hint {
    position: absolute; bottom: 64px; left: 50%; transform: translateX(-50%);
    z-index: 6; color: rgba(255,255,255,.35); font-size: 20px;
    animation: j-bounce 2s ease-in-out infinite;
    pointer-events: none;
}
@keyframes j-bounce {
    0%,100% { transform: translateX(-50%) translateY(0); opacity: .3; }
    50% { transform: translateX(-50%) translateY(8px); opacity: .6; }
}

/* ── Live badge ── */
.jlive-badge {
    position: absolute; top: 12px; left: 12px; z-index: 6;
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--j-live-red);
    color: #fff; font-size: 11px; font-weight: 900; text-transform: uppercase;
    padding: 6px 14px; border-radius: var(--j-radius-pill);
    letter-spacing: .8px;
    animation: j-pulse-live 1.5s ease-in-out infinite;
    cursor: pointer; text-decoration: none;
}
.jlive-badge.joffline {
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    animation: none; cursor: default; font-weight: 700;
}
.jlive-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; flex-shrink: 0; }
.jlive-badge.joffline .jlive-dot { background: #666; }
@keyframes j-pulse-live {
    0%,100% { box-shadow: 0 0 0 0 rgba(231,76,60,.5); }
    50% { box-shadow: 0 0 0 10px rgba(231,76,60,0); }
}

/* ── Meta badges ── */
.jvideo-meta-badges {
    position: absolute; top: 12px; right: 12px; z-index: 6;
    display: flex; flex-direction: column; gap: 6px; align-items: flex-end;
}
.jmeta-badge {
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    color: #fff; font-size: 11px; font-weight: 700;
    padding: 4px 8px; border-radius: 6px;
}

/* ── Card overlay (bottom-left info) ── */
.jcard-overlay {
    position: absolute; bottom: 16px; left: 0; right: 68px;
    z-index: 5; padding: 0 16px; color: #fff;
}
.joverlay-model {
    display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.joverlay-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--j-primary), var(--j-primary-dark));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 14px; font-weight: 900;
    flex-shrink: 0; border: 2px solid rgba(255,255,255,.3);
}
.joverlay-name { font-size: 15px; font-weight: 900; color: #fff; }
.joverlay-title {
    font-size: 13px; font-weight: 700; line-height: 1.3;
    margin-bottom: 8px; text-shadow: 0 1px 6px rgba(0,0,0,.6);
    color: #fff;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; text-overflow: ellipsis;
    word-break: break-word;
    max-width: 100%;
}
.joverlay-hashtags { display: flex; flex-wrap: wrap; gap: 6px; }
.joverlay-hashtag {
    display: inline-block;
    background: rgba(255,255,255,.12); color: #fff;
    font-size: 12px; font-weight: 700;
    padding: 5px 12px; border-radius: var(--j-radius-pill);
    cursor: pointer; text-decoration: none;
    transition: background .2s; border: 1px solid rgba(255,255,255,.1);
}
.joverlay-hashtag:hover { background: var(--j-primary); border-color: var(--j-primary); }

/* ── Right-side actions ── */
.jcard-actions-col {
    position: absolute; bottom: 16px; right: 10px; z-index: 6;
    display: flex; flex-direction: column; gap: 14px; align-items: center;
}
.jaction-icon {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    cursor: pointer; text-decoration: none; color: #fff; transition: transform .2s;
}
.jaction-icon:hover { transform: scale(1.15); }
.jaction-circle {
    width: 48px; height: 48px; border-radius: 50%;
    background: rgba(255,255,255,.25);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; border: 2px solid rgba(255,255,255,.3);
    transition: background .2s;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.jaction-circle:hover { background: rgba(255,255,255,.4); }
.jaction-circle.jlive-circle {
    background: var(--j-live-green); border-color: var(--j-live-green);
    animation: j-pulse-green 2s ease-in-out infinite;
}
.jaction-circle.joffline-circle {
    background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.25);
}
@keyframes j-pulse-green {
    0%,100% { box-shadow: 0 0 0 0 rgba(39,174,96,.4); }
    50% { box-shadow: 0 0 0 8px rgba(39,174,96,0); }
}
.jaction-label { font-size: 11px; font-weight: 900; text-shadow: 0 1px 4px rgba(0,0,0,.8); color: #fff; }

/* ── Floating CTAs ── */
.jfloating-cta {
    position: fixed;
    right: 0; top: 50%; transform: translateY(-50%);
    z-index: 90;
    display: flex; flex-direction: column; gap: 0;
}
.jcta-float {
    display: flex; align-items: center; gap: 6px;
    padding: 9px 12px 9px 10px;
    font-size: 11px; font-weight: 900;
    text-decoration: none; color: #fff;
    cursor: pointer; border: none;
    white-space: nowrap;
    letter-spacing: .3px;
    transition: padding-right .25s, box-shadow .25s;
    position: relative; overflow: hidden;
}
.jcta-float i { font-size: 16px; flex-shrink: 0; position: relative; z-index: 1; }
.jcta-float-label { position: relative; z-index: 1; }
.jcta-float-model {
    background: linear-gradient(180deg, #ff6b6b, #e74c3c);
    border-radius: 12px 0 0 0;
    box-shadow: -4px 0 16px rgba(231,76,60,.3);
}
.jcta-float-member {
    background: linear-gradient(180deg, #42a5f5, #1d93d1);
    border-radius: 0 0 0 12px;
    box-shadow: -4px 0 16px rgba(29,147,209,.3);
}
.jcta-float::before {
    content: '';
    position: absolute; top: 0; left: -100%; width: 200%; height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.15) 50%, transparent 100%);
    animation: j-shimmer 3s ease-in-out infinite;
}
@keyframes j-shimmer { 0% { transform: translateX(-50%); } 100% { transform: translateX(50%); } }
.jcta-float:hover { padding-right: 24px; }
.jcta-float-model:hover { box-shadow: -6px 0 24px rgba(231,76,60,.5); }
.jcta-float-member:hover { box-shadow: -6px 0 24px rgba(29,147,209,.5); }

/* Mobile adjustments */
@media (max-width: 768px) {
    .jcta-float { padding: 8px 10px 8px 8px; font-size: 10px; gap: 5px; }
    .jcta-float i { font-size: 14px; }
    .jcta-float:hover { padding-right: 14px; }
    .jcta-float-model { border-radius: 10px 0 0 0; }
    .jcta-float-member { border-radius: 0 0 0 10px; }
    .joverlay-title { font-size: 13px; margin-bottom: 4px; }
    .joverlay-name { font-size: 13px; }
    .joverlay-avatar { width: 30px; height: 30px; font-size: 12px; }
    .jcard-overlay { bottom: 12px; right: 60px; padding: 0 12px; }
}

/* ── Empty state ── */
.journey-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: calc(100vh - 70px);
    color: rgba(0,0,0,.4);
    font-size: 18px; font-weight: 700;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .jprogress-fill { animation: none !important; }
    .jeq-bar { animation: none !important; }
    .jscroll-hint { animation: none !important; }
    .jcta-float::before { animation: none !important; }
    .jlive-badge { animation: none !important; }
    .jaction-circle.jlive-circle { animation: none !important; }
}

/* ── Hidden (for tag filtering) ── */
.jvideo-card.jfiltered-out {
    display: none;
}
