/* استایل‌های کاستوم برای صفحه مخاطبین */

.swal-loading-title {
    font-size: 1rem !important;
}

.smaller-font { 
    font-size: 70%; 
}

table.table { 
    font-size: 0.85rem; 
}

.phone-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    color: #000 !important;
    font-size: 0.8rem;
    text-decoration: none;
    margin: 0 auto;
}

.phone-link:hover {
    text-decoration: none;
    color: #000 !important;
}

.phone-icon {
    width: 16px;
    height: 16px;
}

/* اصلاح برای نمایش در دسکتاپ - آیکن سمت راست شماره */
@media (min-width: 769px) {
    .phone-icon {
        margin-right: 4px;
        order: 2;
    }
}

/* اصلاح برای نمایش در موبایل - آیکن سمت چپ شماره */
@media (max-width: 768px) {
    .phone-icon {
        margin-left: 4px;
        order: 1;
    }
    .phone-link {
        display: inline-flex;
        flex-direction: row-reverse;
    }
}

.panel-info {
    border: 1px solid #bce8f1;
    background-color: #fff;
    border-radius: 8px;
    margin-top: 0;
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    overflow-x: hidden;
}

.table td, .table th {
    padding: 0.3rem 0.75rem;
    white-space: normal;
    text-align: center;
    vertical-align: middle !important;
}

.location-cell {
    width: 15%;
    white-space: normal !important;
    word-wrap: break-word;
    text-align: center;
}

.phone-cell {
    width: 110px;
    white-space: nowrap;
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: center;
}

.visibility-column {
    width: 60px;
    padding: 0.4rem 0.25rem !important;
    text-align: center;
    vertical-align: middle !important;
}

.form-check {
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.form-check-input {
    margin: 0 !important;
    cursor: default;
    position: relative;
    top: 0;
}

.add-contact-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1;
    border-radius: 0.2rem;
    margin-right: 4px;
}

.mobile-view {
    display: none;
}

@media screen and (max-width: 768px) {
    .desktop-view {
        display: none !important;
    }
    .mobile-view {
        display: block !important;
    }
}

.id-badge {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.8rem;
    color: #6c757d;
    display: inline-block;
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .id-badge {
        display: none !important;
    }
    th:first-child, td:first-child {
        display: none;
    }
    .contact-card {
        text-align: center;
        padding: 15px;
        margin-bottom: 10px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .contact-card .name-phone {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        margin-bottom: 5px;
    }
    .contact-card .name {
        font-weight: bold;
        font-size: 1.1rem;
        color: #31708f;
        margin: 0;
    }
    .contact-card .phone-link {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        color: #31708f !important;
        text-decoration: none;
        font-family: sans-serif;
        direction: ltr;
        font-size: 1rem;
    }
    .contact-card .phone-link i {
        font-size: 1rem;
        order: 0;
        margin-left: 4px;
    }
    .contact-card .details {
        font-size: 0.8rem;
        color: #666;
    }
    .contact-card .action-buttons {
        margin-top: 12px;
    }
}

.action-buttons {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.action-buttons .btn {
    width: 32px;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-buttons .btn i {
    font-size: 1rem;
}

.table tbody tr td {
    vertical-align: middle !important;
}

.pagination-container {
    margin-top: 2px !important;
    margin-bottom: 5px !important;
}

.contacts-info {
    font-size: 0.9rem;
    color: #6c757d;
}

/* استایل‌های پیجینیشن موبایل */
@media (max-width: 768px) {
    .pagination {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 5px;
        margin: 15px 0;
    }
    
    .pagination-numbers {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 5px;
        margin: 0 10px;
    }
    
    .pagination-info {
        text-align: center;
        font-size: 0.85rem;
        color: #6c757d;
        margin-top: 10px;
        width: 100%;
    }
    
    .pagination-nav {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
    }
    
    .pagination-nav .page-link {
        padding: 8px 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
        font-size: 1rem;
        color: #0d6efd;
        background-color: #fff;
        border: 1px solid #dee2e6;
        min-width: 38px;
        height: 38px;
    }
    
    .pagination-nav .page-link:hover {
        background-color: #e9ecef;
        border-color: #dee2e6;
        color: #0a58ca;
    }
    
    .pagination-nav .page-link i {
        font-size: 1.1rem;
    }
    
    .page-item.active .page-link {
        background-color: #0d6efd;
        border-color: #0d6efd;
        color: #fff;
    }
    
    .page-item.disabled .page-link {
        color: #6c757d;
        pointer-events: none;
        background-color: #fff;
        border-color: #dee2e6;
    }
    
    #firstPageBtn, #lastPageBtn {
        display: none;
    }
    
    .page-numbers-mobile {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 5px;
    }
    
    .page-numbers-mobile .page-item .page-link {
        min-width: 38px;
        height: 38px;
        padding: 8px;
        font-size: 1rem;
    }
}

/* استایل‌های پیجینیشن برای همه نماها */
.pagination {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2px;
    margin: 0;
}

.pagination-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
    margin: 0 5px;
}

.pagination-info {
    text-align: center;
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 5px;
    width: 100%;
}

.pagination-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
}

.pagination-nav .page-link,
.page-item .page-link {
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #0d6efd;
    background-color: #fff;
    border: 1px solid #dee2e6;
    min-width: 32px;
    height: 32px;
}

.pagination-nav .page-link:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: #0a58ca;
}

.pagination-nav .page-link i,
.page-item .page-link i {
    font-size: 1.2rem;
    line-height: 1;
}

.page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

.page-numbers-mobile {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
}

.page-numbers-mobile .page-item {
    margin: 0;
}

.page-numbers-mobile .page-item .page-link {
    min-width: 32px;
    height: 32px;
    padding: 6px;
    font-size: 0.9rem;
}

/* استایل‌های مربوط به مودال ویرایش */
.modal-body {
    font-size: 0.8rem;
}

.modal-body input.form-control,
.modal-body select.form-control,
.modal-body textarea.form-control {
    background-color: #faf8e8;
    height: 38px;
}

/* Desktop View header spacing reduction */
.desktop-view {
    margin-top: 0;
}

/* Reduce margin on d-flex justify-content-between */
.d-flex.justify-content-between.mb-3 {
    margin-bottom: 0.5rem !important;
} 