/**
 * PayLexer Error Modal Styles
 *
 * Additional styles for the error modal component.
 * Most styles are inline for portability, but these are helpers.
 *
 * @package PayLexer
 */

/* Ensure modal is above everything */
#paylexer-error-modal-overlay {
    z-index: 999999 !important;
}

/* Prevent body scroll when modal is open */
body.paylexer-modal-open {
    overflow: hidden;
}

/* Close button styles */
#paylexer-error-modal-close {
    transition: opacity 0.2s ease, transform 0.1s ease;
}

#paylexer-error-modal-close:hover {
    opacity: 1 !important;
}

#paylexer-error-modal-close:active {
    transform: scale(0.95);
}

#paylexer-error-modal-close:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    #paylexer-error-modal {
        width: 95% !important;
        max-width: none !important;
        padding: 30px 20px !important;
    }

    #paylexer-error-modal h2 {
        font-size: 22px !important;
    }

    #paylexer-error-modal p {
        font-size: 14px !important;
    }

    #paylexer-error-modal-close {
        top: 15px !important;
        right: 15px !important;
    }
}

/* Print styles - hide modal */
@media print {
    #paylexer-error-modal-overlay {
        display: none !important;
    }
}

/* Accessibility: Focus styles */
#paylexer-error-retry:focus,
#paylexer-error-cancel:focus {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}

/* Loading state for retry button */
#paylexer-error-retry.loading {
    position: relative;
    color: transparent !important;
}

#paylexer-error-retry.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: paylexer-spinner 0.8s linear infinite;
}

@keyframes paylexer-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Payment icons CSS loads in the checkout page. */
.paylexer-payment-icon {
    /* TODO: Remove this when we have a better way to handle icon sizing. */
    font-size: 50px;
    margin-right: 5px;
}
