/* استایل کلی افزونه */
/* استایل کلی فیلترها */
.filter-container {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: flex-start;
    margin: 30px;
    flex-wrap: wrap; /* در صورت کمبود فضا، عناصر به خط بعدی بروند */
}

/* تغییر متن لیبل‌ها */
.filter-container label {
    font-size: 16px !important;
    color: #636363 !important;
    font-weight: bold !important;
    white-space: nowrap; /* جلوگیری از دوخطی شدن */
}

/* استایل لیست کشویی */
.filter-container select {
    font-size: 14px !important;
    color: #636363 !important;
    padding: 8px 12px !important;
    border: 2px solid #ccc !important;
    border-radius: 25px !important;
    background-color: white !important;
    cursor: pointer !important;
    transition: border-color 0.3s ease !important;
    width: 180px !important; /* افزایش عرض برای هماهنگی */
    background-image: url('img/select.png');
    background-repeat: no-repeat;
    background-position: left 10px center;
    background-size: 16px;
    appearance: none;
    text-align: right;
}

/* تغییر رنگ نوشته پیش‌فرض "انتخاب کنید" به خاکستری */
.filter-container select option:first-child {
    color: gray !important;
}

/* تغییر رنگ هنگام هاور */
.filter-container select:hover {
    border-color: #00B7DD !important;
}

/* تنظیم جدول */
#representatives-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

#representatives-table th, #representatives-table td {
    padding: 15px 30px; /* فاصله داخلی: 15px بالا/پایین و 30px چپ/راست */
    text-align: right;
    font-size: 16px;
    color: #111111;
}

#representatives-table th {
    background: #636363;
    color: white;
    font-weight: normal!important;
}

#representatives-table tbody tr:nth-child(even) {
    background: #f2f2f2;
}

#representatives-table tbody tr:hover {
    background: #e1f5fe;
    transition: 0.3s;
}

#row-count {
    font-size: 16px;
    color: #111111;
    font-weight: bold;
    margin-right: auto;
}

/* تنظیمات برای دسکتاپ */
@media (min-width: 769px) {
    .filter-group {
        display: flex;
        align-items: center;
        gap: 8px;
    }
}

/* تنظیمات برای موبایل */
@media (max-width: 768px) {
    .filter-container {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    /* قرار دادن فیلترها کنار هم با عرض کامل */
    .filter-group {
        display: flex;
        gap: 10px;
        width: 100%;
    }

    .filter-group select {
        flex: 1;
        width: 100%; /* عرض کامل در موبایل */
        text-align: right;
    }

    /* نمایش صحیح جدول در موبایل */
    .table-wrapper {
        width: 100%;
        overflow-x: auto;
    }

    #representatives-table {
        width: 100%;
        min-width: 600px;
    }

    #representatives-table th, 
    #representatives-table td {
        font-size: 14px;
        padding: 15px;
    }

    /* جلوگیری از شکستن شماره تماس */
    #representatives-table td:last-child {
        white-space: nowrap;
    }
}
