/* Post detail page — matches posts feed + site header */
.posts-show-page {
    background: #f0f2f5;
    min-height: calc(100vh - var(--fb-topbar-height, 118px));
    padding-bottom: 80px;
}

.posts-show-toolbar {
    position: sticky;
    top: var(--fb-topbar-height, 118px);
    z-index: 100;
    background: rgba(240, 242, 245, .96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e5e7eb;
    padding: 10px 12px;
}

.posts-show-toolbar__inner {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.posts-show-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #334155;
    text-decoration: none;
    flex-shrink: 0;
    transition: background .15s ease;
}

.posts-show-back:hover {
    background: #f8fafc;
    color: #1e293b;
}

.posts-show-toolbar__title {
    flex: 1;
    min-width: 0;
    font-size: .95rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.posts-show-toolbar__share {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    border: none;
    background: #5b6ee8;
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}

.posts-show-toolbar__share:hover { background: #4a5bd4; }

.posts-show-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 12px;
}

.posts-show-card {
    background: #fff;
    border: none;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
    overflow: hidden;
    margin-bottom: 12px;
}

.posts-show-card__head {
    padding: 16px 16px 12px;
}

.posts-show-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5b6ee8, #7c4fbd);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.posts-show-author-name {
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
}

.posts-show-author-name:hover { color: #5b6ee8; }

.posts-show-meta {
    font-size: .82rem;
    color: #64748b;
}

.posts-show-badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    text-transform: capitalize;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
}

.posts-show-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin: 0 0 8px;
    padding: 0 16px;
}

.posts-show-lead {
    font-size: .95rem;
    color: #475569;
    line-height: 1.55;
    margin: 0;
    padding: 0 16px 12px;
    border-left: 3px solid #5b6ee8;
    margin-left: 16px;
    margin-right: 16px;
}

.posts-show-price {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 16px 12px;
    padding: 8px 14px;
    border-radius: 10px;
    background: #ecfdf5;
    color: #047857;
    font-weight: 700;
    font-size: 1rem;
}

.posts-show-media {
    width: 100%;
    line-height: 0;
    background: #f1f5f9;
}

.posts-show-media img,
.posts-show-media video {
    width: 100%;
    height: auto;
    max-height: min(75vh, 680px);
    object-fit: contain;
    object-position: center;
    display: block;
    background: #f1f5f9;
}

.posts-show-media img.is-clickable { cursor: zoom-in; }

.posts-show-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0f172a;
}

.posts-show-embed iframe,
.posts-show-embed video {
    width: 100% !important;
    height: 100% !important;
    min-height: 220px;
    border: 0;
    display: block;
}

.posts-show-thumb-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(0, 0, 0, .25);
    cursor: pointer;
    transition: background .2s ease;
}

.posts-show-thumb-play:hover { background: rgba(0, 0, 0, .35); }

.posts-show-thumb-play span {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    font-size: 1.5rem;
}

.posts-show-body {
    padding: 16px;
    font-size: .95rem;
    line-height: 1.65;
    color: #334155;
    word-break: break-word;
}

.posts-show-body img { max-width: 100%; height: auto; }

.posts-show-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px 12px;
}

.posts-show-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
}

.posts-show-tag:hover { background: #e0e7ff; }

.posts-show-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 16px;
    border-top: 1px solid #f1f5f9;
    font-size: .82rem;
    color: #64748b;
}

.posts-show-stats__left {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.posts-show-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 12px 16px 16px;
    border-top: 1px solid #f1f5f9;
}

@media (max-width: 480px) {
    .posts-show-actions { grid-template-columns: repeat(2, 1fr); }
}

.posts-show-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    color: #475569;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease;
}

.posts-show-action i { font-size: 1.1rem; }

.posts-show-action:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.posts-show-action.is-active {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.posts-show-action--buy {
    background: #fffbeb;
    border-color: #fde68a;
    color: #b45309;
}

.posts-show-comments {
    background: #fff;
    border: none;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
    overflow: hidden;
}

.posts-show-comments__head {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}

.posts-show-login-hint {
    margin: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    font-size: .88rem;
    color: #78350f;
}

.posts-show-login-hint a {
    color: #5b6ee8;
    font-weight: 600;
}

.posts-show-comment-form {
    padding: 0 16px 16px;
}

.posts-show-comment-form textarea {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    font-size: .9rem;
    resize: vertical;
    min-height: 88px;
}

.posts-show-comment-form textarea:focus {
    outline: none;
    border-color: #5b6ee8;
    box-shadow: 0 0 0 3px rgba(91, 110, 232, .15);
}

.posts-show-comment-submit {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    background: #5b6ee8;
    color: #fff;
    font-weight: 600;
    font-size: .88rem;
    cursor: pointer;
}

.posts-show-comment-submit:disabled { opacity: .6; cursor: not-allowed; }

.posts-show-comment-list {
    padding: 0 16px 16px;
}

.posts-show-comment {
    display: flex;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.posts-show-comment:last-child { border-bottom: none; }

.posts-show-comment__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5b6ee8, #7c4fbd);
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.posts-show-comment__name {
    font-weight: 600;
    font-size: .88rem;
    color: #1e293b;
}

.posts-show-comment__time {
    font-size: .78rem;
    color: #94a3b8;
}

.posts-show-comment__text {
    margin: 4px 0 0;
    font-size: .88rem;
    line-height: 1.5;
    color: #475569;
}

.posts-show-empty {
    text-align: center;
    padding: 32px 16px;
    color: #94a3b8;
}

.posts-show-empty i {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
}

.posts-show-menu {
    position: relative;
}

.posts-show-menu__btn {
    border: none;
    background: transparent;
    color: #94a3b8;
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
}

.posts-show-menu__btn:hover { background: #f1f5f9; color: #64748b; }

.posts-show-menu__dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    min-width: 160px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .1);
    z-index: 20;
    overflow: hidden;
}

.posts-show-menu__dropdown.is-open { display: block; }

.posts-show-menu__dropdown a,
.posts-show-menu__dropdown button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: none;
    text-align: left;
    font-size: .88rem;
    color: #334155;
    text-decoration: none;
    cursor: pointer;
}

.posts-show-menu__dropdown a:hover,
.posts-show-menu__dropdown button:hover { background: #f8fafc; }

.posts-show-menu__dropdown .is-danger { color: #dc2626; }

/* Media lightbox */
.posts-show-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, .88);
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.posts-show-lightbox.is-open { display: flex; }

.posts-show-lightbox img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.posts-show-lightbox__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
}

/* Toast */
.posts-show-toast {
    position: fixed;
    top: calc(var(--fb-topbar-height, 118px) + 12px);
    right: 12px;
    z-index: 10000;
    max-width: min(320px, calc(100vw - 24px));
    padding: 12px 16px;
    border-radius: 12px;
    font-size: .88rem;
    font-weight: 500;
    color: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .2);
    animation: postsShowToastIn .25s ease;
}

.posts-show-toast--success { background: #059669; }
.posts-show-toast--error { background: #dc2626; }
.posts-show-toast--info { background: #334155; }

@keyframes postsShowToastIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
