/*
Theme Name: استاد شو
Version: 2.9
Author: پیشتاز وب
Author URI: https://www.rtl-theme.com/author/mmehrani
Description: پوسته آموزشی و فروش فایل وردپرس
Requires PHP: 7.4
Template:  ostadsho
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Tags: learn theme, wordpress theme, learning template,ostadsho theme,ostad sho
PishtazWeb Theme, (C) 2024 pishtaz-web.com
*/
code {
    color: #00F5D4;
}
/* CSS اسکرول بار */
body::-webkit-scrollbar {
  width: 16px;
}
body::-webkit-scrollbar-track {
  background: #1e1e2e;
  border-radius: 50px;
}
body::-webkit-scrollbar-thumb {
  background: #6640fd;
  border-radius: 20px;
  border: 3px solid #1e1e2e; 
}
/* تعریف متغیر در حالت عمومی و لایت */
:root, [data-theme="light"] {
    --ostadsho-custom-bg: #ffffff; /* رنگ در حالت روز */
}

/* تغییر مقدار متغیر در حالت دارک */
[data-theme="dark"] {
    --ostadsho-custom-bg: var(--dark-theme-main); /* رنگ در حالت شب */
}
.new-ostadsho-custom-bg{
    background: var(--ostadsho-custom-bg) !important;
    transition: background 0.3s ease;
}

/*رنگ دوم تم دارک و لایت*/
/* تعریف متغیر برای حالت عمومی و روشن */
:root, [data-theme="light"] {
    --product-right-info-bg: #F9F9F9; /* رنگ خاکستری خیلی روشن */
}

/* تغییر مقدار متغیر برای حالت دارک */
[data-theme="dark"] {
    --product-right-info-bg: var(--dark-theme-two); /* استفاده از متغیر تم تاریک */
}

/* کلاس مربوط به اعمال پس‌زمینه */
.new-ostadsho-custom-bg-two {
    background: var(--product-right-info-bg) !important;
/* 	box-shadow: var(--bcards-bcard-shadow); */
	border-radius: 10px;
    transition: background 0.3s ease; /* انیمیشن نرم برای تغییر رنگ */
}

.bcards .bcard .bcardimages {
    overflow: hidden;
    transition: .2s;
    border-radius: 10px;
    max-height: none; /* محدودیت ارتفاع برداشته شد */
}

.bcards .bcard .bcardimages img {
    display: block;
    width: 100%;
    height: auto; /* ارتفاع دقیقاً برابر با خود تصویر */
}


pre {
  white-space: pre-wrap;       /* شکستن خطوط */
  word-wrap: break-word;       /* سازگاری قدیمی */
  overflow-x: hidden;          /* حذف اسکرول افقی */
}

/* =======================================
   استایل‌دهی متن و پاراگراف‌ها
   ======================================= */
.pweb_product_content p {
    margin-bottom: 1.6em !important; /* فاصله مناسب بین پاراگراف‌ها */
    line-height: 1.7 !important;     /* ارتفاع خط خواناتر */
}

/* =======================================
   استایل‌دهی هدرها
   ======================================= */
.pweb_product_content h2,
.pweb_product_content h3 {
    margin-top: 1.8em !important;
    margin-bottom: 1em !important;
    line-height: 1.4 !important;
}

/* =======================================
   استایل‌دهی لیست‌ها
   ======================================= */
.pweb_product_content ul,
.pweb_product_content ol {
    margin-top: 1em !important;
    margin-bottom: 1.5em !important;
    padding-left: 25px !important; /* فاصله از لبه چپ */
}

/* فاصله بین آیتم‌های لیست */
.pweb_product_content ul li,
.pweb_product_content ol li {
    margin-bottom: 0.8em !important;
    line-height: 1.6 !important;
}

/* حذف فاصله اضافی آخرین آیتم لیست */
.pweb_product_content ul li:last-child,
.pweb_product_content ol li:last-child {
    margin-bottom: 0 !important;
}

/* حالت لایت مود (پیش‌فرض) */
.pweb-ajax-products .products .product .detail-box {
    background: #FFF !important;
}

/* حالت دارک مود */
body.dark-mode .pweb-ajax-products .products .product .detail-box,
body[data-theme="dark"] .pweb-ajax-products .products .product .detail-box {
    background: var(--dark-theme-two) !important;
}

.product-custom-label {
    white-space: nowrap;
}











/* ========================================
   🎨 ADVANCED TABLE STYLES
   فقط برای جدول‌های داخل .pweb_product_content
   ======================================== */

/* ===== متغیرهای Light Mode ===== */
:root, [data-theme="light"] {
    --table-bg-primary: #ffffff;
    --table-bg-secondary: #F9F9F9;
    --table-bg-hover: #f3f0ff;
    --table-header-bg: linear-gradient(135deg, #6640fd 0%, #8b5cf6 100%);
    --table-text-primary: #2B2C2E;
    --table-text-secondary: #717070;
    --table-text-header: #ffffff;
    --table-text-accent: #6640fd;
    --table-border-light: #EDEDED;
    --table-border-medium: #d5d8dc;
    --table-border-accent: #6640fd;
    --table-shadow-light: 0 2px 8px rgba(102, 64, 253, 0.08);
    --table-shadow-medium: 0 4px 16px rgba(102, 64, 253, 0.12);
    --table-shadow-hover: 0 8px 24px rgba(102, 64, 253, 0.16);
    --badge-success-bg: #e8f5e9;
    --badge-success-text: #2e7d32;
    --badge-warning-bg: #fff3e0;
    --badge-warning-text: #ef6c00;
    --badge-danger-bg: #ffebee;
    --badge-danger-text: #c62828;
    --badge-info-bg: #e3f2fd;
    --badge-info-text: #1565c0;
}

/* ===== متغیرهای Dark Mode ===== */
[data-theme="dark"] {
    --table-bg-primary: #1e1e2e;
    --table-bg-secondary: #12121a;
    --table-bg-hover: #2a2547;
    --table-header-bg: linear-gradient(135deg, #7c5cfc 0%, #9f7aea 100%);
    --table-text-primary: #e6e8ea;
    --table-text-secondary: #babfc5;
    --table-text-header: #ffffff;
    --table-text-accent: #a78bfa;
    --table-border-light: #2a2a3a;
    --table-border-medium: #3a3a4a;
    --table-border-accent: #7c5cfc;
    --table-shadow-light: 0 2px 8px rgba(0, 0, 0, 0.3);
    --table-shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.4);
    --table-shadow-hover: 0 8px 24px rgba(124, 92, 252, 0.25);
    --badge-success-bg: rgba(46, 125, 50, 0.2);
    --badge-success-text: #81c784;
    --badge-warning-bg: rgba(239, 108, 0, 0.2);
    --badge-warning-text: #ffb74d;
    --badge-danger-bg: rgba(198, 40, 40, 0.2);
    --badge-danger-text: #e57373;
    --badge-info-bg: rgba(21, 101, 192, 0.2);
    --badge-info-text: #64b5f6;
}

/* ========================================
   📦 FIX: محدود کردن CONTAINER اصلی
   ======================================== */

.pweb_product_content {
    /* جلوگیری از بیرون‌زدگی محتوا */
    max-width: 100%;
    overflow-x: hidden; /* کل صفحه اسکرول نمی‌خورد */
    box-sizing: border-box;
}

/* ========================================
   📊 CONTAINER & TABLE BASE
   ======================================== */

.pweb_product_content .wp-block-table {
    width: 100%;
    max-width: 100%;
    overflow-x: auto; /* فقط جدول اسکرول می‌خورد */
    overflow-y: hidden;
    margin: 2rem 0;
    border-radius: 12px;
    background: var(--table-bg-primary);
    box-shadow: var(--table-shadow-medium);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--table-border-accent) var(--table-bg-secondary);
    box-sizing: border-box;
}

/* Custom Scrollbar */
.pweb_product_content .wp-block-table::-webkit-scrollbar { height: 8px; }
.pweb_product_content .wp-block-table::-webkit-scrollbar-track {
    background: var(--table-bg-secondary);
    border-radius: 4px;
}
.pweb_product_content .wp-block-table::-webkit-scrollbar-thumb {
    background: var(--table-border-accent);
    border-radius: 4px;
}
.pweb_product_content .wp-block-table::-webkit-scrollbar-thumb:hover {
    background: var(--theme-main-hover-color, #5530e0);
}

.pweb_product_content .wp-block-table:hover {
    box-shadow: var(--table-shadow-hover);
    transform: translateY(-2px);
}

/* استایل اصلی Table */
.pweb_product_content table {
    width: 100%;
    min-width: 100%; /* حداقل اندازه */
    border-collapse: separate;
    border-spacing: 0;
    font-family: var(--theme-main-font, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif);
    font-size: var(--theme-main-font-size, 15px);
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
}

/* ========================================
   🎯 TABLE HEADER (thead)
   ======================================== */

.pweb_product_content table thead {
    position: relative;
}

.pweb_product_content table thead::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--table-border-accent);
    opacity: 0.3;
}

.pweb_product_content table thead tr {
    background: var(--table-header-bg);
    position: relative;
}

.pweb_product_content table thead th {
    padding: 18px 24px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--table-text-header);
    border: none;
    position: relative;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.pweb_product_content table thead th:first-child {
    border-top-right-radius: 12px;
    padding-right: 32px;
}

.pweb_product_content table thead th:last-child {
    border-top-left-radius: 12px;
    padding-left: 32px;
}

.pweb_product_content table thead th:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    bottom: 25%;
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
}

/* ========================================
   📝 TABLE BODY (tbody)
   ======================================== */

.pweb_product_content table tbody tr {
    background: var(--table-bg-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.pweb_product_content table tbody tr:nth-child(even) {
    background: var(--table-bg-secondary);
}

.pweb_product_content table tbody tr:hover {
    background: var(--table-bg-hover);
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(102, 64, 253, 0.1);
    z-index: 1;
}

.pweb_product_content table tbody td {
    padding: 16px 24px;
    color: var(--table-text-primary);
    border-bottom: 1px solid var(--table-border-light);
    transition: all 0.3s ease;
    position: relative;
}

.pweb_product_content table tbody td:first-child {
    font-weight: 600;
    color: var(--table-text-accent);
    padding-right: 32px;
}

.pweb_product_content table tbody td:last-child {
    padding-left: 32px;
}

.pweb_product_content table tbody tr:last-child td {
    border-bottom: none;
}

.pweb_product_content table tbody tr:last-child td:first-child {
    border-bottom-right-radius: 12px;
}

.pweb_product_content table tbody tr:last-child td:last-child {
    border-bottom-left-radius: 12px;
}

/* ========================================
   🏷️ BADGES & STATUS INDICATORS
   ======================================== */

.pweb_product_content table .table-badge,
.pweb_product_content table tbody td .badge,
.pweb_product_content table tbody td [class*="status-"],
.pweb_product_content table tbody td [class*="badge-"] {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.pweb_product_content table .badge-success,
.pweb_product_content table .status-success,
.pweb_product_content table .status-active {
    background: var(--badge-success-bg);
    color: var(--badge-success-text);
}

.pweb_product_content table .badge-warning,
.pweb_product_content table .status-warning,
.pweb_product_content table .status-pending {
    background: var(--badge-warning-bg);
    color: var(--badge-warning-text);
}

.pweb_product_content table .badge-danger,
.pweb_product_content table .status-danger,
.pweb_product_content table .status-inactive {
    background: var(--badge-danger-bg);
    color: var(--badge-danger-text);
}

.pweb_product_content table .badge-info,
.pweb_product_content table .status-info {
    background: var(--badge-info-bg);
    color: var(--badge-info-text);
}

/* ========================================
   🎨 SPECIAL CELL TYPES
   ======================================== */

.pweb_product_content table tbody td[data-type="number"],
.pweb_product_content table tbody td.numeric {
    font-family: 'Segoe UI', monospace;
    font-weight: 600;
    text-align: left;
    direction: ltr;
    color: var(--table-text-accent);
}

.pweb_product_content table tbody td[data-type="date"],
.pweb_product_content table tbody td.date {
    font-family: var(--theme-main-font);
    color: var(--table-text-secondary);
    font-size: 14px;
}

.pweb_product_content table tbody td a {
    color: var(--table-text-accent);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.pweb_product_content table tbody td a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--table-border-accent);
    transition: width 0.3s ease;
}

.pweb_product_content table tbody td a:hover {
    color: var(--theme-main-hover-color, #5530e0);
}

.pweb_product_content table tbody td a:hover::after {
    width: 100%;
}

/* ========================================
   📱 RESPONSIVE DESIGN
   ======================================== */

@media screen and (max-width: 1024px) {
    .pweb_product_content .wp-block-table { margin: 1.5rem 0; }
    .pweb_product_content table { font-size: 14px; }
    .pweb_product_content table thead th { padding: 16px 20px; font-size: 13px; }
    .pweb_product_content table tbody td { padding: 14px 20px; }
}

@media screen and (max-width: 768px) {
    .pweb_product_content .wp-block-table {
        margin: 1rem 0;
        border-radius: 8px;
    }

    .pweb_product_content table {
        font-size: 13px;
        min-width: 600px; /* حداقل عرض برای اسکرول */
    }

    .pweb_product_content table thead th {
        padding: 12px 14px;
        font-size: 12px;
    }

    .pweb_product_content table tbody td { 
        padding: 10px 14px; 
        font-size: 13px; 
    }

    .pweb_product_content table .table-badge,
    .pweb_product_content table tbody td .badge {
        font-size: 11px;
        padding: 4px 10px;
    }
}

@media screen and (max-width: 480px) {
    .pweb_product_content .wp-block-table {
        margin: 0.75rem 0;
        border-radius: 8px;
    }

    .pweb_product_content table {
        font-size: 12px;
        min-width: 500px; /* عرض کافی برای اسکرول */
    }

    .pweb_product_content table thead th { padding: 10px 12px; font-size: 11px; }
    .pweb_product_content table tbody td { padding: 8px 12px; font-size: 12px; }

    /* Scroll Indicator */
    .pweb_product_content .wp-block-table::after {
        content: '← اسکرول کنید';
        position: sticky;
        left: 50%;
        transform: translateX(-50%);
        display: block;
        text-align: center;
        background: var(--table-border-accent);
        color: white;
        padding: 6px 14px;
        border-radius: 20px;
        font-size: 10px;
        font-weight: 600;
        opacity: 0.85;
        margin-top: 8px;
        white-space: nowrap;
        z-index: 10;
        animation: scrollHint 2s ease-in-out infinite;
    }
}

@keyframes scrollHint {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 0.5; }
}

/* ========================================
   ✨ ANIMATIONS
   ======================================== */

@keyframes tableLoad {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.pweb_product_content table tbody tr {
    animation: tableLoad 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.pweb_product_content table tbody tr:nth-child(1) { animation-delay: 0.05s; }
.pweb_product_content table tbody tr:nth-child(2) { animation-delay: 0.1s; }
.pweb_product_content table tbody tr:nth-child(3) { animation-delay: 0.15s; }
.pweb_product_content table tbody tr:nth-child(4) { animation-delay: 0.2s; }
.pweb_product_content table tbody tr:nth-child(5) { animation-delay: 0.25s; }
.pweb_product_content table tbody tr:nth-child(n+6) { animation-delay: 0.3s; }

/* ========================================
   🔍 SORTABLE TABLES
   ======================================== */

.pweb_product_content table thead th.sortable {
    cursor: pointer;
    user-select: none;
    padding-left: 40px;
}

.pweb_product_content table thead th.sortable::before {
    content: '⇅';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.pweb_product_content table thead th.sortable:hover::before {
    opacity: 1;
    transform: translateY(-50%) scale(1.2);
}

.pweb_product_content table thead th.sortable.asc::before { content: '↑'; opacity: 1; }
.pweb_product_content table thead th.sortable.desc::before { content: '↓'; opacity: 1; }

/* ========================================
   🎯 ACCESSIBILITY
   ======================================== */

.pweb_product_content table tbody tr:focus-within {
    outline: 2px solid var(--table-border-accent);
    outline-offset: -2px;
}

.pweb_product_content table tbody td:focus,
.pweb_product_content table tbody td a:focus {
    outline: 2px solid var(--table-border-accent);
    outline-offset: 4px;
    border-radius: 4px;
}

/* ========================================
   🌟 TABLE VARIATIONS
   ======================================== */

.pweb_product_content table.table-compact thead th,
.pweb_product_content table.table-compact tbody td { padding: 10px 16px; }

.pweb_product_content table.table-bordered tbody td {
    border: 1px solid var(--table-border-light);
}

.pweb_product_content table.table-borderless tbody td { border: none; }

.pweb_product_content table.table-hoverable tbody tr { background: var(--table-bg-primary); }
.pweb_product_content table.table-hoverable tbody tr:hover { background: var(--table-bg-hover); }

/* ========================================
   💫 EMPTY STATE
   ======================================== */

.pweb_product_content table tbody tr.empty-state td {
    text-align: center;
    padding: 48px 24px;
    color: var(--table-text-secondary);
    font-style: italic;
}

.pweb_product_content table tbody tr.empty-state td::before {
    content: '📋';
    display: block;
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

/* ========================================
   🎨 PRINT STYLES
   ======================================== */

@media print {
    .pweb_product_content .wp-block-table {
        box-shadow: none;
        border: 1px solid #ccc;
        overflow: visible;
    }

    .pweb_product_content table tbody tr:hover {
        transform: none;
        box-shadow: none;
    }

    .pweb_product_content table thead {
        background: #f0f0f0 !important;
        color: #000 !important;
    }
}







/* استایل پیام‌های دسترسی */
.pweb-accordion-content .alert {
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.pweb-accordion-content .alert i {
    font-size: 18px;
}

.pweb-accordion-content .alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.pweb-accordion-content .alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.pweb-accordion-content .alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* مخفی کردن بخش انتخاب محصول در فرم تیکت */
.select_custom_wpyar:has(#product_user_wpyar_tixket),
label:has(+ .select_custom_wpyar #product_user_wpyar_tixket) {
    display: none !important;
}

/* css link */
.pweb_product_content a {
  color: var(--theme-main-color);
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
  font-weight: 500;
}

.pweb_product_content a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: var(--theme-main-color);
  transition: width 0.3s ease;
}

.pweb_product_content a:hover {
  color: #7c3aed;
}

.pweb_product_content a:hover::after {
  width: 100%;
}

.pweb_product_content a:active {
  transform: translateY(1px);
}
