/**
 * Hyva Theme Styles for TBI FusionPay
 * Uses Tailwind CSS utility classes and custom styles
 */

/* Alpine.js x-cloak to prevent flash of unstyled content */
[x-cloak] {
    display: none !important;
}

/* TBI Button Animations */
.tbi-button {
    transition: all 0.2s ease-in-out;
}

.tbi-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.tbi-button:active {
    transform: translateY(0);
}

/* Modal Backdrop Animation */
.modal-backdrop {
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Iframe Loading State */
#tbi_loading {
    animation: fadeIn 0.3s ease-in-out;
}

#tbi_loading img {
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Success Message Styling */
.fusion-pay-custom-message {
    animation: slideInDown 0.4s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Modal Sizing */
@media (max-width: 640px) {
    #tbi_popup_iframe {
        height: 500px;
    }
}

@media (min-width: 768px) {
    #tbi_popup_iframe {
        height: 600px;
    }
}

/* Focus States for Accessibility */
.tbi-button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Orange Text Color (matching brand) */
.text-orange-600 {
    color: #ea580c;
}

.text-orange {
    color: #ea580c;
}

/* Additional Button Variants */
.tbi-button-primary {
    background-color: #2563eb;
    color: #ffffff;
    transition-property: color, background-color, border-color;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
.tbi-button-primary:hover {
    background-color: #1d4ed8;
}

.tbi-button-secondary {
    background-color: #e5e7eb;
    color: #1f2937;
    transition-property: color, background-color, border-color;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
.tbi-button-secondary:hover {
    background-color: #d1d5db;
}

.fusionpay-hyva-product-button #tbi_button_container {
    display: block;
    min-width: 0;
    width: 100%;
}

.fusionpay-hyva-product-button .tbi_button1 {
    display: block;
    min-width: 0;
    max-width: 100%;
}

.fusionpay-hyva-product-button #tbi_button_body1 {
    width: 100%;
}
