/* Remove currency selection styles that are no longer needed */
.currency-selection, .currency-item, .currency-label {
    /* Remove these styles or comment them out */
}

/* Custom styling for multi-select elements */
.currencies-select option,
#id_services option,
#id_working_days option,
#id_permissions option {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.currencies-select option:hover,
#id_services option:hover,
#id_working_days option:hover,
#id_permissions option:hover {
    background-color: #f1f3f5;
}

.currencies-select option:checked,
#id_services option:checked,
#id_working_days option:checked,
#id_permissions option:checked {
    background-color: #d2e9ff;
    color: #0d6efd;
    font-weight: 500;
}

/* Dark mode support */
[data-bs-theme="dark"] .currencies-select option:hover,
[data-bs-theme="dark"] #id_services option:hover,
[data-bs-theme="dark"] #id_working_days option:hover,
[data-bs-theme="dark"] #id_permissions option:hover {
    background-color: #343a40;
}

[data-bs-theme="dark"] .currencies-select option:checked,
[data-bs-theme="dark"] #id_services option:checked,
[data-bs-theme="dark"] #id_working_days option:checked,
[data-bs-theme="dark"] #id_permissions option:checked {
    background-color: #2c3e50;
    color: #8ab4f8;
}

/* Standardized dashboard content padding */
.dashboard-content {
    padding: 1.5rem 0; /* This is equivalent to the py-4 Bootstrap class */
}

/* Modal backdrop safety styles to prevent grayed-out page issues */
body {
    /* Ensure body remains interactive even with modal backdrop issues */
    pointer-events: auto !important;
}

body.modal-open {
    /* Ensure consistent modal-open behavior */
    overflow: hidden;
    padding-right: var(--bs-scrollbar-width, 0px);
}

/* Prevent multiple modal backdrops from stacking */
.modal-backdrop ~ .modal-backdrop {
    display: none !important;
}

/* Ensure modal backdrops don't interfere with page interaction when they shouldn't */
.modal-backdrop.orphaned {
    display: none !important;
}

/* Prevent pointer events issues on modals */
.modal {
    pointer-events: auto !important;
}

.modal-dialog {
    pointer-events: auto !important;
}

/* Safety override for any stuck modal states */
body:not(.modal-open) .modal-backdrop {
    display: none !important;
}

/* Ensure invoice modal displays properly over other elements */
#invoiceModal {
    z-index: 1055 !important;
}

#invoiceModal .modal-backdrop {
    z-index: 1050 !important;
}

/* Emergency reset class that can be applied via JavaScript */
.modal-emergency-reset {
    overflow: auto !important;
    padding-right: 0 !important;
    pointer-events: auto !important;
}

.modal-emergency-reset .modal-backdrop {
    display: none !important;
} 

/* Report Summary Cards - Clean Bootstrap 5 styling */
#reportContent .card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 18rem;
}

#reportContent .card .card-body {
    padding: 1rem;
}

/* Force proper visibility */
#reportContent .card .card-body h6,
#reportContent .card .card-body h4 {
    opacity: 1 !important;
    visibility: visible !important;
}  