.channels-list {
    margin: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.channel-item {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 12px;
    padding: 10px 12px;
    text-decoration: none;
    color: #333;

    border: 1px solid #e7f5ee;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);

    transition: .15s;
    min-height: 100px;
}

.channel-item:hover {
    background: #f9fffb;
}

.channel-avatar {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    margin-left: 12px;
}

.channel-info {
    flex: 1;
}

.channel-name {
    font-size: 14px;
    font-weight: bold;
    color: #2bb673;

    max-width: 85%;
    /* فاصله از ستون راست */
    line-height: 1.4;
    word-break: break-word;
}

.channel-id {
    font-size: 12px;
    color: #666;
    margin-top: 4px;

}

.channel-extra {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.channel-tag {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 8px;
    color: #fff;
}

.channel-tag.public {
    background: #28a965;
}

.channel-tag.private {
    background: #f00;
}

.channel-tag.category {
    background: #3b5aba;
}

.channel-members {
    font-size: 12px;
    color: #777;
    padding-left: 5px;
}

.channel-unread {
    background: #c8a63f;
    /* رنگ قرمز تلگرامی */
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 8px;
    min-width: 22px;
    text-align: center;
    display: inline-block;
}






.channel-big-header {
    width: 100%;
    margin-bottom: 15px;

    padding-bottom: 10px;
    /* یا هر مقداری که لازم باشه */
    transition: height 0.3s ease;
    /* انیمیشن نرم برای تغییر ارتفاع */
}

/* کاور سبز */

.channel-cover {
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, #ccb05a, #c8b479, #cab985);
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
}

/* نوار اطلاعات */

.channel-info-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 0 12px;
    margin-top: -90px;
    /* overlap اواتار روی کاور */
}

/* تصویر کانال */

.channel-avatar {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    border: 4px solid #fff;
    object-fit: cover;
    background: #eee;
}

/* اطلاعات */

.channel-main-info {
    flex: 1;
}

.channel-title {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
}

.white-channel-id {
    font-size: 12px;
    color: #ffffff;
    margin-top: 4px;
}

.channel-meta {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tag {
    font-size: 11px;
    padding: 3px 7px;
    border-radius: 7px;
    color: #fff;
}

.tag.public {
    background: #28a965;
}

.tag.private {
    background: #f00;
}

.channel-tag.category {
    background: #3b5aba;
}

.members {
    font-size: 11px;
    color: #ffffff;
}

/* دکمه عضویت */

.join-btn {
    background: #1f5389;
    color: #fff;
    padding: 7px 12px;
    border: none;
    border-radius: 9px;
    font-size: 12px;
    text-decoration: none;
}

.unjoin-btn {
    background: #f46e07;
    color: #fff;
    padding: 7px 12px;
    border: none;
    border-radius: 9px;
    font-size: 12px;
    text-decoration: none;
}



/* ===========================
   پست‌ها – نسخه نهایی
=========================== */

.channel-posts {
    padding: 0 15px 25px;
    margin-top: 55px;
    /* فاصله از اواتار + نوار بالا */
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.channel-post {
    background: #fff;
    border-radius: 14px;
    padding: 14px;
    border: 1px solid #e6f4ed;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

/* متن پست */
.post-text {
    font-size: 13px;
    color: #333;
    line-height: 1.8;
    margin-top: 8px;
    text-align: justify;
}

.post-date {
    margin-top: 10px;
    font-size: 11px;
    color: #999;
}



/* تصویر تک */
.post-image img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
}



/* اسلاید چند تصویر */
.post-multi-images {
    overflow-x: auto;
    margin-bottom: 10px;
}

.scroll-row {
    display: flex;
    gap: 10px;
}

.scroll-row img {
    width: 200px;
    height: 140px;
    border-radius: 12px;
    object-fit: cover;
}



/* ویدیو */
.video-box {
    position: relative;
}

.video-thumb {
    width: 100%;
    border-radius: 12px;
}

.play-btn {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-btn i {
    font-size: 18px;
    color: #fff;
}

/* ردیف پایین پست: تاریخ + سه‌نقطه */
.post-footer {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* تاریخ سمت راست، سه‌نقطه سمت چپ در RTL */
}

/* تاریخ مثل قبل */
.post-date {
    font-size: 11px;
    color: #999;
}

/* دکمه سه‌نقطه */
.post-more-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #999;
    font-size: 16px;
}

.post-more-btn:active {
    opacity: 0.6;
}

/* ردیف پایین پست */
.post-footer {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* تاریخ */
.post-date {
    font-size: 11px;
    color: #999;
}

/* کانتینر آیکون‌ها */
.post-actions {
    display: flex;
    gap: 10px;
    /* فاصله بین آیکون‌ها */
}


.post-multi-images {
    overflow-x: auto;
    margin-bottom: 10px;

    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE */
}

.post-multi-images::-webkit-scrollbar {
    display: none;
    /* Chrome / Android */
}


.post-action-btn {
    display: block;
    width: 100%;
    margin-top: 25px;
    margin-bottom: 6px;

    background: #2bb673;
    color: #fff;
    text-align: center;

    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;

    text-decoration: none;
}

.post-action-btn:active {
    opacity: .85;
}


.image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .85);

    display: none;
    align-items: center;
    justify-content: center;

    z-index: 9999;
}

.image-viewer img {
    max-width: 92%;
    max-height: 85%;
    border-radius: 10px;
}















.channel-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.channel-actions a {
    width: 50px;
    height: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f5f7;
    color: #555;
    text-decoration: none;
    font-size: 10px;
}

.channel-actions a.edit-channel {
    color: #28a965;
}

.channel-actions a.delete-channel {
    color: #dc3545;
}

.channel-actions a:hover {
    background: #e9ecef;
}


/* اکشن‌های پست */
.post-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    justify-content: flex-end;
}

.post-actions a {
    width: 50px;
    height: 20px;
    border-radius: 4px;
    background: #f3f5f7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 10px;
    text-decoration: none;
}

.post-actions a.edit-post {
    color: #28a965;
}

.post-actions a.delete-post {
    color: #dc3545;
}

.post-actions a:hover {
    background: #e9ecef;
}




.delete-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.delete-modal.active {
    display: flex;
}

.delete-modal-box {
    width: 85%;
    max-width: 320px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.delete-modal-text {
    font-size: 14px;
    margin-bottom: 20px;
}

.delete-modal-actions {
    display: flex;
    gap: 10px;
}

.cancel-delete {
    flex: 1;
    border: none;
    background: #f1f1f1;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
}

.confirm-delete {
    flex: 1;
    background: #dc3545;
    color: white;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* حالت غیرفعال دکمه هنگام لود */
.confirm-delete.is-loading,
.confirm-delete[aria-busy="true"] {
    pointer-events: none;
    opacity: 0.85;
    position: relative;
}

/* محتوای داخل دکمه در حالت لود محو می‌شود تا فقط اسپینر دیده شود */
.confirm-delete.is-loading span.label,
.confirm-delete[aria-busy="true"] span.label {
    visibility: hidden;
}

/* اسپینر کوچک داخل دکمه */
.confirm-delete.is-loading::after,
.confirm-delete[aria-busy="true"]::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}