/* ---- Champ de paiement PayDunya (inline) ---- */
.jonpci-pd-box {
    border: 1px solid #ffd2ad;
    border-radius: 10px;
    padding: 16px;
    background: #fff8f2;
}

.jonpci-pd-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.jonpci-pd-logo {
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #ff6b00;
    color: #fff;
    text-align: center;
    line-height: 28px;
    font-weight: 700;
    flex: 0 0 auto;
}

.jonpci-pd-title {
    font-weight: 600;
    color: #333;
}

.jonpci-pd-operators {
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
    justify-content: flex-start;
}

/* Chaque opérateur = petit cadre carré. */
.jonpci-pd-operator {
    position: relative;
    width: 72px !important;
    height: 72px !important;
    box-sizing: border-box;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border: 2px solid #eadfd5;
    border-radius: 10px;
    padding: 6px !important;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, transform .1s;
    margin: 0 !important;
}

.jonpci-pd-operator:hover {
    border-color: #ffb27a;
    transform: translateY(-1px);
}

/* Radio natif masqué : c'est le cadre qui sert de sélecteur. */
.jonpci-pd-operator-input {
    position: absolute !important;
    opacity: 0 !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}

/* Logo dans le cadre : contain, taille max = cadre. */
.jonpci-pd-operator-logo {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
}

.jonpci-pd-operator-input:checked ~ .jonpci-pd-operator-label {
    font-weight: 600;
}

/* Pastille de sélection (coche) en haut à droite. */
.jonpci-pd-operator-check {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #d9c9bb;
    background: #fff;
    transition: background .15s, border-color .15s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}

.jonpci-pd-operator:has(.jonpci-pd-operator-input:checked) {
    border-color: #ff6b00;
    box-shadow: 0 0 0 1px #ff6b00 inset;
}

.jonpci-pd-operator:has(.jonpci-pd-operator-input:checked) .jonpci-pd-operator-check {
    border-color: #ff6b00;
    background: #ff6b00 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2.5 6.5l2.5 2.5 4.5-5'/%3E%3C/svg%3E") center/10px no-repeat;
}

.jonpci-pd-operator-badge {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 5px;
    color: #fff;
    text-align: center;
    line-height: 24px;
    font-weight: 700;
    font-size: 13px;
    flex: 0 0 auto;
}

.jonpci-pd-operator-label {
    color: #333;
    font-size: 14px;
}

.jonpci-pd-row {
    margin-bottom: 12px;
}

.jonpci-pd-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 5px;
}

.jonpci-pd-phone-input,
.jonpci-pd-otp-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d9c9bb;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
    background: #fff;
}

.jonpci-pd-phone-input:focus,
.jonpci-pd-otp-input:focus {
    outline: none;
    border-color: #ff6b00;
    box-shadow: 0 0 0 2px rgba(255, 107, 0, .15);
}

.jonpci-pd-otp-hint {
    margin: 6px 0 0;
    font-size: 12.5px;
    color: #8a5a2b;
}

.jonpci-pd-note {
    margin: 4px 0 0;
    color: #666;
    font-size: 12.5px;
    line-height: 1.4;
}

.jonpci-pd-status {
    margin: 10px 0;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    line-height: 1.4;
}

.jonpci-pd-status-error {
    background: #fdecea;
    color: #c0392b;
    border: 1px solid #f5c6c2;
}

.jonpci-pd-status-pending {
    background: #fff3e6;
    color: #8a5a2b;
    border: 1px solid #ffd9b3;
}

.jonpci-pd-status-success {
    background: #eaf7ee;
    color: #1e7e34;
    border: 1px solid #bfe6ca;
}

.jonpci-pd-status .jonpci-pd-ok {
    font-weight: 700;
}

.jonpci-pd-status .jonpci-pd-spinner {
    width: 15px;
    height: 15px;
    border-width: 2px;
    vertical-align: middle;
    margin-right: 4px;
}

/* ---- Bouton de soumission du thème pendant le paiement ---- */
.wpforms-submit.jonpci-pd-processing {
    opacity: .8;
    cursor: default;
}

/* ---- Note discrète : frais de transaction Mobile Money ---- */
.jonpci-pd-fee-recap {
    margin: 10px 0 12px;
    font-size: 13px;
    color: #8a5a2b;
    font-style: italic;
}

/* ---- Bloc « un participant par badge » (achat multi-quantité) ---- */
.jonpci-pd-participants {
    margin-top: 14px;
    padding: 12px;
    border: 1px dashed #d9c9bb;
    border-radius: 8px;
    background: #fffaf3;
}

.jonpci-pd-participants-head {
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
}

.jonpci-pd-participants-note {
    margin-bottom: 10px;
    font-size: 12.5px;
    color: #666;
    line-height: 1.4;
}

.jonpci-pd-participant-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.jonpci-pd-participant-num {
    display: inline-block;
    min-width: 22px;
    font-weight: 600;
    color: #666;
}

.jonpci-pd-participant-buyer {
    color: #333;
}

.jonpci-pd-participant-buyer em {
    color: #888;
    font-style: normal;
    font-size: 12px;
}

.jonpci-pd-participant-name {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #d9c9bb;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.jonpci-pd-participant-name:focus {
    outline: none;
    border-color: #ff6b00;
    box-shadow: 0 0 0 2px rgba(255, 107, 0, .12);
}

/* ---- Modale Wave (iframe flottante centrée, s'affiche au-dessus du bouton Payer) ---- */
body.jonpci-pd-wave-open {
    overflow: hidden; /* empêche le défilement de la page sous la modale */
}

.jonpci-pd-wave-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 30, 45, .75);
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    animation: jonpci-pd-fade .18s ease-out;
}

@keyframes jonpci-pd-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.jonpci-pd-wave-modal {
    width: 100%;
    max-width: 720px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}

.jonpci-pd-wave-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #1dc6f6;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    flex: 0 0 auto;
}

.jonpci-pd-wave-close {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0 6px;
    opacity: .95;
}

.jonpci-pd-wave-close:hover,
.jonpci-pd-wave-close:focus {
    opacity: 1;
    outline: none;
}

.jonpci-pd-wave-body {
    flex: 1 1 auto;
    background: #fff;
    overflow: hidden;
    min-height: 480px;
}

.jonpci-pd-wave-iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 480px;
    border: 0;
    background: #fff;
}

.jonpci-pd-wave-fallback {
    padding: 10px 14px;
    text-align: center;
    background: #eef8fc;
    border-top: 1px solid #d0e8ee;
    font-size: 13px;
    color: #33586a;
    flex: 0 0 auto;
}

.jonpci-pd-wave-fallback a {
    color: #0aa9e0;
    font-weight: 600;
    text-decoration: underline;
}

@media (max-height: 640px) {
    .jonpci-pd-wave-modal { max-height: 96vh; }
    .jonpci-pd-wave-body,
    .jonpci-pd-wave-iframe { min-height: 380px; }
}

@media (max-width: 480px) {
    .jonpci-pd-wave-overlay { padding: 0; }
    .jonpci-pd-wave-modal { max-width: 100%; max-height: 100vh; border-radius: 0; }
}

/* ---- Fenêtre de statut du paiement ---- */
.jonpci-paydunya-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.jonpci-paydunya-modal {
    background: #fff;
    border-radius: 14px;
    padding: 30px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
}

.jonpci-paydunya-modal-content .jonpci-pd-msg {
    font-size: 16px;
    margin: 14px 0 0;
    color: #333;
}

.jonpci-pd-icon {
    font-size: 46px;
    line-height: 1;
    display: block;
}

.jonpci-pd-success .jonpci-pd-icon {
    color: #28a745;
}

.jonpci-pd-error .jonpci-pd-icon {
    color: #dc3545;
}

.jonpci-pd-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #ffd2ad;
    border-top-color: #ff6b00;
    border-radius: 50%;
    animation: jonpci-pd-spin .8s linear infinite;
}

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

.jonpci-pd-btn {
    display: inline-block;
    margin-top: 18px;
    padding: 11px 22px;
    border: none;
    border-radius: 8px;
    background: #ff6b00;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
}

.jonpci-pd-btn-wave {
    background: #1dc8ff;
}

.jonpci-pd-close {
    background: #666;
}
