/**
 * WooCommerce Stripe Embedded Gateway - Modal Styles
 */

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

/* Modal Container */
.stripe-embedded-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
}

.stripe-embedded-modal.active {
    display: flex;
}

/* Modal Overlay */
.stripe-embedded-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-in-out;
}

/* Modal Content */
.stripe-embedded-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-in-out;
    z-index: 1;
}

/* Modal Header */
.stripe-embedded-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px 12px 0 0;
}

.stripe-embedded-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
}

.stripe-embedded-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.stripe-embedded-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Modal Body */
.stripe-embedded-modal-body {
    padding: 0;
    overflow: hidden;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    position: relative;
}

/* Loading Spinner */
.stripe-embedded-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.stripe-embedded-loading .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f4f6;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.stripe-embedded-loading p {
    margin-top: 20px;
    color: #6b7280;
    font-size: 16px;
}

/* Iframe */
.stripe-embedded-iframe {
    width: 100%;
    height: 600px;
    border: none;
    display: block;
}

/* Message Display */
.stripe-embedded-message {
    text-align: center;
    padding: 60px 40px;
}

.stripe-embedded-message-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
}

.stripe-embedded-message-success .stripe-embedded-message-icon {
    background: #d1fae5;
    color: #059669;
}

.stripe-embedded-message-error .stripe-embedded-message-icon {
    background: #fee2e2;
    color: #dc2626;
}

.stripe-embedded-message h3 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 600;
    color: #111827;
}

.stripe-embedded-message p {
    margin: 0;
    font-size: 16px;
    color: #6b7280;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .stripe-embedded-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .stripe-embedded-modal-header {
        padding: 16px 20px;
    }

    .stripe-embedded-modal-header h3 {
        font-size: 18px;
    }

    .stripe-embedded-iframe {
        height: 500px;
    }

    .stripe-embedded-message {
        padding: 40px 24px;
    }

    .stripe-embedded-message-icon {
        width: 60px;
        height: 60px;
        font-size: 36px;
    }

    .stripe-embedded-message h3 {
        font-size: 20px;
    }

    .stripe-embedded-message p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .stripe-embedded-modal-content {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .stripe-embedded-modal-header {
        border-radius: 0;
    }

    .stripe-embedded-iframe {
        height: calc(100vh - 80px);
    }
}

/* Print Styles */
@media print {
    .stripe-embedded-modal {
        display: none !important;
    }
}

