/* Moved from inline <style> in: includes/head.php */
/* Bootstrap CSS variable override for warning color (brand) */
:root {
    /* Hex: #FBA424 -> RGB: 251, 164, 36 */
    --bs-warning: #FBA424 !important;
    --bs-warning-rgb: 251, 164, 36 !important;
}

/* Using #FBA424 as the requested warning color (interpreting FBA424 -> FBA424) */
.btn-warning,
.btn-warning:hover,
.btn-warning:focus,
.badge-light-warning {
    background-color: #FBA424 !important;
    border-color: #FBA424 !important;
    color: #ffffff !important;
    /* dark text for contrast */
}

/* Ensure icons inside warning buttons keep appropriate color */
.btn-warning i,
.btn-warning .ki-outline {
    color: #ffffff !important;
}

/* Slightly darker on hover */
.btn-warning:hover {
    filter: brightness(0.95);
}

/* Map the utility class btn-active-color-white to use the requested brand color for icons/active states */
.btn.btn-active-color-white,
.btn.btn-active-color-white:hover,
.btn.btn-active-color-white:focus,
.btn.btn-active-color-white:active,
.btn.btn-active-color-white.active,
.btn.btn-active-color-white.show,
.btn-check:active+.btn.btn-active-color-white,
.btn-check:checked+.btn.btn-active-color-white {
    background-color: transparent !important;
    border-color: transparent !important;
}

/* Icons inside buttons using this utility should show the brand color */
.btn.btn-active-color-white .svg-icon,
.btn.btn-active-color-white i,
.btn.btn-active-color-white .ki-outline {
    color: #FBA424 !important;
    fill: #FBA424 !important;
}

/* On hover / focus / active keep the icon in the same brand color (no flash to white) */
.btn.btn-active-color-white:hover .svg-icon,
.btn.btn-active-color-white:focus .svg-icon,
.btn.btn-active-color-white:active .svg-icon,
.btn.btn-active-color-white.show .svg-icon,
.btn.btn-active-color-white.active .svg-icon,
.btn-check:checked+.btn.btn-active-color-white .svg-icon {
    color: #FBA424 !important;
    fill: #FBA424 !important;
}

/* Desktop sidebar collapse */
@media (min-width: 992px) {
    body.aside-collapsed #kt_aside {
        display: none !important;
    }
    body.aside-collapsed #kt_wrapper {
        padding-left: 0 !important;
    }
    body.aside-collapsed .d-flex.flex-column-fluid > div:not(#kt_aside) {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 auto !important;
    }
}

/* Top bar menu search */
.menu-search { max-width: 420px; }
.menu-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,.7); pointer-events: none; }
.menu-search-input { padding-left: 38px; background: rgba(255,255,255,.12); border: 0; color: #fff; }
.menu-search-input::placeholder { color: rgba(255,255,255,.65); }
.menu-search-input:focus { background: rgba(255,255,255,.2); color: #fff; box-shadow: none; }
.menu-search-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 1100; max-height: 340px; overflow-y: auto; background: var(--bs-body-bg, #fff); border-radius: .5rem; box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: .35rem; }
.menu-search-item { display: flex; flex-direction: column; padding: .4rem .65rem; border-radius: .4rem; color: var(--bs-body-color, #333); text-decoration: none; }
.menu-search-item .menu-search-label { font-weight: 600; font-size: .95rem; }
.menu-search-item .menu-search-section { font-size: .78rem; color: #9ca3af; }
.menu-search-item:hover, .menu-search-item.active { background: rgba(251,164,36,.14); color: var(--bs-body-color, #333); }
.menu-search-item mark { background: transparent; color: #FBA424; padding: 0; font-weight: 700; }
.menu-search-empty { padding: .6rem .75rem; font-size: .85rem; color: #9ca3af; }

/* Aside menu active / here state — warning color */
#kt_aside .menu-link.active {
    background-color: rgba(251, 164, 36, 0.08) !important;
}
#kt_aside .menu-link.active .menu-title {
    color: #FBA424 !important;
}
#kt_aside .menu-link.active .menu-bullet .bullet {
    background-color: #FBA424 !important;
}
#kt_aside .menu-link.active .menu-icon i,
#kt_aside .menu-link.active .menu-icon .ki-duotone {
    color: #FBA424 !important;
}
/* Parent accordion "here" — title and icon keep warning tint */
#kt_aside .menu-item.here > .menu-link .menu-title,
#kt_aside .menu-item.here > .menu-link .menu-icon i,
#kt_aside .menu-item.here > .menu-link .menu-icon .ki-duotone {
    color: #FBA424 !important;
}

/* Brand-colored Bootstrap switch (form-switch) */
/* Targets Bootstrap 5 form-switch input when checked */

.form-check.form-switch .form-check-input:checked {
    background-color: #FBA424 !important;
    border-color: #FBA424 !important;
}

/* The knob/indicator (using the ::before pseudo-element in some themes) */
.form-check.form-switch .form-check-input:checked::after,
.form-check.form-switch .form-check-input:checked::before {
    background-color: #ffffff !important;
}

/* Focus state: add brand-colored ring */
.form-check.form-switch .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(251, 164, 36, 0.22) !important;
    border-color: #FBA424 !important;
}

/* For browsers/themes that use appearance changes on toggle
   adjust the accent-color where supported */
.form-check.form-switch .form-check-input {
    accent-color: #FBA424;
}

/* Image input placeholder (moved from includes/script.php) */
.image-input-placeholder {
    background-image: url('../media/svg/files/blank-image.svg');
}

[data-bs-theme="dark"] .image-input-placeholder {
    background-image: url('../media/svg/files/blank-image-dark.svg');
}
