/* Base font size for entire client/front panel */
html, body,
p, li, div,
input, select, textarea, button,
h1, h4, h5, h6 {
    font-size: 13px !important;
    font-family: var(--main-font), sans-serif !important;
}

/* Badge font size — override the global span rule */
.badge {
    font-size: 11px !important;
}

/* Login/user avatar icon in header — make it smaller */
.sign-in > a {
    width: 32px !important;
    height: 32px !important;
}
img.img-fluid.user {
    width: 32px !important;
    height: 32px !important;
    object-fit: cover;
}

/* Button icons — inherit size from button, don't let global rule force 13px */
.btn i, .btn svg {
    font-size: inherit !important;
    line-height: 1 !important;
}

/* Select2 Styling */
.select2-container .select2-selection--single {
    height: 35px !important;
    padding: 0px 20px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 35px !important;
    padding-left: 0;
    padding-right: 40px;
    color: #0b0b0b;
    font-size: 13px;
}

.select2-container .select2-selection--single .select2-selection__arrow {
    height: 33px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    margin-top: -1px;
}

/* Fix Select2 clear button alignment */
.select2-container--default .select2-selection--single .select2-selection__clear {
    position: absolute;
    right: 35px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    line-height: 1;
    height: auto;
    padding: 0;
    margin: 0;
}

.select2-container--default.select2-container--allowclear .select2-selection--single .select2-selection__rendered {
    padding-right: 60px;
}


/* Admin-style form controls */
.form-control {
    height: 35px;
    padding: 0.375rem 0.75rem;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

/* Admin-style add button */
.add-btn {
    background: #2d3274 !important;
    padding: 7px 15px;
    color: #fff !important;
    font-size: 14px;
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
}

.add-btn:hover {
    background: #2d3274 !important;
    color: #fff !important;
    text-decoration: none;
    opacity: 0.9;
}

/* Form labels */
.form-group label {
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.5rem;
    font-size: 14px;
}

/* Button height fix */
.btn {
    height: 35px;
    padding: 0.375rem 0.75rem;
    font-size: 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Badge color classes (Bootstrap 4 compatibility for Bootstrap 5) */
.badge-secondary {
    background-color: #868e96 !important;
    color: #fff !important;
}

.badge-primary {
    background-color: #7367f0 !important;
    color: #fff !important;
}

.badge-success {
    background-color: #28c76f !important;
    color: #fff !important;
}

.badge-danger {
    background-color: #ea5455 !important;
    color: #fff !important;
}

.badge-warning {
    background-color: #f99f0b !important;
    color: #fff !important;
}

.badge-info {
    background-color: #1e9ff2 !important;
    color: #fff !important;
}

.badge-dark {
    background-color: #192a56 !important;
    color: #fff !important;
}

/* Pagination fix (override theme styles.php conflicts) */
.page-item.active .page-link {
    background-color: #2d3274 !important;
    border-color: #2d3274 !important;
    color: #fff !important;
}

a.page-link:hover {
    background-color: #e9ecef !important;
    border-color: #dee2e6 !important;
    color: #2d3274 !important;
}

a.page-link {
    color: #2d3274 !important;
}

/* Select2 dropdown list — fix font size & family for open dropdown options */
.select2-dropdown,
.select2-results__option,
.select2-results__option--highlighted,
.select2-search--dropdown .select2-search__field {
    font-size: 13px !important;
    font-family: var(--main-font), sans-serif !important;
}

/* Table font fix — covers plain Bootstrap tables and DataTables */
table,
table th,
table td,
table.dataTable,
table.dataTable th,
table.dataTable td,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate,
.dataTables_wrapper .dataTables_paginate .paginate_button {
    font-size: 13px !important;
    font-family: var(--main-font), sans-serif !important;
}

/* Dropdown fix for mobile — override template.css transparent background */
@media (max-width: 991.98px) {
    .table-responsive .dropdown-menu,
    .table .dropdown-menu {
        background-color: #ffffff;
        border: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
        padding: 0.25rem 0;
    }
    .table-responsive .dropdown-item,
    .table .dropdown-item {
        color: #1f2937;
    }
    .table-responsive .dropdown-item:hover,
    .table-responsive .dropdown-item:focus,
    .table .dropdown-item:hover,
    .table .dropdown-item:focus {
        color: #111827;
        background-color: #f3f4f6;
    }
}


