/* Contentore CMS - Global Brand Colors & Button Styling */

:root {
    --contentore-primary: #C3E600;
    --contentore-secondary: #855BFC;
    --contentore-primary-hover: #D4F000;
    --contentore-secondary-hover: #9D7CFF;
    --bs-primary: #C3E600;
    --bs-secondary: #855BFC;
}

/* Global Button Overrides */
.btn-primary,
button.btn-primary,
.btn.btn-primary {
    background-color: var(--contentore-primary) !important;
    border-color: var(--contentore-primary) !important;
    color: #1e1e2d !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
button.btn-primary:hover,
button.btn-primary:focus,
button.btn-primary:active,
.btn.btn-primary:hover,
.btn.btn-primary:focus,
.btn.btn-primary:active {
    background-color: var(--contentore-secondary) !important;
    border-color: var(--contentore-secondary) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(133, 91, 252, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Light Primary Button Contrast Fix */
.btn-light-primary {
    color: #1e1e2d !important;
}

.btn-light-primary:hover {
    background-color: var(--contentore-secondary) !important;
    color: #ffffff !important;
}

/* Secondary Button Overrides (Optional - if needed for variety) */
.btn-secondary,
button.btn-secondary,
.btn.btn-secondary {
    background-color: #f1f1f4 !important;
    border-color: #f1f1f4 !important;
    color: #3f4254 !important;
}

.btn-secondary:hover {
    background-color: #e4e6ef !important;
    border-color: #e4e6ef !important;
    color: var(--contentore-secondary) !important;
}

/* Utility Classes */
.text-brand-primary { color: var(--contentore-primary) !important; }
.text-brand-secondary { color: var(--contentore-secondary) !important; }
.bg-brand-primary { background-color: var(--contentore-primary) !important; }
.bg-brand-secondary { background-color: var(--contentore-secondary) !important; }
.border-brand-primary { border-color: var(--contentore-primary) !important; }
.border-brand-secondary { border-color: var(--contentore-secondary) !important; }

/* Sidebar Active & Hover States */
.app-sidebar .menu .menu-item .menu-link.active,
.app-sidebar .menu .menu-item.here > .menu-link,
.app-sidebar .menu .menu-item.show > .menu-link {
    transition: all 0.3s ease;
    background: #C3E600 !important;
}

/* Hover effects for sidebar items - Apply Secondary Color */
.app-sidebar .menu .menu-item .menu-link:hover,
.app-sidebar .menu .menu-item:not(.here):not(.show) > .menu-link:hover {
    background-color: var(--contentore-secondary) !important;
    transition: all 0.3s ease;
}

.app-sidebar .menu .menu-item .menu-link:hover .menu-title,
.app-sidebar .menu .menu-item:not(.here):not(.show) > .menu-link:hover .menu-title {
    color: #ffffff !important;
}

.app-sidebar .menu .menu-item .menu-link:hover .menu-icon i,
.app-sidebar .menu .menu-item .menu-link:hover .menu-bullet .bullet-dot,
.app-sidebar .menu .menu-item:not(.here):not(.show) > .menu-link:hover .menu-icon i,
.app-sidebar .menu .menu-item:not(.here):not(.show) > .menu-link:hover .menu-bullet .bullet-dot {
    color: #ffffff !important;
    background-color: #ffffff !important;
}

/* Default/Active state for sidebar items - Primary Opacity or Solid with Black Text */
.app-sidebar .menu .menu-item.here > .menu-link,
.app-sidebar .menu .menu-item.show > .menu-link,
.app-sidebar .menu .menu-item .menu-link.active {
    background-color: rgba(195, 230, 0, 0.15) !important;
}

.app-sidebar .menu .menu-item.here > .menu-link .menu-title,
.app-sidebar .menu .menu-item.show > .menu-link .menu-title,
.app-sidebar .menu .menu-item .menu-link.active .menu-title {
    color: #1e1e2d !important; /* Black text */
}

.app-sidebar .menu .menu-item.here > .menu-link .menu-icon i,
.app-sidebar .menu .menu-item.show > .menu-link .menu-icon i,
.app-sidebar .menu .menu-item .menu-link.active .menu-icon i,
.app-sidebar .menu .menu-item.here > .menu-link .menu-bullet .bullet-dot,
.app-sidebar .menu .menu-item.show > .menu-link .menu-bullet .bullet-dot,
.app-sidebar .menu .menu-item .menu-link.active .menu-bullet .bullet-dot {
    color: #1e1e2d !important; /* Black icons */
    background-color: #1e1e2d !important;
}

/* Menu Arrow colors */
.app-sidebar .menu .menu-item.here > .menu-link .menu-arrow:after,
.app-sidebar .menu .menu-item.show > .menu-link .menu-arrow:after {
    background-color: #1e1e2d !important;
}

.app-sidebar .menu .menu-item:not(.here):not(.show) > .menu-link:hover .menu-arrow:after {
    background-color: #ffffff !important;
}

/* --- Comprehensive Global Overrides --- */

/* Text & Link Colors */
.text-primary { color: var(--contentore-primary) !important; }
a { transition: color 0.3s ease; }
a:hover { color: var(--contentore-secondary) !important; }

/* Backgrounds & Badges */
.bg-primary { background-color: var(--contentore-primary) !important; color: #1e1e2d !important; }
.badge-primary { background-color: var(--contentore-primary) !important; color: #1e1e2d !important; }
.badge-light-primary {
    background-color: rgba(195, 230, 0, 0.1) !important;
    color: #1e1e2d !important;
}

/* Active Button States (Light Primary) */
.btn-active-primary:active,
.btn-active-primary.active,
.show > .btn-active-primary {
    background-color: var(--contentore-secondary) !important;
    border-color: var(--contentore-secondary) !important;
    color: #ffffff !important;
}

.btn-active-light-primary:active,
.btn-active-light-primary.active,
.show > .btn-active-light-primary {
    background-color: var(--contentore-primary) !important;
    color: #1e1e2d !important;
}

/* Tabs & Navigation */
.nav-tabs .nav-link.active,
.nav-tabs .nav-link:hover {
    border-bottom: 3px solid var(--contentore-primary) !important;
    color: var(--contentore-primary) !important;
}

.nav-pills .nav-link.active,
.nav-pills .nav-link:hover {
    background-color: var(--contentore-primary) !important;
    color: #1e1e2d !important;
}

/* Form Controls */
.form-check-input:checked {
    background-color: var(--contentore-primary) !important;
    border-color: var(--contentore-primary) !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--contentore-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(195, 230, 0, 0.15) !important;
}

/* Pagination */
.pagination .page-item.active .page-link {
    background-color: var(--contentore-primary) !important;
    border-color: var(--contentore-primary) !important;
    color: #1e1e2d !important;
}

/* Stepper & Wizards */
.stepper.stepper-pills .stepper-item.current .stepper-icon {
    background-color: var(--contentore-primary) !important;
}

.stepper.stepper-pills .stepper-item.current .stepper-label .stepper-title {
    color: var(--contentore-primary) !important;
}

/* Icons */
.svg-icon.svg-icon-primary svg [fill]:not([fill="none"]),
.svg-icon.svg-icon-primary svg [stroke]:not([stroke="none"]) {
    fill: var(--contentore-primary) !important;
}

i.ki-primary {
    color: var(--contentore-primary) !important;
}

/* Scrolltop */
#kt_scrolltop {
    background-color: var(--contentore-primary) !important;
}

#kt_scrolltop:hover {
    background-color: var(--contentore-secondary) !important;
}
