/* ============================================================
   Paushu Reel — single.css  (block reel for single posts)
   ============================================================ */

/* ── Reel container (fixed, below header) ───────────────────── */
.single-reel {
    position: fixed;
    top: calc(var(--header-h) + var(--safe-top));
    left: 0; right: 0; bottom: 0;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: var(--bg);
}
.single-reel::-webkit-scrollbar { display: none; }

/* ── Individual slide ───────────────────────────────────────── */
.single-slide {
    position: relative;
    height: calc(100dvh - var(--header-h) - var(--safe-top));
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow: hidden;
}

/* Inner = scrollable area of each slide */
.slide-inner {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.slide-inner::-webkit-scrollbar { display: none; }

/* Sentinel sits at the very end of each slide's content */
.slide-bottom-sentinel {
    height: 1px;
    width: 100%;
}

/* ══════════════════════════════════════════════════════════════
   HERO SLIDE
══════════════════════════════════════════════════════════════ */
.single-slide--hero .slide-inner {
    overflow: hidden; /* hero doesn't scroll */
}

.hero-image-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.hero-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,.25) 0%, transparent 35%, rgba(0,0,0,.7) 70%, rgba(0,0,0,.92) 100%);
}

.hero-no-image {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #111 0%, #1e1c1a 100%);
}

.hero-content {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 2;
    padding: 24px 22px calc(28px + var(--safe-bottom));
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.slide-cat {
    display: inline-block;
    align-self: flex-start;
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(230,48,48,.12);
    border: 1px solid rgba(230,48,48,.4);
    border-radius: 4px;
    padding: 2px 9px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 6vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 2px 20px rgba(0,0,0,.5);
}

.hero-meta {
    font-size: .78rem;
    color: rgba(255,255,255,.6);
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.hero-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .7rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.45);
    margin-top: 4px;
    animation: hintFloat 2s ease-in-out infinite;
}

@keyframes hintFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(5px); }
}

/* ══════════════════════════════════════════════════════════════
   CONTENT BLOCK SLIDES
══════════════════════════════════════════════════════════════ */
.single-slide--block {
    background: var(--bg);
}

.slide-content {
    padding: 32px 22px 60px;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text);
}

/* Typography inside blocks */
.slide-content p { margin-bottom: 1.1em; }
.slide-content p:last-child { margin-bottom: 0; }

.slide-content h1,
.slide-content h2,
.slide-content h3,
.slide-content h4 {
    font-family: var(--font-display);
    color: #fff;
    line-height: 1.25;
    margin: .5em 0 .6em;
}
.slide-content h2 { font-size: clamp(1.3rem, 5vw, 1.6rem); }
.slide-content h3 { font-size: clamp(1.1rem, 4vw, 1.3rem); }

.slide-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 12px 18px;
    margin: 1em 0;
    background: rgba(255,255,255,.03);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--muted);
    font-size: 1.05rem;
}

.slide-content ul,
.slide-content ol {
    padding-left: 1.4em;
    margin-bottom: 1.1em;
}
.slide-content li { margin-bottom: .4em; }

.slide-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.slide-content img {
    /* Полная ширина, пропорции сохраняются */
    display: block;
    width: 100%;
    height: auto;          /* естественная высота — без обрезки */
    border-radius: 10px;
    margin: .75em 0;
}

.slide-content figure {
    margin: .75em 0;
}

.slide-content figure img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 0;             /* figure уже даёт отступ */
}

.slide-content figcaption {
    font-size: .78rem;
    color: var(--muted);
    text-align: center;
    margin-top: 6px;
    padding: 0 4px;
}

/* Responsive iframes (YouTube, Vimeo) */
.slide-content .iframe-responsive,
.slide-content .wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    margin: 1em 0;
}
.slide-content .iframe-responsive iframe,
.slide-content .wp-block-embed__wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    border: none;
}

/* ── Next-peek panel ────────────────────────────────────────── */
.slide-next-peek {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 22px calc(14px + var(--safe-bottom));
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,.96) 40%);
    transform: translateY(100%);
    transition: transform .35s cubic-bezier(.16,1,.3,1), opacity .35s;
    opacity: 0;
    pointer-events: none;
}

.single-slide.at-bottom .slide-next-peek {
    transform: translateY(0);
    opacity: 1;
}

.peek-bar {
    width: 36px;
    height: 3px;
    background: rgba(255,255,255,.25);
    border-radius: 2px;
    margin-bottom: 2px;
}

.peek-text {
    font-size: .8rem;
    color: rgba(255,255,255,.55);
    text-align: center;
    line-height: 1.4;
    max-width: 90%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.peek-arrow {
    color: rgba(255,255,255,.4);
    animation: hintFloat 1.5s ease-in-out infinite;
}

/* ══════════════════════════════════════════════════════════════
   COMMENTS SLIDE (outer)
══════════════════════════════════════════════════════════════ */
.single-slide--comments {
    background: var(--bg);
}

/* ── Inner reel for comments (nested scroll-snap) ─────────────── */
.comments-reel {
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.comments-reel::-webkit-scrollbar { display: none; }

/* ── Each comment = one full-height snap card ───────────────── */
.comment-slide {
    height: calc(100dvh - var(--header-h) - var(--safe-top));
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cslide-inner {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Comments header card ───────────────────────────────────── */
.comment-slide--header {
    background: linear-gradient(135deg, #111 0%, #1a1614 100%);
}

.ch-icon {
    font-size: 3rem;
    line-height: 1;
}

.ch-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

.ch-count {
    font-size: 1rem;
    color: var(--muted);
}

.ch-hint {
    font-size: .7rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.3);
    animation: hintFloat 2s ease-in-out infinite;
}

/* ── Individual comment card ────────────────────────────────── */
.comment-slide {
    background: var(--bg);
    transition: background .3s;
}

.comment-slide.is-active-comment {
    background: #0f0f0f;
}

.cslide-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cslide-avatar {
    width: 56px !important;
    height: 56px !important;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.cslide-author-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.cslide-author {
    font-weight: 600;
    font-size: .95rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cslide-date {
    font-size: .72rem;
    color: var(--muted);
}

.cslide-num {
    font-size: .72rem;
    color: var(--muted);
    flex-shrink: 0;
    background: rgba(255,255,255,.06);
    padding: 3px 8px;
    border-radius: 12px;
}

.cslide-text {
    font-size: .97rem;
    line-height: 1.7;
    color: var(--text);
    max-height: 50dvh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.12) transparent;
}

.cslide-text p { margin-bottom: .6em; }
.cslide-text p:last-child { margin-bottom: 0; }

/* Tap to expand hint */
.comment-slide:not(.comment-slide--header):not(.comment-slide--form)::after {
    content: 'нажмите для разворота';
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: .62rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(255,255,255,.18);
    white-space: nowrap;
    pointer-events: none;
}

.comment-slide.expanded .cslide-text {
    max-height: none;
}

/* ── Comment form card ──────────────────────────────────────── */
.comment-slide--form {
    background: var(--surface);
}

.cslide-inner--form {
    gap: 12px;
}

.cf-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
}

.cslide-inner--form .comment-form label {
    display: block;
    font-size: .78rem;
    color: var(--muted);
    margin-bottom: 4px;
}

.cslide-inner--form .comment-form input[type="text"],
.cslide-inner--form .comment-form input[type="email"],
.cslide-inner--form .comment-form input[type="url"],
.cslide-inner--form .comment-form textarea {
    width: 100%;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 8px;
    color: var(--text);
    padding: 10px 12px;
    font-size: .9rem;
    margin-bottom: 10px;
    font-family: var(--font-body);
    transition: border-color .2s;
}

.cslide-inner--form .comment-form input:focus,
.cslide-inner--form .comment-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.cslide-inner--form .comment-form textarea {
    min-height: 90px;
    resize: none;
}

.cf-submit-wrap {
    display: flex;
    justify-content: flex-end;
}

.cf-submit {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 24px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    transition: background .2s, transform .15s;
}

.cf-submit:active { transform: scale(.96); background: #c42020; }

/* ══════════════════════════════════════════════════════════════
   EXIT SLIDE
══════════════════════════════════════════════════════════════ */
.single-slide--exit {
    background: radial-gradient(ellipse at 50% 40%, #1a1008 0%, #0a0a0a 70%);
}

.single-slide--exit .slide-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.exit-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 32px 28px;
    text-align: center;
}

.exit-icon {
    width: 64px;
    height: 64px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 4px;
    animation: exitPop .5s cubic-bezier(.16,1,.3,1) forwards;
}

@keyframes exitPop {
    from { transform: scale(0.5); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.exit-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
}

.exit-sub {
    font-size: .88rem;
    color: var(--muted);
    font-style: italic;
    max-width: 280px;
    line-height: 1.4;
}

.exit-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.exit-tag {
    font-size: .75rem;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,.12);
    color: var(--muted);
    transition: border-color .2s, color .2s;
}

.exit-tag:hover { border-color: var(--accent); color: var(--accent); }

/* .exit-actions/.exit-like-btn/.exit-share-btn/.exit-like-count удалены —
   like и share теперь в глобальном #paushu-rail */

.exit-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: #fff;
    padding: 12px 28px;
    border-radius: 28px;
    font-weight: 600;
    font-size: .9rem;
    letter-spacing: .04em;
    margin-top: 8px;
    transition: background .2s, transform .15s;
}

.exit-btn:active { transform: scale(.96); background: #c42020; }

.exit-swipe-hint {
    font-size: .65rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255,255,255,.22);
    animation: hintFloat 2.5s ease-in-out infinite;
}

/* .archive-context удалён — контекст архива теперь в rail-menu-context.
   .ctx-label / .ctx-value стили определены в main.css. */

/* ══════════════════════════════════════════════════════════════
   SEARCH no-results
══════════════════════════════════════════════════════════════ */
.search-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    color: var(--muted);
    font-size: 1rem;
    padding: 20px;
    text-align: center;
}

.search-no-results strong { color: var(--text); }

.search-no-results .search-form {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 340px;
}

.search-no-results .search-field {
    flex: 1;
    background: var(--surface);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 8px;
    color: var(--text);
    padding: 10px 14px;
    font-size: .9rem;
    font-family: var(--font-body);
}

.search-no-results .search-submit {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-body);
}

/* ══════════════════════════════════════════════════════════════
   УНИВЕРСАЛЬНО — single-reel в колонке 9:16
   --phone-w и --col-left определены в main.css
══════════════════════════════════════════════════════════════ */

/* single-reel: position:fixed, позиция из --col-left */
.single-reel {
    left: var(--col-left);
    right: auto;
    width: var(--phone-w);
}

/* Высота слайда = доступная высота под хедером */
.single-slide,
.comment-slide {
    height: calc(100dvh - var(--header-h) - var(--safe-top));
}


/* ══════════════════════════════════════════════════════════════
   .block-actions / .block-like / .block-share удалены — лайк
   и шер блока теперь в глобальном #paushu-rail (определяется по
   data-block-key активного слайда).
══════════════════════════════════════════════════════════════ */
