:root {
    --bs-light: #f8f9fa;
}

/*Botões*/
.bulk-delete-btn {
    background-color: #6c757d;
    color: white;
    border-radius: 6px;
    border: none;
    padding: 0.4rem 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(108, 117, 125, 0.2);
    position: relative;
    overflow: hidden;
    opacity: 0.7;
}

.bulk-delete-btn:hover {
    background-color: #5a6268;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(108, 117, 125, 0.3);
    opacity: 0.9;
}

.bulk-delete-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(108, 117, 125, 0.2);
}

.bulk-delete-btn.has-items-selected {
    background-color: #dc3545;
    box-shadow: 0 2px 5px rgba(220, 53, 69, 0.2);
    opacity: 1;
}

.bulk-delete-btn.has-items-selected:hover {
    background-color: #c82333;
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.bulk-delete-btn .btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.bulk-delete-btn .icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.bulk-delete-btn .la-trash {
    font-size: 1.1rem;
}

.bulk-delete-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.bulk-delete-btn:hover::before {
    width: 200%;
    height: 200%;
}


.app-footer {
    background: #303C54 !important;
}

.justify-content-between {
    justify-content: space-between !important;
}
.bg-gradient-primary {
    background: #1f1498 !important;
    background: linear-gradient(45deg, #321fdb 0%, #1f1498 100%) !important;
    border-color: #1f1498 !important;
}

.bg-gradient-secondary {
    background: #fff !important;
    background: linear-gradient(45deg, #c8d2dc 0%, #fff 100%) !important;
    border-color: #fff !important;
}

.bg-gradient-success {
    background: #1b9e3e !important;
    background: linear-gradient(45deg, #2eb85c 0%, #1b9e3e 100%) !important;
    border-color: #1b9e3e !important;
}

.bg-gradient-info {
    background: #2982cc !important;
    background: linear-gradient(45deg, #39f 0%, #2982cc 100%) !important;
    border-color: #2982cc !important;
}

.bg-gradient-warning {
    background: #f6960b !important;
    background: linear-gradient(45deg, #f9b115 0%, #f6960b 100%) !important;
    border-color: #f6960b !important;
}

.bg-gradient-danger {
    background: #d93737 !important;
    background: linear-gradient(45deg, #e55353 0%, #d93737 100%) !important;
    border-color: #d93737 !important;
}

.bg-gradient-light {
    background: #fff !important;
    background: linear-gradient(45deg, #e3e8ed 0%, #fff 100%) !important;
    border-color: #fff !important;
}

.bg-gradient-dark {
    background: #212333 !important;
    background: linear-gradient(45deg, #3c4b64 0%, #212333 100%) !important;
    border-color: #212333 !important;
}

.img-fluid, .img-thumbnail {
    padding-bottom: 8px;
}

[class^=text-value] {
    font-weight: 600;
}
.text-value {
    font-size: 0.875rem;
}
.modal {
    background: rgba(0, 0, 0, 0.5);
}
.modal-backdrop {
    display: none;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

/* UX Improvements for Backpack Datatables & Bulk Action Buttons */
.bulk-delete-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: row !important;
    white-space: nowrap !important;
    padding: 0.5rem 1rem !important;
    gap: 8px !important;
    height: 38px !important;
    opacity: 0.8;
}
.bulk-delete-btn .btn-content {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
}
.bulk-delete-btn .icon-wrapper {
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
}

/* Align and space bulk action buttons and other bottom buttons */
.bulk-buttons, 
[bp-section="buttons"],
.d-print-none.d-flex.justify-content-between {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 12px !important;
    margin-top: 25px !important; /* Space between the table and the bottom buttons/pagination */
    margin-bottom: 15px !important;
}

/* Align checkbox column to the left safely */
table.dataTable > tbody > tr > td:first-child,
table.dataTable > thead > tr > th:first-child,
table.dataTable > tfoot > tr > td:first-child,
table.dataTable > tfoot > tr > th:first-child {
    text-align: left !important;
    vertical-align: middle !important;
    padding-left: 16px !important; /* Ensure proper spacing from the left border */
}

table.dataTable td input[type="checkbox"],
table.dataTable th input[type="checkbox"] {
    margin: 0 !important;
    vertical-align: middle !important;
    cursor: pointer;
}

/* Extra spacing directly on the bulk delete button */
.bulk-delete-btn {
    margin-top: 15px !important;
    margin-bottom: 10px !important;
}

/* SweetAlert2 Global Dark Theme Override */
body.theme-dark .swal2-popup {
    background: #1e293b !important;
    color: #f1f5f9 !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 25px 60px rgba(0,0,0,0.5) !important;
}
body.theme-dark .swal2-title {
    color: #f1f5f9 !important;
}
body.theme-dark .swal2-html-container {
    color: #cbd5e1 !important;
}
body.theme-dark .swal2-icon.swal2-question {
    border-color: #3b82f6 !important;
    color: #3b82f6 !important;
}
body.theme-dark .swal2-icon.swal2-warning {
    border-color: #f59e0b !important;
    color: #f59e0b !important;
}
body.theme-dark .swal2-icon.swal2-success {
    border-color: #22c55e !important;
    color: #22c55e !important;
}
body.theme-dark .swal2-icon.swal2-error {
    border-color: #ef4444 !important;
    color: #ef4444 !important;
}
body.theme-dark .swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: #22c55e !important;
}
body.theme-dark .swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(34,197,94,0.3) !important;
}
body.theme-dark .swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
    background-color: #ef4444 !important;
}

/* Custom modal inner info-card and header dark mode overrides */
body.theme-dark .swal-title-custom {
    color: #f1f5f9 !important;
    border-bottom-color: #334155 !important;
}
body.theme-dark .info-card {
    background: #151d30 !important;
    border-color: #2b364c !important;
    color: #cbd5e1 !important;
}
body.theme-dark .info-card-header {
    background: #1c263f !important;
    color: #f1f5f9 !important;
}
body.theme-dark .info-item:hover {
    background-color: rgba(255, 255, 255, 0.04) !important;
}
body.theme-dark .info-item span {
    color: #cbd5e1 !important;
}

/* Select2 Dark Mode UX Styles */
.select2-container--default .select2-selection--single {
    background-color: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px !important;
    height: 38px !important;
    color: #f1f5f9 !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #cbd5e1 !important;
    line-height: 36px !important;
    padding-left: 12px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
}

.select2-dropdown {
    background-color: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 6px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
    color: #f1f5f9 !important;
}

.select2-results__option {
    color: #cbd5e1 !important;
    background-color: transparent !important;
    padding: 8px 12px !important;
    font-size: 0.875rem !important;
}

.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: rgba(99, 102, 241, 0.2) !important;
    color: #a5b4fc !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #6366f1 !important;
    color: #ffffff !important;
}

.select2-search--dropdown {
    background-color: #1e293b !important;
    padding: 6px !important;
}

.select2-search--dropdown .select2-search__field {
    background-color: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 4px !important;
    color: #f1f5f9 !important;
    padding: 6px 10px !important;
}

.select2-container--default .select2-selection--multiple {
    background-color: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px !important;
    color: #f1f5f9 !important;
    min-height: 38px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #334155 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 4px !important;
    color: #f1f5f9 !important;
    padding: 2px 8px !important;
    margin-top: 6px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #f87171 !important;
    margin-right: 5px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    background-color: rgba(239, 68, 68, 0.1) !important;
}

/* Modal close buttons - white SVG for dark backgrounds */
body.theme-dark .modal .btn-close,
[data-bs-theme="dark"] .modal .btn-close {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") !important;
    opacity: 0.85 !important;
}
body.theme-dark .modal .btn-close:hover,
[data-bs-theme="dark"] .modal .btn-close:hover {
    opacity: 1 !important;
}
