/* استایل‌های اسکرول برای جداول بزرگ */
.persian-table-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    margin: 15px 0;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.persian-table-container::-webkit-scrollbar {
    height: 8px;
}

.persian-table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.persian-table-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.persian-table-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.persian-table-scrollable {
    min-width: 100%;
    margin: 0;
}

.persian-table-scrollable table {
    min-width: 100%;
    margin-bottom: 0;
}

/* نشانگر اسکرول برای کاربر */
.persian-table-scroll-hint {
    text-align: center;
    color: #666;
    font-size: 12px;
    padding: 5px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    display: none;
}

@media (max-width: 768px) {
    .persian-table-scroll-hint {
        display: block;
    }
    
    .persian-table-container {
        border-radius: 6px;
    }
}
/* استایل‌های پیشرفته برای کنترل‌های جدول */
.persian-table-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}

.persian-table-search {
    position: relative;
    flex: 1;
    min-width: 300px;
    max-width: 400px;
}

.persian-table-search-input {
    width: 100%;
    padding: 12px 45px 12px 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    font-family: Vazir, Tahoma, sans-serif;
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.persian-table-search-input:focus {
    outline: none;
    border-color: #ffffff;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.persian-table-search-input::placeholder {
    color: #666;
    font-family: Vazir, Tahoma, sans-serif;
}

.persian-table-clear-search {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.persian-table-search-input:not(:placeholder-shown) + .persian-table-clear-search {
    opacity: 1;
    visibility: visible;
}

.persian-table-clear-search:hover {
    background: #ff5252;
    transform: translateY(-50%) scale(1.1);
}

.persian-table-rows-per-page {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 15px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.persian-table-rows-per-page label {
    font-family: Vazir, Tahoma, sans-serif;
    font-size: 14px;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
}

.persian-table-rows-select {
    padding: 8px 12px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
    font-family: Vazir, Tahoma, sans-serif;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.persian-table-rows-select:focus {
    outline: none;
    border-color: #ffffff;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.3);
}

.persian-table-rows-select option {
    background: white;
    color: #333;
    font-family: Vazir, Tahoma, sans-serif;
}

/* آیکون برای جستجو */
.persian-table-search::before {
    content: "🔍";
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #667eea;
    z-index: 2;
}

.persian-table-search-input:not(:placeholder-shown) ~ .persian-table-search::before {
    opacity: 0;
}

/* انیمیشن برای کنترل‌ها */
.persian-table-controls {
    animation: slideInDown 0.5s ease-out;
}

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

/* هایور افکت برای کل کنترل‌ها */
.persian-table-controls:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .persian-table-controls {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    .persian-table-search {
        min-width: 100%;
        order: 1;
    }
    
    .persian-table-rows-per-page {
        order: 2;
        width: 100%;
        justify-content: center;
    }
    
    .persian-table-search-input {
        font-size: 16px; /* برای جلوگیری از زوم در iOS */
    }
}

@media (max-width: 480px) {
    .persian-table-controls {
        margin: 15px 0;
        padding: 15px;
    }
    
    .persian-table-rows-per-page {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .persian-table-rows-select {
        width: 100%;
    }
}

/* استایل برای حالت دارک مود */
@media (prefers-color-scheme: dark) {
    .persian-table-controls {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    }
    
    .persian-table-search-input {
        background: rgba(45, 55, 72, 0.9);
        border-color: rgba(255, 255, 255, 0.2);
        color: #e2e8f0;
    }
    
    .persian-table-search-input:focus {
        background: rgba(45, 55, 72, 1);
        border-color: #667eea;
    }
    
    .persian-table-search-input::placeholder {
        color: #a0aec0;
    }
    
    .persian-table-rows-per-page {
        background: rgba(45, 55, 72, 0.9);
    }
    
    .persian-table-rows-per-page label {
        color: #e2e8f0;
    }
    
    .persian-table-rows-select {
        background: rgba(45, 55, 72, 0.8);
        border-color: rgba(255, 255, 255, 0.2);
        color: #e2e8f0;
    }
    
    .persian-table-rows-select:focus {
        background: rgba(45, 55, 72, 1);
        border-color: #667eea;
    }
    
    .persian-table-rows-select option {
        background: #2d3748;
        color: #e2e8f0;
    }
}

/* استایل‌های جدید برای تگ‌های عنوان */
.persian-table-title-h1 {
    font-size: 28px !important;
    font-weight: 700 !important;
    margin-bottom: 25px !important;
}

.persian-table-title-h2 {
    font-size: 24px !important;
    font-weight: 600 !important;
    margin-bottom: 20px !important;
}

.persian-table-title-h3 {
    font-size: 20px !important;
    font-weight: 500 !important;
    margin-bottom: 15px !important;
}

.persian-table-title-div {
    font-size: 18px !important;
    font-weight: 400 !important;
    margin-bottom: 15px !important;
}

@media (max-width: 768px) {
    .persian-table-title-h1 {
        font-size: 24px !important;
    }
    
    .persian-table-title-h2 {
        font-size: 20px !important;
    }
    
    .persian-table-title-h3 {
        font-size: 18px !important;
    }
    
    .persian-table-title-div {
        font-size: 16px !important;
    }
}

/* فاصله‌دهی بعد از جدول */
.persian-table-spacer {
    height: 5px;
    clear: both;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
}

/* برای اطمینان از فاصله مناسب در همه مرورگرها */
.persian-table-wrapper {
    margin-bottom: 0 !important;
}