/* ===========================================================
   SIMADU - Tema Warna Primary (Ponpes Darul Arqam Garut)
   Primary: #2c1f54 (deep purple/navy dari logo)
   =========================================================== */
:root {
    --bs-primary: #2c1f54;
    --bs-primary-rgb: 44, 31, 84;
    --da-primary: #2c1f54;
    --da-primary-dark: #1c1438;
    --da-primary-light: #efedf7;
    --da-accent: #d4a017;
}

/* Bootstrap primary helpers */
.bg-primary,
.btn-primary {
    background-color: #2c1f54 !important;
    border-color: #2c1f54 !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary:not(:disabled):not(.disabled):active {
    background-color: #1c1438 !important;
    border-color: #1c1438 !important;
    box-shadow: 0 0.125rem 0.5rem 0 rgba(44, 31, 84, .4) !important;
}

.btn-primary:focus,
.btn-outline-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(44, 31, 84, .25) !important;
}

.text-primary {
    color: #2c1f54 !important;
}

.border-primary {
    border-color: #2c1f54 !important;
}

.btn-outline-primary {
    color: #2c1f54 !important;
    border-color: #2c1f54 !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:active,
.btn-outline-primary.active {
    background-color: #2c1f54 !important;
    border-color: #2c1f54 !important;
    color: #fff !important;
}

a {
    color: #2c1f54;
}

a:hover {
    color: #1c1438;
}

/* Form focus ring */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: #2c1f54 !important;
    box-shadow: 0 0 0 0.15rem rgba(44, 31, 84, .18) !important;
}

.form-check-input:checked {
    background-color: #2c1f54 !important;
    border-color: #2c1f54 !important;
}

/* Badge primary */
.bg-label-primary {
    background-color: rgba(44, 31, 84, .12) !important;
    color: #2c1f54 !important;
}

.badge.bg-primary {
    background-color: #2c1f54 !important;
}

/* Pagination */
.page-item.active .page-link,
.page-link.active,
.page-link:hover {
    background-color: #2c1f54 !important;
    border-color: #2c1f54 !important;
    color: #fff !important;
}

.page-link {
    color: #2c1f54;
}

/* Sidebar menu active state */
.menu-vertical .menu-inner > .menu-item.active > .menu-link:not(.menu-toggle),
.menu-vertical .menu-inner .menu-sub > .menu-item.active > .menu-link {
    background: linear-gradient(72.47deg, #2c1f54 22.16%, rgba(44, 31, 84, .7) 76.47%) !important;
    box-shadow: 0 2px 6px 0 rgba(44, 31, 84, .3) !important;
    color: #fff !important;
}

.menu-vertical .menu-inner > .menu-item.active > .menu-link:not(.menu-toggle) i,
.menu-vertical .menu-inner > .menu-item.active > .menu-link:not(.menu-toggle) .menu-icon {
    color: #fff !important;
}

.menu-vertical .menu-inner > .menu-item.open:not(.menu-item-closing) > .menu-toggle,
.menu-vertical .menu-inner > .menu-item.active > .menu-toggle {
    color: #2c1f54;
}

/* Brand link */
.app-brand-link {
    text-decoration: none;
}

.app-brand-text span {
    color: #2c1f54;
}

/* Dropdown active */
.dropdown-item.active,
.dropdown-item:active {
    background-color: #2c1f54 !important;
    color: #fff !important;
}

/* Nav tabs */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background-color: #2c1f54 !important;
    color: #fff !important;
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-link:hover {
    color: #2c1f54;
}

/* Alerts */
.alert-primary {
    background-color: rgba(44, 31, 84, .12);
    border-color: rgba(44, 31, 84, .2);
    color: #2c1f54;
}

/* Progress */
.progress-bar {
    background-color: #2c1f54;
}

/* SweetAlert confirm button */
.swal2-confirm.btn-primary,
.swal2-styled.swal2-confirm {
    background-color: #2c1f54 !important;
    border-color: #2c1f54 !important;
}

/* font size buat boxicons */
.bx {
    font-size: inherit !important;
}

/* untuk search spinner */
.table-container {
    position: relative;
}

.htmx-indicator {
    display: none;
}

.htmx-request.htmx-indicator {
    display: block;
}

.table-container #search-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.05);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.table-container .loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: loading-spin 1s linear infinite;
}

@keyframes loading-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
