.anlamtv-tabs-widget {
    background: #fff;
    border-radius: 8px;
    overflow: hidden; /* لبه‌های گرد کانتینر */
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    margin: 24px 0;
    min-height: var(--anlamtv-tabs-min-height, 480px); /* برای هم‌ترازی با اسلایدرهای کنارش */
    display: flex;
    flex-direction: column;
}

/* فقط روی صفحات واقعاً راست‌چین (کلاسی که خودِ وردپرس بر اساس زبان فعلی—از
   جمله زبان تعیین‌شده توسط Bogo—به‌طور خودکار به body اضافه می‌کند) راست‌چین
   می‌شود؛ روی صفحات چپ‌چین با جهت طبیعی چپ‌به‌راست نمایش داده می‌شود. */
body.rtl .anlamtv-tabs-widget {
    direction: rtl;
}

.anlamtv-tabs-widget__main-title {
    font-size: 18px;
    margin: 0;
    padding: 16px 16px 12px;
    padding-inline-start: 20px;
    border-inline-start: 4px solid #d32f2f;
}

/* --- نوار تب‌ها: آیکون بالا، عنوان پایین آیکون (مثل چیدمان قالب)؛ تب‌های
   غیرفعال با پس‌زمینه‌ی خیلی روشن (#f8f8f8) و تب فعال بدون پس‌زمینه (هم‌رنگ
   کانتینر سفید) از هم متمایز می‌شوند. بدون خط زیرین، تا پیوند تب فعال با
   بدنه‌ی محتوای زیرش گسسته نشود. --- */
.anlamtv-tabs-widget__nav {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    gap: 2px; /* گپ کم بین تب‌ها برای جاگیری بهتر */
    background: transparent;
    padding-inline-start: 3px; /* حداکثر ۳ پیکسل فاصله از منتهی‌الیه راست در چیدمان راست‌چین */
    padding-inline-end: 6px;
    padding-top: 10px;
    min-width: 0;
}

.anlamtv-tabs-widget__nav::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.anlamtv-tabs-widget__tab-btn {
    appearance: none;
    border: none;
    outline: none;
    background: #f8f8f8; /* تب‌های غیرفعال: پس‌زمینه‌ی خیلی روشن */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 10px 7px;
    font-size: 12.5px;
    cursor: pointer;
    white-space: nowrap; /* تکنیک اصلی: عنوان هرگز نمی‌شکند و به خط دوم نمی‌رود */
    flex: 0 1 auto;
    min-width: 0;
    color: #6b6b70; /* غیرفعال: فقط کمی تیره‌تر از متن معمولی */
    border-radius: 6px 6px 0 0;
    transition: background 0.2s ease, color 0.2s ease;
}

.anlamtv-tabs-widget__tab-btn:not(.is-active) {
    padding-inline: 6px; /* پدینگ چپ/راست کمتر مخصوص تب‌های غیرفعال، برای صرفه‌جویی در فضا */
}

.anlamtv-tabs-widget__tab-btn:hover {
    color: #d32f2f;
}

.anlamtv-tabs-widget__tab-btn:focus,
.anlamtv-tabs-widget__tab-btn:active {
    outline: none;
    box-shadow: none; /* بدون هیچ خط یا حلقه‌ی روی کلیک/فوکوس */
}

.anlamtv-tabs-widget__tab-btn.is-active {
    background: #fff; /* هم‌رنگ کانتینر اصلی محتوا، بدون هیچ مرز یا خطی */
    color: #d32f2f;
    font-weight: bold;
}

.anlamtv-tabs-widget__tab-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.anlamtv-tabs-widget__tab-icon svg {
    width: 100%;
    height: 100%;
}

.anlamtv-tabs-widget__tab-label {
    overflow: hidden;
    min-width: 0;
}

/* اگر با کاهش پدینگ/گپ هم عنوان یک تب غیرفعال جا نشود، به‌جای سرریز یا
   شکستن به خط دوم، بخش بیرون‌زده به سه‌نقطه (…) تبدیل می‌شود. */
.anlamtv-tabs-widget__tab-btn:not(.is-active) .anlamtv-tabs-widget__tab-label {
    max-width: 72px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.anlamtv-tabs-widget__panels {
    background: #fff;
    padding: 10px 16px 16px;
    border-top: 1px solid #eee;
    flex: 1 1 auto;
    overflow-y: auto;
}

.anlamtv-tabs-widget__panel {
    display: none;
}

.anlamtv-tabs-widget__panel.is-active {
    display: block;
}

.anlamtv-tabs-widget__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.anlamtv-tabs-widget__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-top: 1px solid #f2f2f2;
}

.anlamtv-tabs-widget__item:first-child {
    border-top: none;
}

.anlamtv-tabs-widget__thumb {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 4px;
    overflow: hidden;
    background: #eee;
    display: block;
}

.anlamtv-tabs-widget__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.anlamtv-tabs-widget__item-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.anlamtv-tabs-widget__item-title {
    font-size: 13px;
    color: #222;
    text-decoration: none;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.anlamtv-tabs-widget__item-title:hover {
    color: #d32f2f;
}

.anlamtv-tabs-widget__item-meta {
    font-size: 11px;
    color: #999;
}

.anlamtv-tabs-widget__empty {
    font-size: 13px;
    color: #999;
    padding: 12px 0;
}
