/* MafPay - styles front */

/*
 * Le thème (checkout/_partials/steps/payment.tpl) affiche <img src="{$option.logo}">
 * sans AUCUNE contrainte de taille : chaque logo provider s'affiche à sa taille native,
 * ce qui donne un rendu incohérent d'un provider à l'autre. On force une taille uniforme,
 * scopée aux seules images du module (chemin /mafpay/) pour ne pas affecter les autres
 * moyens de paiement.
 */
.payment-options .payment-option img[src*="/mafpay/"] {
    max-height: 26px;
    max-width: 90px;
    width: auto;
    height: auto;
    object-fit: contain;
    vertical-align: middle;
    margin-left: 10px;
}

/* Bloc d'information affiché sous l'option sélectionnée (payment_option.tpl) */
.mafpay-payment-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    margin-top: 8px;
    background: #f8f9fa;
    border-left: 3px solid #ffcf00;
    border-radius: 4px;
}

.mafpay-payment-option .material-icons {
    font-size: 18px;
    line-height: 1.4;
    color: #6c757d;
}

.mafpay-payment-option p {
    margin: 0;
    line-height: 1.4;
}

.mafpay-payment-option .mafpay-option-main {
    font-size: .95rem;
    color: #222;
}

.mafpay-payment-option .mafpay-option-sub {
    font-size: .8rem;
    color: #6c757d;
    margin-top: 2px;
}

.mafpay-payment-option .mafpay-option-sub .material-icons {
    font-size: 14px;
    vertical-align: text-bottom;
}

/* Moyens proposés dans la fenêtre MafPay */
.mafpay-payment-option .mafpay-providers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
}

.mafpay-payment-option .mafpay-providers li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .85rem;
    color: #444;
}

.mafpay-payment-option .mafpay-providers img {
    max-height: 22px;
    max-width: 70px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.mafpay-checkout-form .mafpay-checkout-error {
    margin: 10px 0 0;
}

/* Pages de retour (attente / succès / échec) */
.mafpay-payment-pending,
.mafpay-payment-failed,
.mafpay-payment-return {
    max-width: 640px;
    margin: 0 auto;
    padding: 10px 0 40px;
}

.mafpay-payment-pending .alert,
.mafpay-payment-failed .alert,
.mafpay-payment-return .alert {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: none;
    border-radius: 8px;
}

.mafpay-payment-pending .alert h4,
.mafpay-payment-failed .alert h4,
.mafpay-payment-return .alert h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.mafpay-payment-pending .card,
.mafpay-payment-failed .card,
.mafpay-payment-return .card {
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    border-radius: 8px;
    margin-top: 16px;
}

.mafpay-payment-pending .mafpay-status-checker {
    text-align: center;
    padding: 24px 0;
}

.mafpay-payment-pending .spinner-border {
    width: 2rem;
    height: 2rem;
}

.mafpay-payment-failed .btn + .btn {
    margin-left: 10px;
}

@media (max-width: 575px) {
    .mafpay-payment-failed .btn {
        display: block;
        width: 100%;
        margin: 8px 0 0;
    }
}
