/* wrapper */
.ts-container { 
    margin:32px auto; 
    padding:0 14px; }
    
.ts-container h1 {
    font-size: 22px;
}

.ts-title-box {
    display: flex;
    flex-direction: row-reverse;
    width: 100%;
    max-width: 333px;
    box-sizing: border-box;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
}

.ts-title-box img {
    width: 180px !important;
    height: 110px !important;
    max-width: none !important;
    flex: 0 0 180px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.ts-title-box .ts-topic-image-link {
    display: block;
    width: 180px;
    flex: 0 0 180px;
}

@media (max-width: 600px) {
    .ts-title-box {
        width: 100%;
        max-width: 333px;
        box-sizing: border-box;
        gap: 10px;
        margin-left: auto;
        margin-right: auto;
    }

    .ts-title-box img {
        width: 120px !important;
        height: 80px !important;
        max-width: 120px !important;
        flex: 0 0 120px;
    }

    .ts-title-box .ts-topic-image-link {
        display: block;
        width: 120px;
        max-width: 120px;
        flex: 0 0 120px;
    }

    .ts-title-box .ts-topic-title-link {
        min-width: 0;
        max-width: calc(100% - 130px);
    }
}

.ts-card {
  display:flex;
  max-width: 333px;
  flex-direction: row-reverse;
  align-items:center;
  justify-content: flex-end;
  background:#fff;
  border-radius:12px;
  box-shadow: 0 14px 28px rgba(8,10,12,0.06);
  padding:6px;
  position:relative;
  transition: transform .22s cubic-bezier(.2,.9,.3,1), box-shadow .22s;
  margin-bottom: 5px;
}

/* rank */
.ts-card-left { padding-right: 15px;  }
.ts-rank-number {
    position: absolute;
    top: 1px;
    background-color: #58586f42;
    left: 21px;
    font-size: 26px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 4px 6px rgba(0, 0, 0, 1.35);
    pointer-events: none;  
}

/* image */
.ts-card-left img {
    width: 85px;
    height: 81px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);;
}

/* middle */
.ts-card-middle { 
   /* flex:1 1 auto; 
    
    display: flex; */
    
    width: 12rem;
}
.ts-post-title { margin:0 0 8px; font-size:18px; line-height:1.2; border-bottom: inset; font-weight: 700; }
.ts-post-title a {
    color: #000 !important;
    text-decoration: none !important;
}

.ts-post-title a:hover {
    text-decoration: none !important;
    color: #111 !important;
}

.ts-card-middle p { margin:0; color:#444; font-size: 0.5rem; line-height:1.5; padding-bottom: 3px; }

/* meta */
.ts-card-meta { 
    margin-top: 0px;
    display: flex;
    flex-direction: column;
    padding: 3px;
    color: #666;
    font-size: 7px;
    align-items: center;
    justify-content: center;
    height: 80px;
    border-radius: 1px 19px;
    background-color: #f0f0f0;
    margin-left: 6px; }

/* right: rating / score */
.ts-card-right { flex:0 0 6%; display:flex; flex-direction: column; align-items: flex-start; justify-content:space-between; }

/* icons container */
.ts-rate-icons { 
    display:flex; 
    flex-direction: row-reverse;
    justify-content: center;
    align-items:center;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 14px 28px rgba(8, 10, 12, 0.1); }


.ts-rate-icon {
  border: none;
  background: transparent;
  padding: 2px 2px 2px 2px;
  text-align:center;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  align-items:center;
  transition: transform .18s ease;
}

.ts-rate-icon:hover {
    transform: scale(1.15);
}


/* default icons: desaturated (linear) */
.ts-rate-icon img {
  width:25px;
  height:25px;
  object-fit:contain;
  filter: grayscale(1);
  transition: filter 180ms ease, transform 180ms ease, opacity 180ms ease;
  display:block;
  margin:0 auto;
  padding-left: 5px;
}


/* count below small */
.ts-rate-count { 
    font-size: 5px;
    text-align: center;
    margin-top: -4px;
    color: #fff;
    }

/* active icon = colored + slightly raised */
/* آیکون فعال قفل می‌شود */
.ts-rate-icon.active {
    filter: none !important;
    transform: scale(1.22);
    pointer-events: none !important;
}

/* فقط آیکون‌های غیرفعال قابل کلیک */
.ts-rate-icon:not(.active) {
  pointer-events: auto;
}

/* هاور بدون تغییر رنگ — فقط بزرگ شود */
.ts-rate-icon:not(.active):hover img {
  transform: scale(1.08);
  filter: grayscale(1);
}

/* آیکون انتخاب‌شده */
.ts-rate-icon.active img {
  filter: grayscale(0);
  transform: scale(1.18);
}

/* حرکت کارت */
.ts-card.ts-moving {
    z-index: 10;
    transform: scale(1.035);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}





/* visual for zero (if you want a special style) */
.ts-rate-icon[data-rating="0"] img { width:22px; height:22px; }

/* accessibility focus */
.ts-rate-icon:focus { outline:2px solid rgba(0,123,255,0.18); outline-offset:3px; }

/* optional: smoother rearrange animation when cards move */
.ts-card.moving { transition: transform 260ms cubic-bezier(.2,.9,.3,1), opacity 260ms ease; }


/* ظاهر آیکون صفر (می‌توانید استایل متفاوت بدهید) */
.ts-rate-icon.ts-rate-zero img { width:30px; height:30px; }

/* small disabled look (if you want) */
.ts-rate-icon[disabled] { opacity:.6; pointer-events:none; }


/* score + user given */
.ts-score-and-user { 
    display: flex;
    align-items: center;
    font-size: 6px;
    gap: 1px;
    color: #767676;
    padding: 4px 5px 0px 1px;
    }
    
.ts-score-and-user span {
    direction: ltr;
    unicode-bidi: bidi-override;
}    
.ts-score-box {
  min-width:72px; text-align:center;
}

.negative {
    color: red !important;
    font-weight: bold;
}

.ts-score-box.negative { color:#d33; }

.ts-card-rates { 
    display: flex;
    flex-direction: column;
    min-width: 80px;
    }

.ts-card-tozihat-rates { display:flex; flex-direction:column; min-width:80px; max-width: 12rem; }

/* user given small label */
.ts-user-given {/* color: #d0cccc; */}

/* smooth card reposition hint */
.ts-card.moving { box-shadow:0 20px 40px rgba(0,0,0,0.12); transform: translateY(-2px); }


/* --- LOADING STATE FOR ICONS --- */
.ts-wait {
    opacity: 0.4;
    pointer-events: none;
}

/* --- RANK PULSE EFFECT (number grows briefly) --- */
.ts-rank-pulse {
    animation: tsPulse 0.45s ease-out;
}

@keyframes tsPulse {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.45); color: #ffa700; }
    100% { transform: scale(1); }
}


/* responsive */
@media (max-width:900px) {
  .ts-card-right { justify-content:space-between; }
}



/* درخشش کارت */
.ts-card-glow {
    animation: tsGlow 0.9s ease-out;
}
@keyframes tsGlow {
    0% { box-shadow: 0 0 0 rgba(255,180,0,0); }
    40% { box-shadow: 0 0 20px rgba(255,180,0,0.8); }
    100% { box-shadow: 0 0 0 rgba(255,180,0,0); }
}

/* انیمیشن رنک برای کارت انتخاب شده */
.ts-rank-pulse {
    animation: rankPulse 0.5s ease-out;
}

@keyframes rankPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); color:#ff5722; }
    100% { transform: scale(1); }
}



/* =========================================================
   TOPIC DESCRIPTION
   توضیحات تاپیک
========================================================= */

/* =========================================================
   TOPIC DESCRIPTION
========================================================= */

#topic-description-box {

    background: #dfdfdf;

    border: 1px solid #ddd;

    padding: 14px 18px;

    border-radius: 10px;

    margin: 20px auto 25px;

    max-width: 320px;

    font-size: 15px;

    line-height: 1.7;

    position: relative;

    box-sizing: border-box;

}


/* ---------------------------------------------------------
   متن
--------------------------------------------------------- */

#topic-description-box p {

    margin: 0;

    padding: 0;

    max-height: 51px;

    overflow: hidden;

}


/* ---------------------------------------------------------
   حالت بسته
--------------------------------------------------------- */

#topic-description-box.description-collapsed p {

    max-height: 51px;

    overflow: hidden;

}


/* ---------------------------------------------------------
   حالت باز
--------------------------------------------------------- */

#topic-description-box.description-expanded p {

    max-height: none;

    overflow: visible;

}


/* ---------------------------------------------------------
   خود باکس در حالت باز
--------------------------------------------------------- */

#topic-description-box.description-expanded {

    max-height: 260px;

    overflow-y: auto;

}


/* ---------------------------------------------------------
   دکمه نمایش بیشتر / کمتر
--------------------------------------------------------- */

#description-toggle {

    display: none;

    margin-top: 8px;

    padding: 0;

    border: 0;

    background: transparent;

    color: #0073aa;

    font-family: inherit;

    font-weight: bold;

    font-size: 14px;

    line-height: 1.5;

    cursor: pointer;

    user-select: none;

}


/* ---------------------------------------------------------
   فقط اگر واقعاً متن بلند باشد
--------------------------------------------------------- */

#topic-description-box.ts-description-has-more
#description-toggle {

    display: inline-block;

}


/* ---------------------------------------------------------
   Hover
--------------------------------------------------------- */

#description-toggle:hover {

    color: #005a87;

    text-decoration: underline;

}


/* ---------------------------------------------------------
   وقتی متن کوتاه است، باکس هم طبیعی باشد
--------------------------------------------------------- */

#topic-description-box:not(.ts-description-has-more) {

    overflow: visible;

}

.ts-topic-description {
    
    position: absolute;
    top: -7px;
    right: -7px;
    background-color: #858585;
    border-radius: 4px;
    color: white;
    font-size: 12px;
}

.ts-subtopic-author {
    font-size: 5px;
    color: #9f9f9f;
    margin-top: -4px;
    text-align: center;
    max-width: 90px;
    height: 10px;
    overflow: hidden;
}




/* =========================================================
   TS CREATE SUBTOPIC MODAL
   ========================================================= */


/*
|--------------------------------------------------------------------------
| جلوگیری از اسکرول صفحه هنگام باز بودن Modal
|--------------------------------------------------------------------------
*/

body.ts-create-subtopic-modal-open {
    overflow: hidden;
}


/*
|--------------------------------------------------------------------------
| لایه اصلی Modal
|--------------------------------------------------------------------------
*/

.ts-create-subtopic-modal {

    position: fixed;

    inset: 0;

    z-index: 999999;

    display: flex;

    align-items: center;

    justify-content: center;

    visibility: hidden;

    opacity: 0;

    pointer-events: none;

    transition:
        opacity 0.22s ease,
        visibility 0.22s ease;

}


/*
|--------------------------------------------------------------------------
| Modal باز
|--------------------------------------------------------------------------
*/

.ts-create-subtopic-modal.show {

    visibility: visible;

    opacity: 1;

    pointer-events: auto;

}


/*
|--------------------------------------------------------------------------
| پس‌زمینه
|--------------------------------------------------------------------------
*/

.ts-create-subtopic-modal-overlay {

    position: absolute;

    inset: 0;

    background:
        rgba(0, 0, 0, 0.68);

    backdrop-filter:
        blur(3px);

    -webkit-backdrop-filter:
        blur(3px);

}


/*
|--------------------------------------------------------------------------
| Box اصلی
|--------------------------------------------------------------------------
*/

.ts-create-subtopic-modal-content {

    position: relative;

    z-index: 2;

    width: calc(100% - 28px);

    max-width: 520px;

    max-height: calc(100vh - 30px);

    overflow-y: auto;

    background: #fff;

    border-radius: 16px;

    padding: 24px 18px 20px;

    box-sizing: border-box;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.35);

    transform:
        translateY(20px)
        scale(0.97);

    transition:
        transform 0.22s ease;

}


/*
|--------------------------------------------------------------------------
| انیمیشن ورود Modal
|--------------------------------------------------------------------------
*/

.ts-create-subtopic-modal.show
.ts-create-subtopic-modal-content {

    transform:
        translateY(0)
        scale(1);

}


/*
|--------------------------------------------------------------------------
| فرم
|--------------------------------------------------------------------------
*/

.ts-create-subtopic-modal
.ts-create-subtopic-form {

    width: 100%;

    box-sizing: border-box;

}


/*
|--------------------------------------------------------------------------
| عنوان
|--------------------------------------------------------------------------
*/

.ts-create-subtopic-modal
.ts-create-subtopic-form h3 {

    margin:
        0 0 20px;

    padding:
        0 35px 12px 0;

    font-size: 20px;

    font-weight: 700;

    line-height: 1.5;

    border-bottom:
        1px solid #eee;

}


/*
|--------------------------------------------------------------------------
| دکمه X
|--------------------------------------------------------------------------
*/

.ts-create-subtopic-modal-close {

    position: absolute;

    top: 12px;

    right: 12px;

    z-index: 5;

    width: 34px;

    height: 34px;

    padding: 0;

    border: none;

    border-radius: 50%;

    background: #f1f1f1;

    color: #555;

    font-size: 17px;

    line-height: 34px;

    text-align: center;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;

}


.ts-create-subtopic-modal-close:hover {

    background: #e5e5e5;

    transform: scale(1.05);

}


/*
|--------------------------------------------------------------------------
| گروه‌های فرم
|--------------------------------------------------------------------------
*/

.ts-create-subtopic-modal
.ts-form-group {

    margin-bottom: 17px;

}


/*
|--------------------------------------------------------------------------
| Label
|--------------------------------------------------------------------------
*/

.ts-create-subtopic-modal
.ts-form-group label {

    display: block;

    margin-bottom: 7px;

    font-size: 14px;

    font-weight: 700;

    color: #333;

}


/*
|--------------------------------------------------------------------------
| Input / Textarea
|--------------------------------------------------------------------------
*/

.ts-create-subtopic-modal
.ts-form-group input[type="text"],

.ts-create-subtopic-modal
.ts-form-group textarea {

    width: 100%;

    box-sizing: border-box;

    border:
        1px solid #ddd;

    border-radius: 9px;

    background: #fafafa;

    padding: 10px 12px;

    font-family: inherit;

    font-size: 14px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;

}


.ts-create-subtopic-modal
.ts-form-group input[type="text"] {

    height: 44px;

}


.ts-create-subtopic-modal
.ts-form-group textarea {

    min-height: 130px;

    resize: vertical;

}


.ts-create-subtopic-modal
.ts-form-group input[type="text"]:focus,

.ts-create-subtopic-modal
.ts-form-group textarea:focus {

    border-color: #888;

    background: #fff;

    box-shadow:
        0 0 0 3px rgba(0, 0, 0, 0.06);

}


/*
|--------------------------------------------------------------------------
| File
|--------------------------------------------------------------------------
*/

.ts-create-subtopic-modal
.ts-form-group input[type="file"] {

    width: 100%;

    box-sizing: border-box;

    padding: 8px;

    border:
        1px solid #ddd;

    border-radius: 8px;

    background: #fafafa;

    font-family: inherit;

    font-size: 13px;

}


/*
|--------------------------------------------------------------------------
| توضیح حجم
|--------------------------------------------------------------------------
*/

.ts-create-subtopic-modal
.ts-form-group small {

    display: block;

    margin-top: 6px;

    color: #888;

    font-size: 11px;

}


/*
|--------------------------------------------------------------------------
| Preview
|--------------------------------------------------------------------------
*/

.ts-subtopic-image-preview {

    margin-top: 12px;

    text-align: center;

}


.ts-subtopic-image-preview img {

    display: block;

    width: 100%;

    max-width: 260px;

    max-height: 220px;

    margin: 0 auto;

    object-fit: cover;

    border-radius: 10px;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.15);

}


/*
|--------------------------------------------------------------------------
| پیام
|--------------------------------------------------------------------------
*/

.ts-create-subtopic-message {

    margin:
        8px 0 14px;

    font-size: 13px;

    line-height: 1.8;

}


.ts-create-subtopic-message:empty {

    display: none;

}


.ts-form-error {

    padding: 8px 10px;

    border-radius: 8px;

    background: #fff0f0;

    color: #c62828;

}


.ts-form-success {

    padding: 8px 10px;

    border-radius: 8px;

    background: #effaf0;

    color: #218838;

}


/*
|--------------------------------------------------------------------------
| دکمه‌های فرم
|--------------------------------------------------------------------------
*/

.ts-create-subtopic-actions {

    display: flex;

    gap: 8px;

    margin-top: 8px;

}


.ts-create-subtopic-actions button {

    flex: 1;

    min-height: 43px;

    border: none;

    border-radius: 9px;

    padding:
        8px 12px;

    font-family: inherit;

    font-size: 14px;

    font-weight: 700;

    cursor: pointer;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;

}


.ts-create-subtopic-actions button:hover {

    transform:
        translateY(-1px);

}


.ts-create-subtopic-actions button:disabled {

    opacity: 0.55;

    cursor: wait;

    transform: none;

}


/*
|--------------------------------------------------------------------------
| دکمه انتشار
|--------------------------------------------------------------------------
*/

.ts-create-subtopic-submit {

    background: #222;

    color: #fff;

}


/*
|--------------------------------------------------------------------------
| دکمه انصراف
|--------------------------------------------------------------------------
*/

.ts-create-subtopic-cancel {

    background: #eee;

    color: #333;

}


/*
|--------------------------------------------------------------------------
| موبایل
|--------------------------------------------------------------------------
*/

@media (max-width: 600px) {

    .ts-create-subtopic-modal-content {

        width:
            calc(100% - 18px);

        max-height:
            calc(100vh - 18px);

        padding:
            22px 14px 16px;

        border-radius:
            14px;

    }


    .ts-create-subtopic-modal
    .ts-create-subtopic-form h3 {

        font-size: 18px;

        margin-bottom: 16px;

    }


    .ts-create-subtopic-actions {

        flex-direction: column;

    }


    .ts-create-subtopic-actions button {

        width: 100%;

    }

}

.ts-end-create-post {
    color: blue;
    text-decoration: underline;
    cursor: pointer;
}

/* =========================================
   وضعیت آپلود تصویر
========================================= */

.ts-form-uploading {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f3f3f3;
    color: #555;
    font-size: 13px;
    text-align: center;
}

.ts-form-uploading strong {
    direction: ltr;
    display: inline-block;
    margin-right: 4px;
}

.ts-form-upload-complete {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #e9f8ed;
    color: #218838;
    font-size: 13px;
    text-align: center;
}


/* =========================================================
   POST PENDING BADGE
   پست منتشر شده ولی هنوز توسط مدیریت بررسی نشده
========================================================= */

.ts-card-pending {
    position: relative;
}

.ts-pending-badge {
    position: absolute;
    bottom: 3px;
    right: 145px;
    height: 20px;

    z-index: 50;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 3px 7px;

    background: rgba(255, 193, 7, 0.95);
    color: #5a4300;

    border-radius: 6px;

    font-size: 6px;
    font-weight: 700;

    line-height: 1.4;

    white-space: nowrap;

    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);

    pointer-events: none;
}

@media (max-width: 600px) {

    .ts-pending-badge {
        font-size: 7px;
        padding: 2px 5px;
    }

}


/* =========================================================
   POST IMAGE UPLOAD PROGRESS BAR
========================================================= */

.ts-form-uploading {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f3f3f3;
    color: #555;
    font-size: 13px;
    text-align: center;
}

.ts-upload-progress-text {
    margin-bottom: 8px;
    line-height: 1.8;
}

.ts-upload-progress-text strong {
    direction: ltr;
    display: inline-block;
    margin-right: 4px;
    font-weight: 700;
}


/* نوار پس‌زمینه */

.ts-upload-progress-track {
    width: 100%;
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #ddd;
    direction: ltr;
}


/* قسمت پرشونده */

.ts-upload-progress-bar {
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: #222;
    transition: width 0.15s ease;
}

/* =========================================================
   دکمه ایجاد پست
   پایین سمت چپ صفحه
   ========================================================= */

.ts-create-post-floating {
    position: fixed;
    left: 20px;
    bottom: 20px;

    z-index: 9999;

    margin: 0;
    padding: 0;

    direction: ltr;
}

.ts-create-post-floating .ts-create-post-btn {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    margin: 0;
    padding: 10px 16px;

    border: 0;
    border-radius: 10px;

    cursor: pointer;

    font-size: 14px;
    font-weight: 600;

    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);

    white-space: nowrap;
}




.ts-modal-box-p {
  font-size: 10px;
  color: #ff0000;
}

.ts-modal-box-p2 {
  font-size: 10px;
  color: #00a930;
}
/* =========================================================
   Empty Topic / اولین پست
   ظاهر جمع‌وجور و نزدیک به کارت‌های پست
========================================================= */

.ts-empty-subtopics {
    width: 100%;
    max-width: 370px;
    margin: 28px auto;
    padding: 20px 14px;
    box-sizing: border-box;
    text-align: center;
    background: #fff;
    border: 1px solid #eeeeee;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(8, 10, 12, 0.06);
}

.ts-empty-subtopics-title {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.7;
    color: #222;
}

.ts-empty-subtopics-subtitle {
    display: inline-block;
    margin: 0 0 16px;
    padding: 7px 13px;
    border: 0;
    border-radius: 10px;
    background: #f3f3f6;
    color: #555;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.7;
}

button.ts-empty-subtopics-subtitle {
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

button.ts-empty-subtopics-subtitle:hover {
    transform: translateY(-1px);
    background: #e9e9ee;
    box-shadow: 0 5px 14px rgba(8, 10, 12, 0.08);
}

/* فرم ایجاد اولین پست؛ تقریباً هم‌اندازه کارت‌های ts-card */
.ts-empty-subtopics .ts-empty-create-card {
    width: 100%;
    max-width: 345px;
    margin: 4px auto 0;
    padding: 6px;
    box-sizing: border-box;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 14px 28px rgba(8, 10, 12, 0.06);
}

.ts-empty-subtopics .ts-empty-create-form {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-align: right;
}

.ts-empty-subtopics .ts-empty-create-form h3 {
    margin: 0 0 18px;
    padding: 0 0 10px;
    font-size: 18px;
    line-height: 1.6;
}

.ts-empty-subtopics .ts-empty-create-form .ts-form-group {
    width: 100%;
    box-sizing: border-box;
}

.ts-empty-subtopics .ts-empty-create-form input[type="text"],
.ts-empty-subtopics .ts-empty-create-form textarea,
.ts-empty-subtopics .ts-empty-create-form input[type="file"] {
    max-width: 100%;
    box-sizing: border-box;
}

.ts-empty-subtopics .ts-modal-box-p,
.ts-empty-subtopics .ts-modal-box-p2 {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 8px 0 12px;
    line-height: 1.8;
}

.ts-empty-subtopics .ts-create-subtopic-actions {
    margin-top: 14px;
}

@media (max-width: 600px) {

    .ts-empty-subtopics {
        max-width: 100%;
        margin: 22px auto;
        padding: 18px 10px;
    }

    .ts-empty-subtopics .ts-empty-create-card {
        max-width: 345px;
    }

    .ts-empty-subtopics-title {
        font-size: 18px;
    }
}


/* =========================================================
   SAVE ICON
   همان فرم روبانی انتخاب‌شده توسط کاربر
========================================================= */

.ts-like-btn {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    color: #777;
    padding: 2px 3px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    font: inherit;
    line-height: 1;
}

.ts-like-btn .ts-like-icon {
    width: 10px;
    height: 19px;
    display: inline-flex;
    position: relative;
    flex: 0 0 auto;
}

.ts-like-btn .ts-like-icon svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.ts-like-btn .ts-save-filled {
    display: none;
}

.ts-like-btn.liked {
    color: #000;
}

.ts-like-btn.liked .ts-save-outline {
    display: none;
}

.ts-like-btn.liked .ts-save-filled {
    display: block;
}

.ts-like-btn:hover {
    color: #000;
}

.ts-like-btn.ts-save-loading {
    opacity: .55;
    pointer-events: none;
}


/* =========================================================
   SHARE BUTTON
   گوشه بالا سمت راست؛ بدون تغییر در چیدمان کارت
========================================================= */

.ts-share-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 60;
    width: 20px;
    height: 20px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #777;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
}

.ts-share-btn svg {
    width: 16px;
    height: 16px;
    display: block;
}

.ts-share-btn:hover {
    color: #000;
    transform: scale(1.08);
}

.ts-share-btn.ts-share-copied {
    color: #000;
}


/* =========================================================
   کارت مقصد Share
========================================================= */

.ts-card.ts-share-target {
    z-index: 100;
    animation: tsShareTarget 2.2s ease-out;
}

@keyframes tsShareTarget {
    0% {
        box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    }
    20% {
        box-shadow: 0 0 22px rgba(0, 0, 0, 0.35);
    }
    65% {
        box-shadow: 0 0 22px rgba(0, 0, 0, 0.35);
    }
    100% {
        box-shadow: 0 14px 28px rgba(8, 10, 12, 0.06);
    }
}


/* =========================================================
   Save / comment counters
   فقط برای نمایش صحیح تعداد کنار آیکون
========================================================= */

.ts-like-btn {
    color: #222;
    white-space: nowrap;
}

.ts-like-btn .ts-like-count,
.ts-comment-meta .ts-comment-count {
    display: inline-block;
    min-width: 10px;
    text-align: center;
    color: #333;
    font-size: 8px;
    line-height: 1;
}

.ts-comment-meta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    white-space: nowrap;
}

.ts-comment-icon {
    line-height: 1;
    font-size: 8px;
}

/* Share: سفید با دورخط مشکی، بدون تغییر مکان */
.ts-share-btn {
    color: #111;
}

.ts-share-btn svg {
    filter: none;
}


/* =========================================================
   SAVE - حالت پیش فرض سفید، فقط دورخط مشکی
   حالت ذخیره شده: کاملاً مشکی
========================================================= */
.ts-like-btn,
.ts-like-btn:hover {
    color: #111;
}

.ts-like-btn .ts-save-outline path {
    fill: #fff !important;
    stroke: #111 !important;
}

.ts-like-btn .ts-save-filled path {
    fill: #111 !important;
}

.ts-like-btn:not(.liked) .ts-save-outline {
    display: block !important;
}

.ts-like-btn:not(.liked) .ts-save-filled {
    display: none !important;
}

.ts-like-btn.liked .ts-save-outline {
    display: none !important;
}

.ts-like-btn.liked .ts-save-filled {
    display: block !important;
}

/* =========================================================
   SHARE دسکتاپ - بدون ظاهر کادری
========================================================= */
.ts-share-btn {
    appearance: none;
    -webkit-appearance: none;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.ts-share-btn:focus,
.ts-share-btn:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

@media (min-width: 601px) {
    .ts-share-btn {
        background: transparent !important;
        border-radius: 0 !important;
        width: 22px;
        height: 22px;
    }

    .ts-share-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* پیام کپی روی دسکتاپ، بدون کادر مرورگر */
.ts-share-copy-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    z-index: 999999;
    padding: 7px 12px;
    border-radius: 8px;
    background: #111;
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    pointer-events: none;
    opacity: 0;
    animation: tsShareToastIn 1.5s ease forwards;
}

@keyframes tsShareToastIn {
    0% { opacity: 0; transform: translate(-50%, 8px); }
    15%, 80% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -4px); }
}

/* =========================================================
   SAVE / COMMENT COUNTERS - آیکون بالا، عدد زیر آیکون
   فقط ظاهر شمارنده‌ها تغییر می‌کند؛ مکان کلی کارت ثابت می‌ماند.
========================================================= */
.ts-card-meta .ts-like-btn,
.ts-card-meta .ts-comment-meta {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 22px;
}

.ts-card-meta .ts-like-btn .ts-like-icon {
    display: block;
}

.ts-card-meta .ts-like-btn .ts-like-count,
.ts-card-meta .ts-comment-meta .ts-comment-count {
    display: block;
    min-width: 10px;
    height: auto;
    line-height: 1;
    text-align: center;
}

/* Share desktop: بدون کادر/tooltip مرورگر */
@media (min-width: 601px) {
    .ts-share-btn {
        appearance: none !important;
        -webkit-appearance: none !important;
        border: 0 !important;
        outline: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
        border-radius: 0 !important;
    }
}

/* پیام کوچک و موقت «لینک کپی شد» */
.ts-share-copy-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 999999;
    padding: 6px 11px;
    border-radius: 7px;
    background: #111;
    color: #fff;
    font-size: 11px;
    line-height: 1.4;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 5px 18px rgba(0,0,0,.18);
    animation: tsShareToastIn 1.6s ease forwards;
}
