/* ============================================================================
   PACIOLI ERP — Third-party Overrides
   Select2, dropdown animations, and plugin customizations.
   Depends on: pacioli.tokens.css
   ============================================================================ */

/* ── Select2 ── */
.select2-container--bootstrap-5 .select2-selection {
    border-radius: var(--pacioli-radius-sm);
    min-height: 38px;
    border: 1px solid var(--pacioli-border-input);
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
    padding-left: 12px;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    height: 36px;
}

/* ── Dropdown animation ── */
@keyframes animdropdown {
    from {
        transform: translate3d(0, 6px, 0);
        opacity: 0;
    }
    to {
        transform: translate3d(0, 0, 0);
        opacity: 1;
    }
}

.dropdown-menu {
    border-radius: 1rem;
    border: 0;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    animation: 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) 0s normal forwards 1 animdropdown;
}

/* ── Validation states (is-invalid) ── */
.is-invalid {
    border-color: #dc3545 !important;
}

.is-invalid:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15) !important;
}

.invalid-feedback.pl-msg {
    display: block;
    color: #dc3545;
    font-weight: 600;
    margin-top: 0.35rem;
}

/* Select2 in error */
.select2-container .select2-selection.is-invalid,
.select2-container--bootstrap-5 .select2-selection.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15) !important;
}
