/* 
 * Bootstrap 5 Fixes and Compatibility
 * Ensures consistent styling across the entire website
 */

/* === PAGINATION STYLING === */
.pagination {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.pagination .page-item {
    margin: 0 2px;
}

.pagination .page-link {
    padding: 0.5rem 0.75rem;
    margin: 0;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    color: #0d6efd;
    text-decoration: none;
    background-color: #fff;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.pagination .page-link:hover {
    color: #0a58ca;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #fff;
    border-color: #dee2e6;
    cursor: not-allowed;
}

/* === MODAL FIXES === */
.modal-backdrop {
    z-index: 1040;
}

.modal {
    z-index: 1055;
}

/* === BUTTON STYLING === */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    text-decoration: none;
}

.btn:focus {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* === FORM CONTROLS === */
.form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
}

.form-control:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* === CARD STYLING === */
.card {
    border-radius: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    background-color: rgba(0, 0, 0, 0.03);
}

/* === NAVBAR FIXES === */
.navbar-toggler {
    border: 1px solid transparent;
    border-radius: 0.375rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* === DROPDOWN STYLING === */
.dropdown-menu {
    border-radius: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.dropdown-item:hover {
    background-color: #e9ecef;
}

/* === ALERT STYLING === */
.alert {
    border-radius: 0.5rem;
    border: 1px solid transparent;
}

/* === TABLE STYLING === */
.table {
    border-color: #dee2e6;
}

.table-bordered {
    border: 1px solid #dee2e6;
}

.table-bordered > :not(caption) > * > * {
    border-width: 0 1px;
}

/* === RESPONSIVE FIXES === */
@media (max-width: 767.98px) {
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .pagination .page-item {
        margin: 2px;
    }
}

/* === CHAT COMPONENT FIXES === */
.chat-container {
    border-radius: 0.5rem;
    overflow: hidden;
}

.modal-content {
    border-radius: 0.5rem;
}

/* === PROPERTY CARDS === */
.property-block-one .inner-box {
    border-radius: 0.5rem;
    overflow: hidden;
}

/* === SEARCH FORMS === */
.search-form .form-group {
    margin-bottom: 1rem;
}

.search-form .btn {
    white-space: nowrap;
}

/* === CUSTOM COMPONENT COMPATIBILITY === */
.sidebar-widget {
    margin-bottom: 1.5rem;
}

.widget-title {
    margin-bottom: 1rem;
}

/* === Z-INDEX FIXES === */
.dropdown-menu {
    z-index: 1000;
}

.modal {
    z-index: 1055;
}

.modal-backdrop {
    z-index: 1040;
}

.tooltip {
    z-index: 1070;
}

.popover {
    z-index: 1060;
}

/* === ACCESSIBILITY IMPROVEMENTS === */
.btn:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.form-control:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* === DARK MODE COMPATIBILITY === */
@media (prefers-color-scheme: dark) {
    .table {
        --bs-table-bg: transparent;
    }
} 