/* ═══════════════════════════════════════════════════════════════════
   post.css  —  Post / Gist detail page
   Loaded only on  /{lang}/post/{slug}
   ═══════════════════════════════════════════════════════════════════ */

/* ── Hero ─────────────────────────────────────────────────────────── */
.jt-post-hero {
    position: relative;
    overflow: hidden;
    min-height: 340px;
    display: flex;
    align-items: flex-end;
    background: var(--jt-grad-splash);
}
.jt-post-hero--no-cover {
    min-height: 220px;
    background: var(--jt-grad-splash);
}
.jt-post-hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.jt-post-hero__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,.15) 0%,
        rgba(0,0,0,.6)  100%
    );
}
.jt-post-hero__inner {
    position: relative;
    z-index: 1;
    padding-top: 80px;
    padding-bottom: 32px;
    color: #fff;
}
.jt-post-hero--no-cover .jt-post-hero__inner {
    color: var(--jt-ink);
    padding-top: 40px;
}

/* Badge */
.jt-post-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    margin-bottom: 10px;
    background: rgba(255,255,255,.2);
    color: #fff;
    backdrop-filter: blur(4px);
}
.jt-post-hero--no-cover .jt-post-badge {
    background: var(--jt-orange-50, #fff8f0);
    color: var(--jt-orange-600);
}
.jt-post-badge--event { background: rgba(249,115,22,.85); }

.jt-post-hero__title {
    font-family: var(--jt-font-display);
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.2;
    margin: 0 0 12px;
}
.jt-post-hero--no-cover .jt-post-hero__title { color: var(--jt-ink); }

.jt-post-hero__meta {
<<<<<<< HEAD
=======
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
>>>>>>> 2ef261365e0bb8ad53e4af1b764045af4f449165
    font-size: 14px;
    opacity: .9;
}
.jt-post-hero--no-cover .jt-post-hero__meta { opacity: 1; color: var(--jt-muted); }
<<<<<<< HEAD

/* ── Meta row: author pill + date (left) + visibility badge (right) ── */
.jt-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.jt-meta-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

/* ── Author pill ── */
.jt-author-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 14px 4px 4px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    color: inherit;
    /* cover hero → glass effect */
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .28);
    backdrop-filter: blur(6px);
    transition: background .2s, border-color .2s;
}
.jt-author-pill:hover,
.jt-author-pill:focus-visible {
    background: rgba(255, 255, 255, .30);
    color: inherit;
    text-decoration: none;
}
.jt-author-pill img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.jt-author-pill__initial {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--jt-orange-400, #f97316);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* no-cover hero → solid light pill */
.jt-post-hero--no-cover .jt-author-pill {
    background: var(--jt-cream, #f8f4ef);
    border-color: var(--jt-border, #e5e7eb);
    color: var(--jt-ink, #1a1a2e);
}
.jt-post-hero--no-cover .jt-author-pill:hover {
    background: var(--jt-orange-50, #fff7ed);
    border-color: var(--jt-orange-300, #fdba74);
}

/* ── Date chip ── */
.jt-meta-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .84rem;
    opacity: .88;
}
.jt-meta-date svg { flex-shrink: 0; }
=======
.jt-post-hero__sep { opacity: .5; }
>>>>>>> 2ef261365e0bb8ad53e4af1b764045af4f449165

.jt-post-event-dates,
.jt-post-hero__loc {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    opacity: .85;
    margin-top: 6px;
}
.jt-post-hero--no-cover .jt-post-event-dates,
.jt-post-hero--no-cover .jt-post-hero__loc { opacity: 1; color: var(--jt-muted); }

/* ── 2-column layout ─────────────────────────────────────────────── */
.jt-post-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    padding-top: 28px;
    padding-bottom: 60px;
    align-items: start;
}
@media (max-width: 992px) {
    .jt-post-layout {
        grid-template-columns: 1fr;
    }
    .jt-post-sidebar { order: -1; }
}

/* ── Body ────────────────────────────────────────────────────────── */
.jt-post-content {
    font-size: 16px;
    line-height: 1.75;
    color: var(--jt-ink);
    margin-bottom: 24px;
}

/* ── Reactions ───────────────────────────────────────────────────── */
.jt-post-reactions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    border-top: 1px solid var(--jt-border);
    border-bottom: 1px solid var(--jt-border);
    flex-wrap: wrap;
}
.jt-reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--jt-border);
    border-radius: 20px;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background .15s, border-color .15s;
}
.jt-reaction-btn:hover,
.jt-reaction-btn:focus-visible {
    background: var(--jt-orange-50, #fff8f0);
    border-color: var(--jt-orange-400);
    outline: none;
}
.jt-reaction-btn__count { color: var(--jt-muted); font-weight: 400; }

.jt-post-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
}

/* ── Sidebar ─────────────────────────────────────────────────────── */
.jt-post-sidebar__card {
    background: var(--jt-surface, #fff);
    border: 1px solid var(--jt-border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}
.jt-post-sidebar__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--jt-ink);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* Avatar strip */
.jt-avatar-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.jt-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--jt-orange-500, #f97316);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}
.jt-avatar--sm { width: 32px; height: 32px; font-size: 12px; }
.jt-avatar--lg { width: 48px; height: 48px; font-size: 18px; }
.jt-avatar--more {
    background: var(--jt-gray-200, #e5e7eb);
    color: var(--jt-muted);
    font-size: 12px;
    font-weight: 600;
}

/* Mini map placeholder */
.jt-post-map {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 12px;
    background: var(--jt-gray-100, #f3f4f6);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--jt-muted);
    font-size: 13px;
}

/* ── Post card (used in community feed / place posts) ─────────────── */
.jt-post-card {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--jt-border);
}
.jt-post-card:last-child { border-bottom: none; }
.jt-post-card__media-link { flex-shrink: 0; }
.jt-post-card__img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}
.jt-post-card__body { flex: 1; min-width: 0; }
.jt-post-card__title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin: 4px 0 6px;
}
.jt-post-card__title a {
    color: var(--jt-ink);
    text-decoration: none;
}
.jt-post-card__title a:hover { color: var(--jt-orange-500); text-decoration: underline; }
.jt-post-card__meta {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: var(--jt-muted);
}

/* ═════════════════════════════════════════════════════════════════════
   FB/Twitter-style card hero — overrides full-bleed cover behavior
   Used when @section PageHero renders .jt-post-hero.jt-post-hero--card
   ═════════════════════════════════════════════════════════════════════ */
.jt-post-hero--card {
    /* Cancel full-bleed gradient hero */
    min-height: 0;
    background: transparent;
    overflow: visible;
    display: block;
    align-items: initial;
}
.jt-post-hero--card .jt-post-hero__inner {
    /* width = Bootstrap .container (อยู่ใน div.container เดียวกับ main → ตรงกัน) */
    padding: 28px 0 24px;
    color: var(--jt-ink);
    background: white;
    border-radius: 0;
}
.jt-post-hero--card .jt-post-hero__title {
    color: var(--jt-ink);
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.25;
    margin: 0;
}
.jt-post-hero--card .jt-post-hero__meta {
    color: var(--jt-ink-2, #4a5759);
    opacity: 1;
    font-size: 13px;
}
.jt-post-hero--card .jt-author-pill {
    background: var(--jt-cream, #FAF7F2);
    border-color: var(--jt-line, #eee);
    color: var(--jt-ink);
}
.jt-post-hero--card .jt-author-pill:hover {
    background: var(--jt-orange-50, #fff7ec);
    border-color: var(--jt-orange-300, #fdba74);
}
.jt-post-hero--card .jt-meta-date {
    color: var(--jt-muted, #8A9387);
}
.jt-post-hero--card .jt-post-hero__vis {
    color: var(--jt-muted, #8A9387);
    font-size: 12px;
}
.jt-post-hero--card .jt-post-event-dates,
.jt-post-hero--card .jt-post-hero__loc {
    color: var(--jt-ink-2, #4a5759);
    opacity: 1;
}
/* ── Interaction row — soft card container + pill buttons ─────────────────── */
.jt-pd-interact-row--card {
    display: flex;
    gap: 4px;
    margin-top: 18px;
    padding: 6px;
    background: var(--jt-cream, #FAF7F2);
    border: 1px solid var(--jt-line, #eee);
    border-radius: 14px;
    flex-wrap: nowrap;
    box-shadow: 0 1px 2px rgba(26, 43, 31, 0.03);
}
.jt-pd-interact-row--card .jt-inline-btn {
    flex: 1;
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    min-height: 40px;
    border: none;
    border-radius: 10px;
    background: transparent;
    backdrop-filter: none;
    color: var(--jt-ink-2, #4a5759);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, transform .12s ease;
}
.jt-pd-interact-row--card .jt-inline-btn svg {
    transition: transform .15s ease;
}
.jt-pd-interact-row--card .jt-inline-btn:hover,
.jt-pd-interact-row--card .jt-inline-btn:focus-visible {
    background: white;
    color: var(--jt-ink, #1A2B1F);
    box-shadow: 0 1px 3px rgba(26, 43, 31, 0.08);
    outline: none;
}
.jt-pd-interact-row--card .jt-inline-btn:hover svg {
    transform: scale(1.08);
}
.jt-pd-interact-row--card .jt-inline-btn:active {
    transform: scale(0.97);
}

/* Active state colors — each action gets its own accent */
.jt-pd-interact-row--card .jt-inline-btn[data-type="like"]:hover svg,
.jt-pd-interact-row--card .jt-inline-btn.is-active[data-type="like"] {
    color: #E11D48;
}
.jt-pd-interact-row--card .jt-inline-btn.is-active[data-type="like"] svg { fill: #E11D48; }

.jt-pd-interact-row--card .jt-inline-btn[data-type="comment"]:hover svg {
    color: #2563EB;
}

.jt-pd-interact-row--card .jt-inline-btn[data-type="bookmark"]:hover svg,
.jt-pd-interact-row--card .jt-inline-btn.is-active[data-type="bookmark"] {
    color: var(--jt-orange-600, #d97706);
}
.jt-pd-interact-row--card .jt-inline-btn.is-active[data-type="bookmark"] svg { fill: var(--jt-orange-500, #F58220); }

.jt-pd-interact-row--card .jt-inline-btn[data-type="share"]:hover svg {
    color: var(--jt-green-600, #1B4D2E);
}

.jt-pd-interact-row--card .jt-interact-count {
    font-family: var(--jt-font-mono, ui-monospace);
    font-size: 12.5px;
    font-weight: 600;
    color: inherit;
}

/* Hide count when 0 — cleaner look (icon only) */
.jt-pd-interact-row--card .jt-interact-count:empty {
    display: none;
}

/* Mobile: tighten padding, smaller font */
@media (max-width: 575px) {
    .jt-pd-interact-row--card {
        gap: 2px;
        padding: 4px;
        border-radius: 12px;
    }
    .jt-pd-interact-row--card .jt-inline-btn {
        gap: 5px;
        padding: 8px 6px;
        font-size: 12.5px;
        min-height: 36px;
    }
}

/* Inline cover image — Facebook/Twitter style (not background) */
.jt-post-hero__figure {
    margin: 0;
    border-radius: 14px;
    overflow: hidden;
    background: var(--jt-cream, #FAF7F2);
    border: 1px solid var(--jt-line, #eee);
}
.jt-post-hero--card .jt-post-hero__img {
    /* Override absolute background-fill behavior */
    position: static;
    inset: auto;
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
    display: block;
}

/* Zoomable hero image (JS adds this class when lightbox is ready) */
.jt-post-hero__figure--zoomable .jt-post-hero__img {
    cursor: zoom-in;
    transition: opacity 0.18s ease;
}
.jt-post-hero__figure--zoomable:hover .jt-post-hero__img {
    opacity: 0.88;
}
.jt-post-hero__figure--zoomable:focus-within .jt-post-hero__img {
    outline: 2px solid var(--jt-orange, #f60);
    outline-offset: 2px;
}

@media (max-width: 575px) {
    .jt-post-hero--card .jt-post-hero__inner { padding: 20px 0 18px; }
    .jt-post-hero--card .jt-post-hero__title { font-size: 1.35rem; }
    .jt-post-hero--card .jt-post-hero__img { max-height: 360px; }
}
