/* Professional Accountants List Styling */

.accountants-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.accountant-item {
    background: white;
    border: 1px solid #e8ecf1;
    border-radius: 6px;
    padding: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.accountant-item:hover {
    border-color: #0d6efd;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.1);
}

.accountant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    gap: 1rem;
}

.accountant-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    flex-grow: 1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.accountant-name:hover {
    color: #0d6efd;
    text-decoration: underline;
}

.rating-badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.65rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.accountant-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem 1rem;
    margin-bottom: 0.5rem;
}

.detail-group {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-weight: 600;
    color: #666;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 0.2rem;
}

.detail-value {
    color: #333;
    font-size: 0.95rem;
    font-weight: 500;
}

.accountant-footer {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    border-top: 1px solid #f0f0f0;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
}

.accountant-footer .btn {
    white-space: nowrap;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    display: inline-block;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.accountant-footer .btn-primary {
    background-color: #0d6efd;
    color: white;
}

.accountant-footer .btn-primary:hover {
    background-color: #0a58ca;
    text-decoration: none;
}

.accountant-footer .btn-outline-primary {
    color: #0d6efd;
    border-color: #0d6efd;
}

.accountant-footer .btn-outline-primary:hover {
    background-color: #0d6efd;
    color: white;
    text-decoration: none;
}

.accountant-footer .btn {
    font-weight: 500;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

.accountant-footer .text-muted {
    font-size: 0.9rem;
}

/* Grid View Styling */
.accountants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.accountant-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
}

.accountant-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 8px 16px rgba(13, 110, 253, 0.15);
    transform: translateY(-2px);
}

.card-body {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.card-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.card-title a:hover {
    color: #0d6efd;
    text-decoration: underline;
}

.card-text {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
}

.card-text strong {
    color: #333;
}

.card-text br + a,
.card-text a {
    margin-top: 0.5rem;
    display: inline-block;
}

/* Pagination Container */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1.2rem;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-top: 1px solid #f0f0f0;
}

/* Pagination Styling - Override Bootstrap */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    border: 0;
    margin: 0;
}

.pagination .page-item {
    margin: 0;
}

.pagination .page-link {
    padding: 0.45rem 0.65rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #0d6efd;
    text-decoration: none;
    transition: all 0.2s ease;
    min-width: 38px;
    height: 38px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 0.9rem;
    background-color: white;
    line-height: 1;
}

.pagination .page-link:hover {
    background-color: #f8f9fa;
    border-color: #0d6efd;
    color: #0a58ca;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
    font-weight: 600;
}

.pagination .page-item.disabled .page-link {
    color: #999;
    cursor: not-allowed;
    opacity: 0.5;
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.pagination .page-item.disabled .page-link:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

/* Previous/Next Button Styling with Text Icons */
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    min-width: auto;
    padding: 0.45rem 0.55rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    font-size: 0.85rem;
}

/* Previous button text */
.pagination .page-item:first-child .page-link::before {
    content: "‹";
    font-size: 1.2rem;
    line-height: 1;
    margin-right: 0.2rem;
}

/* Next button text */
.pagination .page-item:last-child .page-link::after {
    content: "›";
    font-size: 1.2rem;
    line-height: 1;
    margin-left: 0.2rem;
}

/* Remove text content from prev/next buttons */
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    font-size: 0;
}

.pagination .page-item:first-child .page-link::before,
.pagination .page-item:last-child .page-link::after {
    font-size: 1rem;
}

/* Adjust disabled state for prev/next */
.pagination .page-item.disabled:first-child .page-link,
.pagination .page-item.disabled:last-child .page-link {
    color: #999;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .accountant-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .rating-badge {
        margin-top: 0.5rem;
    }

    .accountant-details {
        grid-template-columns: 1fr;
        gap: 0.5rem 1rem;
    }

    .accountants-grid {
        grid-template-columns: 1fr;
    }

    .pagination {
        gap: 0.15rem;
    }

    .pagination .page-item {
        margin: 0.15rem;
    }

    .pagination .page-link {
        padding: 0.4rem 0.6rem;
        min-width: 36px;
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .accountant-item {
        padding: 1rem;
    }

    .accountant-header {
        margin-bottom: 0.75rem;
        padding-bottom: 0.75rem;
    }

    .accountant-name {
        font-size: 1.05rem;
    }

    .detail-group {
        margin-bottom: 0.5rem;
    }

    .detail-label {
        font-size: 0.75rem;
    }

    .detail-value {
        font-size: 0.9rem;
    }

    .accountant-details {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .accountant-footer .btn {
        padding: 0.35rem 0.7rem;
        font-size: 0.85rem;
    }
}
