/* ═══════════════════════════════════════════════════════════════════════
   BOLMOL — profile page stylesheet (light, professional)
   Loaded by: profile/show.php
   ═══════════════════════════════════════════════════════════════════════ */

.bm-profile {
    max-width: 960px;
    margin: 0 auto;
    padding-bottom: 64px;
}

/* ── Cover banner ─────────────────────────────────────── */
.bm-profile-cover {
    position: relative;
    width: 100%;
    height: 240px;
    background-color: #dbeafe;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.04);
}

.bm-profile-cover--gradient {
    background-image:
        radial-gradient(circle at 20% 30%, rgba(24, 119, 242, 0.35), transparent 55%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.30), transparent 55%),
        linear-gradient(135deg, #e0ecff 0%, #dbeafe 40%, #ede9fe 100%);
}

.bm-profile-cover--gradient::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            45deg,
            rgba(255, 255, 255, 0.06) 0,
            rgba(255, 255, 255, 0.06) 2px,
            transparent 2px,
            transparent 12px
        );
    pointer-events: none;
}

.bm-profile-cover--image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) 60%,
        rgba(0, 0, 0, 0.18) 100%
    );
    pointer-events: none;
}

/* ── Identity row ─────────────────────────────────────── */
.bm-profile-identity {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    padding: 0 24px;
    margin-top: -64px;
    position: relative;
    z-index: 2;
}

.bm-profile-avatar {
    width: 132px;
    height: 132px;
    border-radius: 50%;
    object-fit: cover;
    background: #ffffff;
    border: 5px solid #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
    flex-shrink: 0;
}

.bm-profile-identity-meta {
    flex: 1;
    min-width: 0;
    padding-bottom: 10px;
}

.bm-profile-name {
    font-size: clamp(1.4rem, 3vw, 1.85rem);
    font-weight: 800;
    color: var(--bm-text);
    margin: 0 0 4px;
    letter-spacing: -0.02em;
    line-height: 1.15;
    word-break: break-word;
}

.bm-profile-handle {
    font-size: 0.9rem;
    color: var(--bm-text-soft);
    font-weight: 500;
}

.bm-profile-bio {
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--bm-text-soft);
    margin: 10px 0 0;
    max-width: 560px;
    word-break: break-word;
}

/* ── Action buttons ───────────────────────────────────── */
.bm-profile-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-bottom: 10px;
    margin-left: auto;
}

.bm-profile-actions .btn {
    min-height: 42px;
    padding: 9px 18px;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: var(--bm-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: -0.005em;
}

.bm-profile-actions .btn i {
    font-size: 1rem;
    line-height: 1;
}

.bm-profile-actions .btn-success {
    background: #e7f8ee;
    border-color: #bbf7d0;
    color: #16a34a;
}

.bm-profile-actions .btn-success:hover,
.bm-profile-actions .btn-success:focus {
    background: #d1fae5;
    border-color: #86efac;
    color: #15803d;
}

.bm-profile-actions .btn-danger {
    background: #fee2e2;
    border-color: #fecaca;
    color: #dc2626;
}

.bm-profile-actions .btn-danger:hover,
.bm-profile-actions .btn-danger:focus {
    background: #fecaca;
    border-color: #fca5a5;
    color: #b91c1c;
}

.bm-profile-actions .btn-outline-secondary {
    background: #ffffff;
    border-color: var(--bm-border);
    color: var(--bm-text);
}

.bm-profile-actions .btn-outline-secondary:hover,
.bm-profile-actions .btn-outline-secondary:focus {
    background: var(--bm-surface-hover);
    border-color: var(--bm-border);
    color: var(--bm-text);
}

.bm-btn-link {
    background: transparent;
    border: 0;
    color: var(--bm-text-soft);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 10px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bm-btn-link:hover,
.bm-btn-link:focus {
    color: #dc2626;
}

/* ── Stats bar ────────────────────────────────────────── */
.bm-profile-stats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    align-items: center;
    gap: 0;
    padding: 20px 24px;
    margin-top: 24px;
    background: var(--bm-surface);
    border: 1px solid var(--bm-border-soft);
    border-radius: var(--bm-radius-lg);
    box-shadow: var(--bm-shadow-sm);
}

.bm-profile-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
    padding: 6px 8px;
    border-right: 1px solid var(--bm-border-faint);
}

.bm-profile-stat:last-child {
    border-right: 0;
}

.bm-profile-stat-num {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--bm-text);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.bm-profile-stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bm-text-soft);
    font-weight: 700;
    white-space: nowrap;
}

/* ── Posts section ────────────────────────────────────── */
.bm-profile-posts {
    margin-top: 32px;
    padding: 0 24px;
}

.bm-profile-post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.bm-profile-post {
    display: flex;
    flex-direction: column;
    background: var(--bm-surface);
    border: 1px solid var(--bm-border-soft);
    border-radius: var(--bm-radius-lg);
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    height: 100%;
    transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.bm-profile-post:hover,
.bm-profile-post:focus {
    border-color: var(--bm-border);
    box-shadow: var(--bm-shadow);
    color: inherit;
    text-decoration: none;
    transform: translateY(-1px);
}

.bm-profile-post-media {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    background: var(--bm-surface-2);
}

.bm-profile-post-media-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: block;
}

.bm-profile-post-media-wrap .bm-profile-post-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.bm-profile-post-media--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bm-text-soft);
    font-size: 0.85rem;
    background: var(--bm-surface-2);
}

.bm-profile-post-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.bm-profile-post-play i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    font-size: 1.1rem;
    padding-left: 3px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.bm-profile-post-body {
    padding: 14px 16px 10px;
    flex: 1;
    min-height: 0;
}

.bm-profile-post-text {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--bm-text);
    margin: 0;
    word-break: break-word;
}

.bm-profile-post-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px 12px;
    border-top: 1px solid var(--bm-border-faint);
    font-size: 0.78rem;
    color: var(--bm-text-soft);
    font-weight: 600;
}

.bm-profile-post-footer > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 1;
}

.bm-profile-post-footer i {
    font-size: 0.9rem;
}

.bm-profile-more {
    display: flex;
    justify-content: center;
    padding: 32px 0 8px;
}

.bm-profile-more .btn {
    min-width: 200px;
    font-weight: 700;
}


.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);
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 991.98px) {
    .bm-profile-cover {
        height: 200px;
    }

    .bm-profile-avatar {
        width: 116px;
        height: 116px;
    }

    .bm-profile-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px 0;
    }

    .bm-profile-stat:nth-child(3) {
        border-right: 0;
    }

    .bm-profile-stat:nth-child(-n+3) {
        border-bottom: 1px solid var(--bm-border-faint);
        padding-bottom: 14px;
    }

    .bm-profile-stat:nth-child(n+4) {
        padding-top: 6px;
    }

    .bm-profile-post-grid {
        gap: 14px;
    }
}

@media (max-width: 767.98px) {
    .bm-profile-cover {
        height: 170px;
    }

    .bm-profile-identity {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        margin-top: -56px;
        padding: 0 16px;
    }

    .bm-profile-avatar {
        width: 104px;
        height: 104px;
        border-width: 4px;
    }

    .bm-profile-identity-meta {
        padding-bottom: 0;
        width: 100%;
    }

    .bm-profile-actions {
        width: 100%;
        margin-left: 0;
        padding-bottom: 0;
    }

    .bm-profile-actions .btn {
        flex: 1 1 auto;
    }

    .bm-profile-stats {
        margin-top: 20px;
        padding: 16px;
    }

    .bm-profile-stat-num {
        font-size: 1.15rem;
    }

    .bm-profile-post-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bm-profile-posts {
        padding: 0 16px;
    }
}

@media (max-width: 575.98px) {
    .bm-profile-cover {
        height: 140px;
    }

    .bm-profile-avatar {
        width: 88px;
        height: 88px;
        border-width: 4px;
    }

    .bm-profile-name {
        font-size: 1.25rem;
    }

    .bm-profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .bm-profile-stat {
        border-right: 0;
        border-bottom: 1px solid var(--bm-border-faint);
        padding: 10px 6px;
    }

    .bm-profile-stat:nth-child(even) {
        border-right: 0;
    }

    .bm-profile-stat:nth-last-child(-n+2) {
        border-bottom: 0;
    }

    .bm-profile-stat-num {
        font-size: 1.05rem;
    }

    .bm-profile-stat-label {
        font-size: 0.65rem;
    }

    .bm-profile-post-grid {
        gap: 10px;
    }

    .bm-profile-post-body {
        padding: 10px 12px 8px;
    }

    .bm-profile-post-text {
        font-size: 0.82rem;
    }

    .bm-profile-post-footer {
        padding: 8px 12px 10px;
        gap: 10px;
    }
    .bm-profile .bm-post-card-text--xl { font-size: 1.6rem; }
    .bm-profile .bm-post-card-text--lg { font-size: 1.4rem; }
    .bm-profile .bm-post-card-text--m { font-size: 1.2rem; }
}

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

html[dir="rtl"] .bm-profile {
    text-align: right;
}

html[dir="rtl"] .bm-profile-identity-meta,
html[dir="rtl"] .bm-profile-name,
html[dir="rtl"] .bm-profile-handle,
html[dir="rtl"] .bm-profile-bio,
html[dir="rtl"] .bm-profile-actions,
html[dir="rtl"] .bm-profile-stat,
html[dir="rtl"] .bm-profile-post-body,
html[dir="rtl"] .bm-profile-post-footer,
html[dir="rtl"] .bm-label {
    text-align: right;
}

html[dir="rtl"] .bm-profile-actions {
    margin-left: 0;
    margin-right: auto;
}

html[dir="rtl"] .bm-profile-stat {
    border-right: 0;
    border-left: 1px solid var(--bm-border-faint);
}

html[dir="rtl"] .bm-profile-stat:last-child {
    border-left: 0;
}

@media (max-width: 991.98px) {
    html[dir="rtl"] .bm-profile-stat {
        border-left: 1px solid var(--bm-border-faint);
    }
    html[dir="rtl"] .bm-profile-stat:nth-child(3n) {
        border-left: 0;
    }
}

@media (max-width: 575.98px) {
    html[dir="rtl"] .bm-profile-stat {
        border-left: 0;
    }
}



/* Urdu: extra line-height for readability. */
html[lang="ur"] .bm-profile-bio,
html[lang="ur"] .bm-profile-post-text,
html[lang="ur"] .bm-select,
html[lang="ur"] .bm-textarea {
    line-height: 1.85;
}

/* ═══════════════════════════════════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════════════════════════════════ */

@media print {
    .bm-profile-cover,
    .bm-profile-actions,
    .bm-profile-more,    

    .bm-profile {
        max-width: 100%;
        padding-bottom: 0;
    }

    .bm-profile-avatar {
        box-shadow: none;
        border-color: #ffffff;
    }

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

.bm-profile-sentinel {
    height: 1px;
    width: 100%;
    margin-top: 24px;
}

.bm-profile .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-profile .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-profile .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-profile .bm-post-card-text--base {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}