﻿/* Global Font Size for Compact UI */
html, body {
    height: 100%;
    margin: 0;
}

@media (min-width: 768px) {
    html {
        font-size: 15px;
    }
}

/* Focus States for Form Inputs & Buttons */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.08rem white, 0 0 0 0.2rem #258cfb;
}

/* Layout Adjustments */

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}


main {
    flex: 1;
}

/* Navbar Compact Design */
.navbar {
    padding: 4px 10px; /* Reduce padding */
    background-color: #f8f9fa;
    padding: 10px;
    border-bottom: 2px solid #ddd;
}

.navbar-brand {
    font-size: 15px;
    font-weight: bold;
}

.navbar-nav .nav-link {
    padding: 5px 8px;
    font-size: 13px;
}

.navbar-nav .dropdown-menu {
    min-width: 220px;
}
/* Icons in Navbar */
.navbar-nav .nav-link i {
    margin-right: 5px;
}

/* Compact Forms */
.form-control {
    padding: 5px 8px;
    font-size: 13px;
    border-radius: 4px;
}

.form-check-label {
    font-size: 13px;
}

/* Buttons */
.btn {
    padding: 5px 10px;
    font-size: 13px;
    border-radius: 3px;
}

/* Primary Button */
.btn-primary {
    background-color: #293988 !important;
    border: none;
    color: #fff !important;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

    .btn-primary:hover {
        color: #fff !important;
        background-color: #1f2d6a !important; /* slightly darker */
        border-color: #0a58ca !important;
    }

.btn-primary:focus,
.btn-primary.focus {
    background-color: #1f2d6a !important;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(41, 57, 136, 0.4);
}

.btn-primary:active,
.btn-primary.active {
    background-color: #162252 !important; /* darker pressed state */
    box-shadow: none;
}

/* Outline Primary Button */
.btn-outline-primary {
    background-color: transparent;
    color: #293988 !important;
    border: 1px solid #293988 !important;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn-outline-primary:hover {
    background-color: #293988 !important;
    color: #fff;
}

.btn-outline-primary:focus,
.btn-outline-primary.focus {
    background-color: #293988 !important;
    color: #fff;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(41, 57, 136, 0.4);
}

.btn-outline-primary:active,
.btn-outline-primary.active {
    background-color: #1f2d6a !important; /* slightly darker when pressed */
    color: #fff;
    border-color: #1f2d6a !important;
    box-shadow: none;
}


/* Brand text color */
.text-primary {
    color: #293988 !important;
}

/* Hover + Focus states (for links or clickable text) */
a.text-primary:hover,
a.text-primary:focus {
    color: #1f2d6a !important; /* slightly darker */
    text-decoration: underline; /* keeps link feel */
}

/* Active state */
a.text-primary:active {
    color: #162252 !important; /* even darker pressed state */
}



/* Tables - Compact Design */
.table {
    font-size: 13px;
}

.table th, .table td {
    padding: 4px 6px;
}

.table .hidden-column {
    display: none;
}

/* Cards */
.card {
    padding: 10px;
    border-radius: 6px;
}

/* Footer */
footer {
    background: #f8f9fa;
    text-align: center;
    padding: 10px;
}


/* ✅ Blurred Background Loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(5px); /* ✅ Blur effect */
    background: rgba(202, 202, 202, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
}

.loading-content {
    text-align: center;
    
}

.d-none {
    display: none !important;
}

/* Pagination - Compact Design */
.pagination {
    font-size: 13px;
    margin: 10px 0;
    display: flex;
    justify-content: center;
}

.pagination .page-item {
    margin: 0 2px;
}

.pagination .page-link {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 3px;
    color: #4A80F5;
    border: 1px solid #ddd;
}

.pagination .page-link:hover {
    background-color: #f0f0f0;
    color: #3669D4;
}

.pagination .active .page-link {
    background-color: #4A80F5;
    color: white;
    border-color: #4A80F5;
}

.pagination .disabled .page-link {
    color: #b1b1b1;
    pointer-events: none;
    background-color: #f8f9fa;
}


/* toast  */

.custom-toast {
    min-width: 450px; /* Increased width */
    max-width: 500px; /* Ensures it doesn't get too wide */
    color: white;
    border-radius: 8px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    overflow: hidden; /* Ensures color layout remains consistent */
}

.toast-header {
    font-weight: bold;
    color: white !important;
}

.toast-body {
    padding: 12px;
}

/* Toast Colors */
.toast-success .toast-header {
    background-color: #198754 !important; /* Dark Green */
}

.toast-success .toast-body {
    background-color: #d1e7dd !important; /* Light Green */
    color: black !important;
}

.toast-error .toast-header {
    background-color: #dc3545 !important; /* Dark Red */
}

.toast-error .toast-body {
    background-color: #f8d7da !important; /* Light Red */
    color: black !important;
}

.toast-warning .toast-header {
    background-color: #ffc107 !important; /* Dark Yellow */
    color: black !important;
}

.toast-warning .toast-body {
    background-color: #fff3cd !important; /* Light Yellow */
    color: black !important;
}

.toast-info .toast-header {
    background-color: #0dcaf0 !important; /* Dark Blue */
    color: black !important;
}

.toast-info .toast-body {
    background-color: #cff4fc !important; /* Light Blue */
    color: black !important;
}


/*Select */

.bootstrap-select .dropdown-toggle {
    padding: 4px 8px !important; /* Reduces padding */
    font-size: 14px; /* Smaller font size */
    height: 32px; /* Reduces height */
    line-height: 1.2;
}

.bootstrap-select .dropdown-menu {
    font-size: 14px;
}

.bootstrap-select .bs-searchbox input {
    height: 28px; /* Smaller search box */
    font-size: 13px;
}

.bootstrap-select .dropdown-toggle::after {
    margin-top: -2px; /* Adjust dropdown icon alignment */
}


/* Compact styling for both Single-Select & Multi-Select */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    height: 30px !important; /* Reduce height */
    padding: 2px 5px !important; /* Adjust padding */
    font-size: 12px !important; /* Smaller text */
    border-radius: 4px !important; /* Maintain rounded corners */
    min-height: 30px !important;
}

/* Reduce spacing inside the dropdown for both Single & Multi-Select */
.select2-container--default .select2-results > .select2-results__options {
    font-size: 12px !important; /* Adjust text size */
    padding: 3px !important; /* Reduce padding */
    max-height: 150px !important; /* Reduce dropdown height */
    overflow-y: auto !important; /* Enable scrolling */
}

/* Reduce spacing between options */
.select2-container--default .select2-results__option {
    padding: 4px 6px !important; /* Less padding per option */
}

/* Reduce the dropdown arrow size */
.select2-container--default .select2-selection--single .select2-selection__arrow,
.select2-container--default .select2-selection--multiple .select2-selection__arrow {
    top: 50% !important;
    transform: translateY(-50%) !important;
    height: 16px !important; /* Smaller arrow */
}

/* Compact search box inside the dropdown */
.select2-container--default .select2-search--dropdown .select2-search__field {
    height: 24px !important;
    font-size: 12px !important;
    padding: 2px !important;
}

/* Compact Multi-Select Tags */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    font-size: 12px !important; /* Smaller text */
    padding: 2px 6px !important; /* Reduce padding */
    margin: 2px !important; /* Reduce spacing */
    border-radius: 3px !important; /* Keep rounded corners */
    background-color: #f0f0f0 !important; /* Subtle background */
}

/* Limit Maximum Tag Display & Show “+ More” for Multi-Select */
.select2-selection__rendered li {
    max-width: 120px !important; /* Limit tag width */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Adjust Placeholder Text */
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    font-size: 12px !important; /* Reduce placeholder size */
    color: #999 !important; /* Lighter color */
}





/* Mobile Optimization */
@media (max-width: 576px) {
    .container {
        padding: 10px;
    }

    .form-control {
        padding: 4px 6px;
    }

    .btn {
        font-size: 12px;
        padding: 4px 8px;
    }
}


#rolesList .form-check {
    margin-bottom: 4px;
}

#rolesList .form-check-input {
    margin-top: 0.1rem;
}


/*Context Menu*/

#contextMenu {
    font-size: 0.85rem;
    padding: 0;
    border-radius: 6px;
    background-color: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    min-width: 220px;

    
}



/* Items */
#contextMenu .dropdown-item {
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #333;
    transition: all 0.15s ease-in-out;
    border-radius: 4px;
}

/* Icon */
#contextMenu .dropdown-item i {
    font-size: 1rem;
    color: #6c757d;
    transition: color 0.2s;
}

/* General hover */
#contextMenu .dropdown-item:hover {
    background-color: #f4f6f8;
    color: #111;
}

#contextMenu .dropdown-item:hover i {
    color: #000;
}

/* Section title */
#contextMenu .dropdown-header {
    padding: 8px 14px 4px 14px;
    font-size: 0.72rem;
    color: #9ca3af;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Special Hover Colors (clean tone) */
#contextMenu .dropdown-item.text-danger:hover {
    background-color: #fae3e3;
    color: #d32f2f !important;
}

#contextMenu .dropdown-item.text-danger:hover i {
    color: #d32f2f !important;
}




.folder-contents {
    display: none;
}

.folder-toggle {
    cursor: pointer;
}


/*Drag and  Drop*/



#dropZone {
    border: 2px dashed #0d6efd;
    border-radius: 6px;
    padding: 30px;
    text-align: center;
    background-color: #f8f9fa;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

#dropZone.dragover {
    background-color: #e8f0fe;
    border-color: #0b5ed7;
    color: #0b5ed7;
}

#dropZone i {
    font-size: 2rem;
    margin-bottom: 5px;
    display: block;
}



#fileList .progress {
    height: 16px;
    margin-top: 5px;
}

#fileList .progress-bar {
    font-size: 0.75rem;
    line-height: 16px;
}


.hidden {
    display: none;
}


.select2-results__option {
    padding: 6px 10px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #f1f3f5 !important;
    color: #212529 !important;
}



.circle-dot {
    width: 10px;
    height: 10px;
    background-color: #0d6efd;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
}

.vertical-timeline-step {
    position: relative;
    padding-left: 20px;
}

.vertical-timeline-step::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 6px;
    width: 8px;
    height: 8px;
    background: #0d6efd; /* Bootstrap primary color */
    border-radius: 50%;
}

.vertical-timeline-step::after {
    content: "";
    position: absolute;
    top: 14px;
    left: 9px;
    width: 2px;
    height: calc(100% - 14px);
    background: #dee2e6; /* light border color */
}

.vertical-timeline-step:last-child::after {
    display: none;
}


.wrap-text {
    white-space: normal !important;
    word-break: break-word !important;
    max-width: 200px; /* optional: controls wrap point */
}

.avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    color: #333;
    border: 1px solid #ccc;
}


