/* Bangladesh Election Commission - Color Theme Override */
/* Only color changes, no structural modifications */

:root {
    /* Government theme colors */
    --bs-primary: #653887;
    --bs-primary-rgb: 101, 56, 135;
    --bs-success: #28a745; /* Green for success */
    --bs-success-rgb: 40, 167, 69;
    --bs-danger: #dc3545; /* Red for danger */
    --bs-danger-rgb: 220, 53, 69;
}

/* Update existing color references only */
a {
    color: #653887;
}

a:hover {
    color: #7a4799;
}

.text-primary {
    color: #653887 !important;
}

.bg-primary {
    background-color: #653887 !important;
}

.btn-primary {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-primary:hover {
    background-color: #218838;
    border-color: #218838;
}

.btn-secondary {
    background-color: #653887;
    border-color: #653887;
}

.btn-secondary:hover {
    background-color: #7a4799;
    border-color: #7a4799;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #c82333;
}

.sidebar-nav .nav-link:hover {
    color: #218838 !important;
    background-color: rgba(40, 167, 69, 0.1) !important;
}

.sidebar-nav .nav-link:not(.collapsed) {
    color: #218838 !important;
    background-color: rgba(40, 167, 69, 0.15) !important;
}

.sidebar-nav .nav-link:hover i {
    color: #218838 !important;
}

.sidebar-nav .nav-link:not(.collapsed) i {
    color: #218838 !important;
}

/* Add green accent for active sidebar items */
.sidebar-nav .nav-link.active {
    background-color: #28a745 !important;
    color: #fff !important;
    border-radius: 4px;
}

.sidebar-nav .nav-link.active i {
    color: #fff !important;
}

/* Green accent for submenu items */
.sidebar-nav .nav-content .nav-link:hover {
    background-color: rgba(40, 167, 69, 0.08) !important;
    color: #28a745 !important;
}

/* Header with green background - white text for contrast */
.header {
    background: linear-gradient(135deg, #28a745 0%, #218838 50%, #28a745 100%);
    box-shadow: 0 2px 20px rgba(220, 53, 69, 0.15);
}

.header .logo span,
.header .toggle-sidebar-btn,
.header .nav-profile,
.header .nav-profile span,
.header .nav-profile .text-muted {
    color: #fff !important;
}

.header .toggle-sidebar-btn:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.header .bg-primary {
    background-color: #fff !important;
    color: #28a745 !important;
    border: 2px solid #dc3545;
}

/* Subtle green hover for profile link (no white box) */
/* Force override against any white hover from theme */
.header-nav a.nav-link.nav-profile:hover,
.header-nav a.nav-link.nav-profile:focus,
.header-nav a.nav-link.nav-profile:focus-visible,
.header-nav .dropdown.show > a.nav-link.nav-profile,
.header .nav-profile:hover,
.header .nav-profile:focus,
.header .nav-profile:focus-visible {
    background-color: rgba(40, 167, 69, 0.14) !important;
    border: 0 !important; /* remove any white border */
    outline: none !important; /* remove focus ring */
    box-shadow: none !important;
    background-image: none !important;
}

.pagetitle h1 {
    color: #6c757d;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(40, 167, 69, 0.25);
    box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.25);
}

/* Dropdown hover green */
.dropdown-item:hover {
    background-color: rgba(40, 167, 69, 0.1) !important;
    color: #28a745 !important;
}

.dropdown-menu .dropdown-item:hover {
    background-color: rgba(40, 167, 69, 0.1) !important;
    color: #28a745 !important;
}

.header-nav .profile .dropdown-item:hover {
    background-color: rgba(40, 167, 69, 0.1) !important;
    color: #28a745 !important;
}

.header-nav .notifications .notification-item:hover {
    background-color: rgba(40, 167, 69, 0.1) !important;
    color: #28a745 !important;
}

.header-nav .messages .message-item:hover {
    background-color: rgba(40, 167, 69, 0.1) !important;
    color: #28a745 !important;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(40, 167, 69, 0.1) !important;
    color: #28a745 !important;
}

body {
    background: rgba(40, 167, 69, 0.05) !important;
}

/* Replace blue backgrounds with green */
.bg-primary-light {
    background-color: rgba(40, 167, 69, 0.1) !important;
    border-color: rgba(40, 167, 69, 0.1) !important;
}

.dashboard .activity .activity-item::before {
    background-color: rgba(40, 167, 69, 0.2) !important;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: #28a745 !important;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background-color: #218838 !important;
}

/* Override blue colors to green */
.fa-grip-vertical {
    color: #28a745 !important;
}

.card-header {
    background-color: rgba(40, 167, 69, 0.1) !important;
}

.card-header h5 {
    color: #495057 !important;
}

.card-header i {
    color: #495057 !important;
}

.card-footer {
    background-color: rgba(40, 167, 69, 0.1) !important;
}

/* Remove footer border */
.footer {
    border-top: none !important;
    background-color: rgba(40, 167, 69, 0.05) !important;
}

.footer .copyright {
    color: #495057 !important;
}

.footer .credits {
    color: #6c757d !important;
}
