/* Custom pagination styles */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem 0;
}

/* Bootstrap pagination customization */
.pagination {
    margin-bottom: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.page-item {
    margin: 0 2px;
}

.page-link {
    border-radius: 4px;
    color: #007bff;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    line-height: 1.25;
}

.page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

.page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

/* Fix for RTL layout */
[dir="rtl"] .pagination {
    flex-direction: row-reverse;
}

/* CRITICAL FIX: Target all SVG icons in the entire application */
svg {
    width: 1em !important;
    height: 1em !important;
    max-width: 1em !important;
    max-height: 1em !important;
}

/* Specific fix for pagination SVGs */
.pagination svg,
.page-item svg,
.page-link svg {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
}

/* Target the specific large arrow SVGs seen in the screenshot */
svg[width="24"],
svg[height="24"],
svg.w-5,
svg.h-5 {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
}

/* Target the SVG paths to ensure proper scaling */
svg path {
    transform-origin: center;
    transform: scale(1);
}

/* Override any inline styles that might be causing issues */
[style*="width: 24px"],
[style*="height: 24px"] {
    width: 16px !important;
    height: 16px !important;
}

/* Fix for pagination in tables */
.table-responsive + .pagination-container,
.table-responsive + .d-flex > .pagination {
    margin-top: 1rem;
}

/* Additional fixes for tailwind pagination if it exists */
nav[role="navigation"] svg {
    width: 16px !important;
    height: 16px !important;
}

/* Fix for flex layout in pagination navigation */
nav[role="navigation"] > div:last-child {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Fix for the pagination links container */
nav[role="navigation"] > div:last-child > div:last-child > span {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

/* Fix for RTL layout */
.pagination .page-link[aria-label="@lang('pagination.previous')"],
.pagination .page-link[aria-label="@lang('pagination.next')"] {
    font-size: 1rem;
    line-height: 1;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination .page-item {
        margin-bottom: 0.5rem;
    }
}

/* Fix for pagination in tables */
.table-responsive .pagination {
    margin-top: 1rem;
}

/* Fix for any Bootstrap-specific pagination issues */
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    border-radius: 4px;
}
