@keyframes oqp-backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes oqp-modal-in {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.975);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes oqp-step-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes oqp-option-in {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes oqp-row-in {
    from {
        opacity: 0;
        transform: translateY(7px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes oqp-success-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.015); }
}

.oqp-modal:not([hidden]) .oqp-modal__backdrop {
    animation: oqp-backdrop-in 240ms ease-out both;
}

.oqp-modal:not([hidden]) .oqp-modal__panel {
    transform-origin: center center;
    animation: oqp-modal-in 340ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.oqp-modal:not([hidden]) .oqp-brand,
.oqp-modal:not([hidden]) .oqp-secure-badge,
.oqp-modal:not([hidden]) #oqp-title,
.oqp-modal:not([hidden]) .oqp-intro {
    animation: oqp-step-in 360ms ease-out both;
}

.oqp-modal:not([hidden]) .oqp-secure-badge { animation-delay: 50ms; }
.oqp-modal:not([hidden]) #oqp-title { animation-delay: 90ms; }
.oqp-modal:not([hidden]) .oqp-intro { animation-delay: 120ms; }

.oqp-options:not([hidden]) .oqp-option {
    animation: oqp-option-in 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.oqp-options:not([hidden]) .oqp-option:nth-child(1) { animation-delay: 90ms; }
.oqp-options:not([hidden]) .oqp-option:nth-child(2) { animation-delay: 150ms; }
.oqp-options:not([hidden]) .oqp-option:nth-child(3) { animation-delay: 210ms; }

.oqp-panel:not([hidden]) {
    animation: oqp-step-in 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.oqp-invoice-table tbody tr {
    animation: oqp-row-in 280ms ease-out both;
}

.oqp-invoice-table tbody tr:nth-child(2) { animation-delay: 45ms; }
.oqp-invoice-table tbody tr:nth-child(3) { animation-delay: 90ms; }
.oqp-invoice-table tbody tr:nth-child(4) { animation-delay: 135ms; }
.oqp-invoice-table tbody tr:nth-child(5) { animation-delay: 180ms; }
.oqp-invoice-table tbody tr:nth-child(n+6) { animation-delay: 210ms; }

.oqp-message.is-success:not(:empty) {
    animation: oqp-success-pulse 500ms ease-out 1;
}

.oqp-modal__close:active,
.oqp-option:active,
.oqp-primary:active,
.oqp-pay-invoice:active {
    transform: translateY(1px) scale(0.99);
}

@media (max-width: 600px) {
    .oqp-modal:not([hidden]) .oqp-modal__panel {
        transform-origin: center bottom;
    }
}

@media (prefers-reduced-motion: reduce) {
    .oqp-modal *,
    .oqp-modal *::before,
    .oqp-modal *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-delay: 0ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
