/**
 * Styles pour la modal et l'iframe SumUp
 */

/* Loader */
.sumup-loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal */
.sumup-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s;
}

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

.sumup-modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.sumup-modal-close {
    color: #aaa;
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000000;
    background: white;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.sumup-modal-close:hover,
.sumup-modal-close:focus {
    color: #000;
    background: #f0f0f0;
}

#sumup-iframe-container {
    position: relative;
    width: 100%;
    min-height: 500px;
    border-radius: 8px;
    overflow: hidden;
}

#sumup-payment-iframe {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 8px;
}

/* Container de paiement */
#sumup-payment-container {
    text-align: center;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
    margin: 20px 0;
}

#sumup-payment-container .woocommerce-error,
#sumup-payment-container .woocommerce-message {
    margin-bottom: 15px;
}

#sumup-payment-container .button {
    margin-top: 10px;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .sumup-modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    #sumup-payment-iframe {
        height: 500px;
    }
    
    #sumup-iframe-container {
        min-height: 400px;
    }
}

@media screen and (max-width: 480px) {
    .sumup-modal-content {
        width: 100%;
        margin: 0;
        border-radius: 0;
        height: 100vh;
    }
    
    #sumup-payment-iframe {
        height: calc(100vh - 50px);
    }
    
    .sumup-modal-close {
        top: 5px;
        right: 5px;
    }
}
