/* Custom Webkit Scrollbar Styling */

/* Scrollbar Track */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

/* Scrollbar Track Background */
::-webkit-scrollbar-track {
    background: #f1f2f3;
    border-radius: 6px;
}

/* Scrollbar Handle */
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #5e72e4, #825ee4);
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

/* Scrollbar Handle on Hover */
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #4c63d2, #7047d6);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Scrollbar Handle when Active */
::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, #3a4bc8, #5a35c4);
}

/* Scrollbar Corner */
::-webkit-scrollbar-corner {
    background: #f1f2f3;
}

/* For horizontal scrollbars */
::-webkit-scrollbar:horizontal {
    height: 8px;
}

/* Custom styling for specific elements */
.table-responsive::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #11cdef, #1171ef);
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0ea2bd, #0d5ce8);
}

/* Dark theme scrollbar (optional) */
.dark-theme ::-webkit-scrollbar-track {
    background: #2c3e50;
}

.dark-theme ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #5e72e4, #825ee4);
    border: 1px solid #34495e;
}

.dark-theme ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #4c63d2, #7047d6);
}

/* Firefox scrollbar styling (limited support) */
* {
    scrollbar-width: thin;
    scrollbar-color: #5e72e4 #f1f2f3;
}

.sidenav-mini-icon {
    display: none !important;
}

/* ============================================
   CUSTOM CHECKBOX STYLING - Global Override
   ============================================ */

/* Hide default checkbox - exclude form-switch */
.form-check:not(.form-switch) .form-check-input[type="checkbox"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    width: 18px;
    height: 18px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    background-color: #fff !important;
    background-image: none !important;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    margin-top: 0 !important;
    vertical-align: middle;
    flex-shrink: 0;
}

/* Form check container alignment - only for checkboxes, exclude form-switch */
.form-check:has(input[type="checkbox"]):not(.form-switch) {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
}

/* Form check label alignment - only for checkboxes, exclude form-switch */
.form-check:has(input[type="checkbox"]):not(.form-switch) .form-check-label {
    margin-bottom: 0 !important;
    display: flex;
    align-items: center;
    line-height: 18px;
}

/* Checkbox hover state - exclude form-switch */
.form-check:not(.form-switch) .form-check-input[type="checkbox"]:hover {
    border-color: #5e72e4;
    box-shadow: 0 0 0 0.1rem rgba(94, 114, 228, 0.15);
}

/* Checkbox focus state - no focus border - exclude form-switch */
.form-check:not(.form-switch) .form-check-input[type="checkbox"]:focus {
    outline: none;
    box-shadow: none;
}

/* Checkbox checked state - exclude form-switch */
.form-check:not(.form-switch) .form-check-input[type="checkbox"]:checked {
    background-color: #5e72e4 !important;
    border-color: #5e72e4 !important;
    background-image: none !important;
}

/* Remove any default pseudo-elements - exclude form-switch */
.form-check:not(.form-switch) .form-check-input[type="checkbox"]::after {
    display: none !important;
}

.form-check:not(.form-switch) .form-check-input[type="checkbox"]::before {
    display: none !important;
}

/* Custom checkmark - override the hide rule - exclude form-switch */
.form-check:not(.form-switch) .form-check-input[type="checkbox"]:checked::before {
    display: block !important;
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}

/* Disabled state */
.form-check-input[type="checkbox"]:disabled {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    opacity: 0.6;
    cursor: not-allowed;
}

.form-check-input[type="checkbox"]:disabled:checked {
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Different colors for different contexts */
.form-check-input[type="checkbox"].checkbox-success:checked {
    background-color: #198754;
    border-color: #198754;
}

.form-check-input[type="checkbox"].checkbox-warning:checked {
    background-color: #ffc107;
    border-color: #ffc107;
}

.form-check-input[type="checkbox"].checkbox-danger:checked {
    background-color: #dc3545;
    border-color: #dc3545;
}

.form-check-input[type="checkbox"].checkbox-info:checked {
    background-color: #0dcaf0;
    border-color: #0dcaf0;
}

/* Small checkbox variant */
.form-check-input[type="checkbox"].checkbox-sm {
    width: 14px;
    height: 14px;
}

.form-check-input[type="checkbox"].checkbox-sm:checked::before {
    font-size: 10px;
}

/* Large checkbox variant */  
.form-check-input[type="checkbox"].checkbox-lg {
    width: 22px;
    height: 22px;
}

.form-check-input[type="checkbox"].checkbox-lg:checked::before {
    font-size: 14px;
}


/* ============================================
   RADIO BUTTON - Custom Styling
   ============================================ */

/* Custom radio button styling */
.form-check-input[type="radio"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    width: 18px !important;
    height: 18px !important;
    border: 2px solid #dee2e6 !important;
    border-radius: 50% !important;
    background-color: #fff !important;
    background-image: none !important;
    position: relative !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
    margin: 0 !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
    top: 0 !important;
}

/* Radio button hover state */
.form-check-input[type="radio"]:hover {
    border-color: #5e72e4 !important;
    box-shadow: 0 0 0 0.1rem rgba(94, 114, 228, 0.15) !important;
}

/* Radio button focus state */
.form-check-input[type="radio"]:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Radio button checked state */
.form-check-input[type="radio"]:checked {
    background-color: #5e72e4 !important;
    border-color: #5e72e4 !important;
    background-image: none !important;
}

/* Remove any default pseudo-elements for radio */
.form-check-input[type="radio"]::after,
.form-check-input[type="radio"]::before {
    display: none !important;
}

/* Custom radio dot */
.form-check-input[type="radio"]:checked::before {
    content: "" !important;
    position: absolute !important;
    top: 4px !important;
    left: 4px !important;
    right: 4px !important;
    bottom: 4px !important;
    width: 6px !important;
    height: 6px !important;
    background-color: #fff !important;
    border-radius: 50% !important;
    display: block !important;
    transform: none !important;
}

/* Radio button disabled state */
.form-check-input[type="radio"]:disabled {
    background-color: #f8f9fa !important;
    border-color: #dee2e6 !important;
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

/* Form check inline layout for radio buttons */
.form-check-inline:has(input[type="radio"]) {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-right: 1rem !important;
    margin-bottom: 0 !important;
    vertical-align: middle !important;
}

/* Form check inline label for radio buttons */
.form-check-inline:has(input[type="radio"]) .form-check-label,
.form-check-inline:has(input[type="radio"]) .form-label {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    display: inline-block !important;
    vertical-align: middle !important;
    line-height: 18px !important;
}

/* Form check regular layout for radio buttons */
.form-check:has(input[type="radio"]):not(.form-check-inline) {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 0.5rem !important;
}

.form-check:has(input[type="radio"]):not(.form-check-inline) .form-check-label,
.form-check:has(input[type="radio"]):not(.form-check-inline) .form-label {
    margin-bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
    line-height: 18px !important;
}