/* =====================================================================
   سازگاری Bootstrap 4 → Bootstrap 5 (سمت کاربر)
   سایت حالا فقط Bootstrap 5.3 (RTL) را بار می‌کند. کلاس‌های قدیمی Bootstrap 4
   که هنوز در صفحه‌ها/HTML تولیدی سرور استفاده می‌شوند این‌جا تعریف شده‌اند
   تا ظاهر صفحه‌ها به هم نریزد. کد جدید باید از کلاس‌های Bootstrap 5 استفاده کند.
   (ml/mr/pl/pr/float/text-left/right همان معنای فیزیکی Bootstrap 4 را دارند)
   ===================================================================== */

/* ---------- فرم ---------- */
.form-group { margin-bottom: 1rem; }
.form-group > label { margin-bottom: .5rem; }
.form-row { display: flex; flex-wrap: wrap; margin-right: -5px; margin-left: -5px; }
.form-row > .col,
.form-row > [class*="col-"] { padding-right: 5px; padding-left: 5px; }
.form-inline { display: flex; flex-flow: row wrap; align-items: center; }
.form-control-file,
.form-control-range { display: block; width: 100%; }
.form-text { display: block; }

.custom-select {
    display: block;
    width: 100%;
    padding: .375rem .75rem .375rem 2.25rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--bs-body-color, #212529);
    background-color: var(--bs-body-bg, #fff);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left .75rem center;
    background-size: 16px 12px;
    border: 1px solid #ced4da;
    border-radius: .375rem;
    appearance: none;
}
.custom-select:focus { border-color: #a98eda; outline: 0; box-shadow: 0 0 0 .25rem rgba(85, 10, 224, .15); }
.custom-select-sm { padding-top: .25rem; padding-bottom: .25rem; font-size: .875rem; }
.custom-select-lg { padding-top: .5rem; padding-bottom: .5rem; font-size: 1.25rem; }

.custom-control { position: relative; display: block; min-height: 1.5rem; padding-right: 1.5rem; }
.custom-control-inline { display: inline-flex; margin-left: 1rem; }
.custom-control-input { position: absolute; right: 0; top: .25rem; width: 1rem; height: 1rem; margin: 0; accent-color: #550AE0; }
.custom-control-label { position: relative; margin-bottom: 0; vertical-align: top; cursor: pointer; }
.custom-file { position: relative; display: inline-block; width: 100%; }
.custom-file-input { width: 100%; }
.custom-file-label { display: none; }

/* ---------- input-group (Bootstrap 4 append/prepend) ---------- */
.input-group-append,
.input-group-prepend { display: flex; }
.input-group > .input-group-append > .btn,
.input-group > .input-group-append > .input-group-text,
.input-group > .input-group-prepend > .btn,
.input-group > .input-group-prepend > .input-group-text { height: 100%; }

/* ---------- دکمه ---------- */
.btn-block { display: block; width: 100%; }
.btn-block + .btn-block { margin-top: .5rem; }
.btn-default { color: #212529; background-color: #f8f9fa; border-color: #dee2e6; }
.btn-default:hover { background-color: #e9ecef; }

/* ---------- close ---------- */
.close {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    opacity: .5;
}
.close:hover { color: #000; text-decoration: none; opacity: .75; }
button.close { padding: 0; background-color: transparent; border: 0; cursor: pointer; }
.modal-header .close { padding: .5rem; margin: -.5rem; margin-inline-start: auto; }

/* ---------- badge ---------- */
.badge-pill { border-radius: 50rem; padding-right: .6em; padding-left: .6em; }
.badge-primary { color: #fff; background-color: #0d6efd; }
.badge-secondary { color: #fff; background-color: #6c757d; }
.badge-success { color: #fff; background-color: #198754; }
.badge-danger { color: #fff; background-color: #dc3545; }
.badge-warning { color: #212529; background-color: #ffc107; }
.badge-info { color: #212529; background-color: #0dcaf0; }
.badge-light { color: #212529; background-color: #f8f9fa; }
.badge-dark { color: #fff; background-color: #212529; }

/* ---------- grid / layout ---------- */
.no-gutters { --bs-gutter-x: 0; --bs-gutter-y: 0; margin-right: 0; margin-left: 0; }
.no-gutters > .col,
.no-gutters > [class*="col-"] { padding-right: 0; padding-left: 0; }
.media { display: flex; align-items: flex-start; }
.media-body { flex: 1; }
.card-deck { display: flex; flex-flow: row wrap; margin-right: -15px; margin-left: -15px; }
.card-deck .card { flex: 1 0 0%; margin: 0 15px 15px; }
.jumbotron { padding: 2rem 1rem; margin-bottom: 2rem; background-color: #e9ecef; border-radius: .3rem; }
.embed-responsive { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; }
.embed-responsive::before { display: block; content: ""; }
.embed-responsive-16by9::before { padding-top: 56.25%; }
.embed-responsive-4by3::before { padding-top: 75%; }
.embed-responsive-21by9::before { padding-top: 42.857%; }
.embed-responsive-1by1::before { padding-top: 100%; }
.embed-responsive .embed-responsive-item,
.embed-responsive iframe,
.embed-responsive video { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; height: 100%; border: 0; }
.pre-scrollable { max-height: 340px; overflow-y: scroll; }

/* ---------- dropdown ---------- */
.dropdown-menu-right[data-bs-popper],
.dropdown-menu-right:not([data-bs-popper]) { right: 0; left: auto; }
.dropdown-menu-left[data-bs-popper],
.dropdown-menu-left:not([data-bs-popper]) { right: auto; left: 0; }

/* ---------- table ---------- */
.thead-light th { color: #495057; background-color: #e9ecef; border-color: #dee2e6; }
.thead-dark th { color: #fff; background-color: #343a40; border-color: #454d55; }

/* ---------- typography ---------- */
.font-weight-light { font-weight: 300 !important; }
.font-weight-normal { font-weight: 400 !important; }
.font-weight-bold { font-weight: 700 !important; }
.font-weight-bolder { font-weight: bolder !important; }
.font-italic { font-style: italic !important; }
.text-justify { text-align: justify !important; }
.text-monospace { font-family: var(--bs-font-monospace, monospace) !important; }
.text-hide { font: 0/0 a; color: transparent; text-shadow: none; background-color: transparent; border: 0; }

.sr-only,
.sr-only-focusable:not(:focus) {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ---------- utilities (معنای فیزیکی Bootstrap 4) ---------- */
.float-left { float: left !important; }
.float-right { float: right !important; }
.float-none { float: none !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }
.rounded-left { border-top-left-radius: .375rem !important; border-bottom-left-radius: .375rem !important; }
.rounded-right { border-top-right-radius: .375rem !important; border-bottom-right-radius: .375rem !important; }
.border-left { border-left: 1px solid #dee2e6 !important; }
.border-right { border-right: 1px solid #dee2e6 !important; }
.border-left-0 { border-left: 0 !important; }
.border-right-0 { border-right: 0 !important; }

.ml-0 { margin-left: 0 !important; } .mr-0 { margin-right: 0 !important; } .pl-0 { padding-left: 0 !important; } .pr-0 { padding-right: 0 !important; }
.ml-1 { margin-left: .25rem !important; } .mr-1 { margin-right: .25rem !important; } .pl-1 { padding-left: .25rem !important; } .pr-1 { padding-right: .25rem !important; }
.ml-2 { margin-left: .5rem !important; } .mr-2 { margin-right: .5rem !important; } .pl-2 { padding-left: .5rem !important; } .pr-2 { padding-right: .5rem !important; }
.ml-3 { margin-left: 1rem !important; } .mr-3 { margin-right: 1rem !important; } .pl-3 { padding-left: 1rem !important; } .pr-3 { padding-right: 1rem !important; }
.ml-4 { margin-left: 1.5rem !important; } .mr-4 { margin-right: 1.5rem !important; } .pl-4 { padding-left: 1.5rem !important; } .pr-4 { padding-right: 1.5rem !important; }
.ml-5 { margin-left: 3rem !important; } .mr-5 { margin-right: 3rem !important; } .pl-5 { padding-left: 3rem !important; } .pr-5 { padding-right: 3rem !important; }
.ml-auto { margin-left: auto !important; } .mr-auto { margin-right: auto !important; }

@media (min-width: 576px) {
    .float-sm-left { float: left !important; } .float-sm-right { float: right !important; }
    .text-sm-left { text-align: left !important; } .text-sm-right { text-align: right !important; }
    .ml-sm-0 { margin-left: 0 !important; } .mr-sm-0 { margin-right: 0 !important; }
    .ml-sm-2 { margin-left: .5rem !important; } .mr-sm-2 { margin-right: .5rem !important; }
    .ml-sm-3 { margin-left: 1rem !important; } .mr-sm-3 { margin-right: 1rem !important; }
    .ml-sm-auto { margin-left: auto !important; } .mr-sm-auto { margin-right: auto !important; }
}
@media (min-width: 768px) {
    .float-md-left { float: left !important; } .float-md-right { float: right !important; }
    .text-md-left { text-align: left !important; } .text-md-right { text-align: right !important; }
    .ml-md-0 { margin-left: 0 !important; } .mr-md-0 { margin-right: 0 !important; }
    .ml-md-2 { margin-left: .5rem !important; } .mr-md-2 { margin-right: .5rem !important; }
    .ml-md-3 { margin-left: 1rem !important; } .mr-md-3 { margin-right: 1rem !important; }
    .ml-md-auto { margin-left: auto !important; } .mr-md-auto { margin-right: auto !important; }
}
@media (min-width: 992px) {
    .float-lg-left { float: left !important; } .float-lg-right { float: right !important; }
    .text-lg-left { text-align: left !important; } .text-lg-right { text-align: right !important; }
    .ml-lg-0 { margin-left: 0 !important; } .mr-lg-0 { margin-right: 0 !important; }
    .ml-lg-2 { margin-left: .5rem !important; } .mr-lg-2 { margin-right: .5rem !important; }
    .ml-lg-3 { margin-left: 1rem !important; } .mr-lg-3 { margin-right: 1rem !important; }
    .ml-lg-auto { margin-left: auto !important; } .mr-lg-auto { margin-right: auto !important; }
}
@media (min-width: 1200px) {
    .float-xl-left { float: left !important; } .float-xl-right { float: right !important; }
    .text-xl-left { text-align: left !important; } .text-xl-right { text-align: right !important; }
}
