/* Custom CSS */

/* Global: No rounded buttons — all .btn variants must have square corners */
.btn,
.btn-sm,
.btn-lg,
[class*="btn-"] {
    border-radius: 0 !important;
}


/* Fix alert warning text visibility */
[data-bs-theme="light"] .alert-warning,
[data-bs-theme="light"] .alert-warning p,
[data-bs-theme="light"] .alert-warning span,
[data-bs-theme="light"] .alert-warning strong,
[data-bs-theme="light"] .alert-warning .form-text,
[data-bs-theme="light"] .alert-warning h1,
[data-bs-theme="light"] .alert-warning h2,
[data-bs-theme="light"] .alert-warning h3,
[data-bs-theme="light"] .alert-warning h4,
[data-bs-theme="light"] .alert-warning h5,
[data-bs-theme="light"] .alert-warning h6 {
    color: #000 !important;
}

[data-bs-theme="dark"] .alert-warning,
[data-bs-theme="dark"] .alert-warning p,
[data-bs-theme="dark"] .alert-warning span,
[data-bs-theme="dark"] .alert-warning strong,
[data-bs-theme="dark"] .alert-warning .form-text,
[data-bs-theme="dark"] .alert-warning h1,
[data-bs-theme="dark"] .alert-warning h2,
[data-bs-theme="dark"] .alert-warning h3,
[data-bs-theme="dark"] .alert-warning h4,
[data-bs-theme="dark"] .alert-warning h5,
[data-bs-theme="dark"] .alert-warning h6 {
    color: #ffda6a !important;
}

/* Fix badge bg-secondary contrast - Make it look like bg-dark as requested */
.badge.bg-secondary {
    color: #fff !important;
    background-color: #212529 !important;
    /* Bootstrap dark color */
}

/* Tabs Standardization: Inactive Black, Active Blue */
.nav-tabs .nav-link {
    color: #000000;
    /* Black for inactive tabs */
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
    color: var(--bs-primary, #0d6efd) !important;
    /* Blue for active tab */
    font-weight: bold;
}

.nav-tabs .nav-link:hover {
    color: var(--bs-primary, #0d6efd);
    border-color: #e9ecef #e9ecef #dee2e6;
}

/* Fix Select2 text overlapping with the clear button 'x' */
.select2-selection__rendered {
    padding-right: 25px !important; 
}

/* Animation for blinking elements */
@keyframes blinker {
    50% { opacity: 0; }
}
.blink {
    animation: blinker 1s linear infinite;
}

/* Estandarización visual de desplegables en todo el ERP: flecha siempre visible y eliminación de checks de validación */
.form-select.is-valid,
.was-validated .form-select:valid,
.form-select.is-valid:not([multiple]):not([size]),
.form-select.is-valid:not([multiple])[size="1"],
.was-validated .form-select:valid:not([multiple]):not([size]),
.was-validated .form-select:valid:not([multiple])[size="1"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    padding-right: 2.25rem !important;
    border-color: #ced4da !important;
}

.form-select-sm.is-valid,
.was-validated .form-select-sm:valid,
.form-select-sm.is-valid:not([multiple]):not([size]),
.form-select-sm.is-valid:not([multiple])[size="1"],
.was-validated .form-select-sm:valid:not([multiple]):not([size]),
.was-validated .form-select-sm:valid:not([multiple])[size="1"] {
    padding-right: 1.75rem !important;
}

/* Evitar borde verde invasivo en Select2 validado */
.is-valid + .select2-container--bootstrap-5 .select2-selection,
.was-validated select:valid + .select2-container--bootstrap-5 .select2-selection {
    border-color: #ced4da !important;
}

/* Garantizar siempre la flecha estándar en todos los desplegables Select2 individuales (Bootstrap 5) */
.select2-container--bootstrap-5 .select2-selection--single {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 16px 12px !important;
    padding-right: 2.25rem !important;
}

/* Adaptación para selects compactos o dentro de tablas */
.form-select-sm ~ .select2-container--bootstrap-5 .select2-selection--single,
select.select2-sm + .select2-container--bootstrap-5 .select2-selection--single,
.select2-container--bootstrap-5 .select2--small.select2-selection--single,
table .select2-container--bootstrap-5 .select2-selection--single {
    background-position: right 0.5rem center !important;
    padding-right: 1.75rem !important;
}

