/* ═══════════════════════════════════════════════════════════════════════
   BOLMOL — post detail page stylesheet
   Loaded by: post/show.php
   Theme: light
   ═══════════════════════════════════════════════════════════════════════ */

.bm-post-wrap {
    max-width: 720px;
    padding-top: 16px;
    padding-bottom: 48px;
}

.bm-post {
    position: relative;
    background: var(--bm-surface);
    border: 1px solid var(--bm-border-soft);
    border-radius: var(--bm-radius-lg);
    padding: 22px;
    margin-bottom: 24px;
    box-shadow: var(--bm-shadow-sm);
}

.bm-post-promoted {
    border-color: rgba(24, 119, 242, 0.35);
    box-shadow: 0 2px 12px rgba(24, 119, 242, 0.08);
}

.bm-post-promoted-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    margin-bottom: 10px;
    background: var(--bm-primary-soft);
    color: var(--bm-primary);
    border-radius: var(--bm-radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bm-post-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.bm-post-author {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.bm-post-author:hover,
.bm-post-author:focus { color: inherit; text-decoration: none; }

.bm-post-author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bm-surface-2);
    border: 1px solid var(--bm-border-soft);
    flex-shrink: 0;
}

.bm-post-author-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }

.bm-post-author-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--bm-text);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bm-post-author:hover .bm-post-author-name { color: var(--bm-primary); }

.bm-post-author-handle {
    font-size: 0.8rem;
    color: var(--bm-text-soft);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bm-post-time { font-size: 0.8rem; color: var(--bm-text-soft); flex-shrink: 0; }
.bm-post-time time { font-variant-numeric: tabular-nums; }
.bm-post-edited { color: var(--bm-text-faint); }

.bm-post-content {
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--bm-text);
    margin: 0 0 18px;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.bm-post-content:last-child { margin-bottom: 0; }

.bm-post-media {
    margin: 0 0 18px;
    padding: 0;
    background: var(--bm-surface-2);
    border-radius: var(--bm-radius);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bm-post-media img,
.bm-post-media video {
    display: block;
    max-width: 100%;
    max-height: 640px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.bm-post-media-image img,
.bm-post-media-video video { width: 100%; height: auto; }

.bm-post-media-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 24px;
    background: var(--bm-surface-2);
    border: 1px dashed var(--bm-border);
    border-radius: var(--bm-radius);
    color: var(--bm-text-soft);
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.5;
}

.bm-post-media-placeholder i { font-size: 2rem; opacity: 0.7; }

.bm-post-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--bm-border-faint);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bm-post-stats { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

.bm-post-stat {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--bm-text-soft);
    text-decoration: none;
    line-height: 1;
    cursor: default;
}

a.bm-post-stat { cursor: pointer; }
a.bm-post-stat:hover,
a.bm-post-stat:focus { color: var(--bm-text); text-decoration: none; }

.bm-post-stat i { font-size: 1rem; line-height: 1; }

.bm-post-stat-num { font-weight: 700; color: var(--bm-text); font-variant-numeric: tabular-nums; }
.bm-post-stat-lbl { font-weight: 500; color: var(--bm-text-soft); }
.bm-post-stat-views i { opacity: 0.75; }

.bm-post-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.bm-post-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    min-height: 40px;
    background: var(--bm-surface);
    color: var(--bm-text-soft);
    border: 1px solid var(--bm-border);
    border-radius: var(--bm-radius);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: background 90ms ease, border-color 90ms ease, color 90ms ease;
}

.bm-post-action:hover:not(:disabled) { background: var(--bm-surface-hover); color: var(--bm-text); border-color: var(--bm-border); }
.bm-post-action:focus-visible { outline: 2px solid var(--bm-primary); outline-offset: 2px; }
.bm-post-action:disabled { opacity: 0.55; cursor: not-allowed; }
.bm-post-action i { font-size: 1.05rem; line-height: 1; }

.bm-post-action[data-action="like"].bm-post-action-active {
    background: var(--bm-success-soft);
    border-color: var(--bm-success);
    color: var(--bm-success);
}

.bm-post-action[data-action="dislike"].bm-post-action-active {
    background: var(--bm-danger-soft);
    border-color: var(--bm-danger);
    color: var(--bm-danger);
}

.bm-post-action-report { margin-left: auto; }

.bm-post-comments {
    background: var(--bm-surface);
    border: 1px solid var(--bm-border-soft);
    border-radius: var(--bm-radius-lg);
    padding: 22px;
    box-shadow: var(--bm-shadow-sm);
}

.bm-post-comments-heading {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--bm-text);
    margin: 0 0 16px;
}

.bm-post-comments .bolmol-comments { color: inherit; font-family: inherit; }

.bm-comments-disabled { font-size: 0.9rem; color: var(--bm-text-soft); padding: 16px 0; margin: 0; }

.bm-label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 4px; color: var(--bm-text-soft); }

.bm-select,
.bm-textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bm-surface);
    border: 1px solid var(--bm-border);
    border-radius: var(--bm-radius);
    color: var(--bm-text);
    font: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    outline: none;
    transition: border-color 90ms ease, box-shadow 90ms ease;
}

.bm-textarea { min-height: 90px; resize: vertical; }

.bm-select:focus,
.bm-textarea:focus { border-color: var(--bm-primary); box-shadow: 0 0 0 3px var(--bm-primary-soft); }

@media (max-width: 575.98px) {
    .bm-post { padding: 16px; border-radius: var(--bm-radius); }
    .bm-post-comments { padding: 16px; border-radius: var(--bm-radius); }
    .bm-post-content { font-size: 0.95rem; }
    .bm-post-media img, .bm-post-media video { max-height: 380px; }
    .bm-post-stats { gap: 14px; }
    .bm-post-stat-lbl { display: none; }
    .bm-post-action { flex: 1 1 auto; justify-content: center; }
    .bm-post-action-report { margin-left: 0; }
    .bm-post .bm-post-card-text--xl { font-size: 1.6rem; }
    .bm-post .bm-post-card-text--lg { font-size: 1.4rem; }
    .bm-post .bm-post-card-text--m { font-size: 1.2rem; }
}

/* ═══════════════════════════════════════════════════════════════════════
   RTL (Arabic / Urdu)
   ═══════════════════════════════════════════════════════════════════════ */

html[dir="rtl"] .bm-post,
html[dir="rtl"] .bm-post-author-meta,
html[dir="rtl"] .bm-post-content,
html[dir="rtl"] .bm-post-stats,
html[dir="rtl"] .bm-post-stat,
html[dir="rtl"] .bm-post-actions,
html[dir="rtl"] .bm-post-comments,
html[dir="rtl"] .bm-modal-body,
html[dir="rtl"] .bm-label {
    text-align: right;
}

html[dir="rtl"] .bm-post-head {
    direction: rtl;
}

html[dir="rtl"] .bm-post-action-report {
    margin-left: 0;
    margin-right: auto;
}

html[dir="rtl"] .bm-post-time {
    text-align: left;
}

html[dir="rtl"] .bm-modal-actions {
    justify-content: flex-start;
}

/* Urdu: extra line-height for readability. */
html[lang="ur"] .bm-post-content,
html[lang="ur"] .bm-post-comments,
html[lang="ur"] .bm-modal-body,
html[lang="ur"] .bm-select,
html[lang="ur"] .bm-textarea {
    line-height: 1.85;
}

/* ═══════════════════════════════════════════════════════════════════════
   Print
   ═══════════════════════════════════════════════════════════════════════ */

@media print {
    .bm-post-actions,
    .bm-post-comments,
    .bm-modal {
        display: none !important;
    }

    .bm-post {
        box-shadow: none;
        border-color: #cccccc;
    }

    .bm-post-media img,
    .bm-post-media video {
        max-height: 480px;
    }
}


.bm-post .bm-post-card-text--xl {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.03em;
    -webkit-line-clamp: 6;
    line-clamp: 6;
}

.bm-post .bm-post-card-text--lg {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.02em;
    -webkit-line-clamp: 5;
    line-clamp: 5;
}

.bm-post .bm-post-card-text--m {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.01em;
    -webkit-line-clamp: 4;
    line-clamp: 4;
}

.bm-post .bm-post-card-text--base {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

/* ── Long text collapse ─────────────────────────────────── */
.bm-post .bm-post-content.bm-clamped {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 8;
    line-clamp: 8;
    overflow: hidden;
}

.bm-post .bm-readmore {
    display: inline-block;
    margin: -8px 0 18px;
    padding: 0;
    background: none;
    border: 0;
    color: var(--bm-primary);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.bm-post .bm-readmore:hover,
.bm-post .bm-readmore:focus {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bm-post .bm-readmore:focus-visible {
    outline: 2px solid var(--bm-primary);
    outline-offset: 2px;
    border-radius: 4px;
}