/* GENERAL BS5 */
a {
    text-decoration: none;
}

.btn-group, .btn-group-vertical {
    display: block;
}

.btn-group-vertical>.btn, .btn-group>.btn {
    flex: 0 1 auto;
}

.dataTables_wrapper>.dt-buttons.btn-group>.btn{
    border: 1px solid #f0f0f0;
    border-radius: 2px;
}
/* ===== VISIBILITY (Bootstrap 3 style) =====

/* Always hide */
.hide {
    display: none !important;
}

/* Show only on extra small (≤575px) */
@media (max-width: 575.98px) {
    .visible-xs {
        display: block !important;
    }

    .hidden-xs {
        display: none !important;
    }
}

@media (min-width: 576px) {
    .visible-xs {
        display: none !important;
    }
}

/* Show only on small (≥576px and ≤767px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .visible-sm {
        display: block !important;
    }

    .hidden-sm {
        display: none !important;
    }
}

@media (max-width: 575.98px),
(min-width: 768px) {
    .visible-sm {
        display: none !important;
    }
}

/* Show only on medium (≥768px and ≤991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .visible-md {
        display: block !important;
    }

    .hidden-md {
        display: none !important;
    }
}

@media (max-width: 767.98px),
(min-width: 992px) {
    .visible-md {
        display: none !important;
    }
}

/* Show only on large (≥992px and ≤1199px) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .visible-lg {
        display: block !important;
    }

    .hidden-lg {
        display: none !important;
    }
}

@media (max-width: 991.98px),
(min-width: 1200px) {
    .visible-lg {
        display: none !important;
    }
}

/* Show only on extra large (≥1200px) */
@media (min-width: 1200px) {
    .visible-xl {
        display: block !important;
    }

    .hidden-xl {
        display: none !important;
    }
}

@media (max-width: 1199.98px) {
    .visible-xl {
        display: none !important;
    }
}

/* ===== TEXT ALIGN ===== */
.text-left {
    text-align: left !important;
}

.text-center {
    text-align: center !important;
}

.text-right {
    text-align: right !important;
}

/* ===== FLOATS ===== */
.pull-left {
    float: left !important;
}

.pull-right {
    float: right !important;
}

/* ===== Modal Compatibility BS3 → BS5 ===== */

/* Modal show/hide fix */
.modal.fade {
    opacity: 0;
    transition: opacity .15s linear;
}

.modal.fade.show,
.modal.fade.in {
    opacity: 1;
}

/* Backdrop fix */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
}

.modal-backdrop.fade {
    opacity: 0;
}

.modal-backdrop.show {
    opacity: 0.5;
}

/* Close button (BS3 .close → BS5 .btn-close) */
.modal-header .close {
    padding: 1rem;
    margin: -1rem -1rem -1rem auto;
    background: transparent;
    border: 0;
    font-size: 1.5rem;
    line-height: 1;
    opacity: .5;
}

.modal-header .close:hover {
    opacity: .75;
}

/* Modal sizing (BS3 compatibility) */
.modal-dialog {
    margin: 1.75rem auto;
    max-width: 600px;
    /* default medium */
}

.modal-lg {
    max-width: 900px;
}

.modal-sm {
    max-width: 300px;
}

/* Header/Footer styling restore */
.modal-header {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
}

.modal-title {
    margin: 0;
    font-size: 1.25rem;
}

.modal-footer {
    padding: 15px;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
}

.modal-header {
  display: block !important;   /* balikin ke block layout */
}

.modal-header .modal-title {
  margin: 0;
  display: inline-block;
}

.modal-header .close {
  float: right;
}

/* ===== Label Compatibility BS3 → BS5 ===== */

/* control-label → mapping ke col-form-label */
.control-label {
    margin-bottom: .5rem;
    font-weight: 500;
    display: inline-block;
}

@media (min-width: 576px) {
    .control-label {
        padding-top: calc(.375rem + 1px);
        padding-bottom: calc(.375rem + 1px);
        margin-bottom: 0;
        font-size: inherit;
        line-height: 1.5;
    }
}

/* label (badge di BS3) → tetap support */
.label {
    display: inline-block;
    padding: .25em .6em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: .25em;
}

/* label color variants */
.label-default {
    background-color: #777;
}

.label-primary {
    background-color: #0d6efd;
}

.label-success {
    background-color: #198754;
}

.label-info {
    background-color: #0dcaf0;
}

.label-warning {
    background-color: #ffc107;
    color: #212529;
}

.label-danger {
    background-color: #dc3545;
}

/* ===== Form Group Compatibility ===== */
/* Compat: form-group lama bertindak sebagai row */
.form-group {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

/* Label lama align tengah */
.form-group>.control-label {
    padding-top: calc(.375rem + 1px);
    padding-bottom: calc(.375rem + 1px);
    margin-bottom: 0;
    text-align: right;
    /* biar sama kaya col-form-label */
}

/* Kalau ada label dalam .form-group pakai grid (BS3 style) */
.form-group>.control-label,
.form-group>label[class*="col-"] {
    padding-top: calc(.375rem + 1px);
    padding-bottom: calc(.375rem + 1px);
    margin-bottom: 0;
    font-size: inherit;
    line-height: 1.5;
}

/* Biar col-lg-* di dalam form-group tetap align middle */
.form-group [class*="col-"] {
    position: relative;
    min-height: 1px;
    padding-left: 15px;
    padding-right: 15px;
}

/* Fix DataTables dropdown biar mirip Bootstrap 5 */
div.dt-button-collection {
    position: absolute !important;
    z-index: 3000 !important;
    /* biar di atas modal */
    min-width: 10rem;
    padding: .5rem 0;
    margin: .125rem 0 0;
    font-size: 1rem;
    color: #212529;
    text-align: left;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: .375rem;
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .175);
}

/* Item dalam dropdown */
div.dt-button-collection .dt-button {
    display: block;
    width: 100%;
    padding: .25rem 1rem;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
}

div.dt-button-collection .dt-button:hover,
div.dt-button-collection .dt-button:focus {
    background-color: #f8f9fa;
    color: #16181b;
}


.dataTables_wrapper:has(div.dataTables_paginate):after {
    margin-top: -47px;
}

div.dataTables_wrapper div.dataTables_info {
    margin-top: -26px;
    margin-left: 15px;
}

div.dataTables_wrapper div.dataTables_paginate {
    margin-top: -35px;
}

.modal-body .dataTables_wrapper .row{
    margin-bottom: 20px;
}

.dt-bootstrap5{
    position: relative;
}

.modal-header_bs5.modal-header {
    align-items: center !important;
    justify-content: space-between !important;
    display: flex !important
}

#_ngModalAlertModalNew .modal-content.modal-content-new{
    min-width: 200px;
}

.dataTables_processing {
    border: none!important;
}

/* Parent harus relative */
div.dataTables_wrapper {
    position: relative;
  }
  
  /* Styling overlay Processing */
  .dataTables_wrapper .dataTables_processing {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(calc(-50% + 100px), -50%) !important;
    /* z-index: 2000 !important; */
    width: 200px !important;
    height: auto !important;
  
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    padding: 16px 20px;
  
    /* font-size: 15px; */
    font-weight: 600;
    color: #c2185b;
    text-align: center;
    white-space: normal !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  
  /* Tambahan spinner */
  div.dataTables_processing::before {
    content: "";
    position: absolute;
    left: 88px;
    top: 20px;
    width: 24px;
    height: 24px;
    border: 3px solid #f5a5cf;
    border-top: 3px solid #c2185b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
  }

  div.dataTables_processing>div:last-child {
    /* position: relative; */
    width: auto; 
    height: auto;
    margin: 2em auto auto;
    /* margin: 1em auto; */
}
  
  @keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
  }
