/* Bridge Gateway - Checkout Styles */

/* Apple Pay et Google Pay */
#bridge-digital-wallets {
    margin: 15px 0;
}

#bridge-apple-pay-button,
#bridge-google-pay-button {
    margin-bottom: 10px;
}

/* Apple Pay Button personnalisé (si Square l'utilise) */
.apple-pay-button {
    display: inline-block;
    width: 100%;
    height: 48px;
    background: #000;
    border-radius: 5px;
    cursor: pointer;
    background-image: -webkit-named-image(apple-pay-logo-white);
    background-size: 100% 60%;
    background-origin: content-box;
    background-repeat: no-repeat;
    background-position: 50% 50%;
}

/* Google Pay Button */
#bridge-google-pay-button button {
    width: 100%;
    height: 48px;
}

/* Séparateur */
#bridge-wallet-separator {
    text-align: center;
    margin: 15px 0;
    color: #666;
    font-size: 14px;
}

/* Logos des cartes - TRÈS PETITS */
.bridge-card-logos {
    display: flex;
    gap: 8px;
    margin: 10px 0;
    padding: 5px 0;
    align-items: center;
}

.bridge-card-logos img {
    height: 20px !important;
    width: auto !important;
    max-width: 35px !important;
    max-height: 20px !important;
    object-fit: contain !important;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.bridge-card-logos img:hover {
    opacity: 1;
}

/* Conteneur pour les champs de paiement */
#bridge-card-container {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff !important;
    min-height: 80px;
}

/* Forcer le fond blanc pour Stripe Elements */
#bridge-card-container iframe {
    background: #fff !important;
}

/* Message si le SDK ne charge pas */
#bridge-card-container:empty::before {
    content: "Chargement du formulaire de paiement...";
    color: #666;
    font-style: italic;
}

/* Statut du paiement */
#bridge-payment-status {
    margin: 15px 0;
    padding: 12px 15px;
    border-radius: 4px;
    display: none;
}

#bridge-payment-status p {
    margin: 0;
    font-size: 14px;
}

.bridge-status-info {
    background: #e5f5fa;
    border-left: 4px solid #0073aa;
    color: #005177;
}

.bridge-status-success {
    background: #d7f5df;
    border-left: 4px solid #00a32a;
    color: #007017;
}

.bridge-status-error {
    background: #fce4e4;
    border-left: 4px solid #d63638;
    color: #8b0000;
}

/* Style des champs Square */
#sq-card-number,
#sq-expiration-date,
#sq-cvv {
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    background: #fff;
}

#sq-card-number:focus,
#sq-expiration-date:focus,
#sq-cvv:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

/* Loading state */
.processing #bridge-card-container {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .bridge-card-logos {
        justify-content: center;
    }
    
    .bridge-card-logos img {
        height: 18px !important;
        max-width: 30px !important;
    }
    
    #bridge-card-container {
        padding: 10px;
    }
}

/* SUPPRIMÉ : Mode sombre - On force toujours le fond blanc */

/* Masquer les messages d'erreur WooCommerce pendant le traitement du paiement */
.processing .woocommerce-error,
.processing .woocommerce-message,
.processing .woocommerce-info {
    display: none !important;
}