/* ===== Payment popup (includes/payment-modal.php) ===== */
.pm-overlay {
    position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center;
    padding: 16px; background: rgba(5, 6, 8, .78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
.pm-overlay.open { opacity: 1; visibility: visible; }
body.pm-lock { overflow: hidden; }

.pm-dialog {
    position: relative; width: 100%; max-width: 420px; max-height: calc(100vh - 32px); overflow-y: auto;
    background: #ffffff; color: #1b1f24; border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
    font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
    transform: translateY(20px) scale(.97); transition: transform .25s cubic-bezier(.2, .9, .3, 1.2);
}
.pm-overlay.open .pm-dialog { transform: none; }

.pm-close {
    position: absolute; top: 12px; right: 12px; z-index: 2; width: 34px; height: 34px; border-radius: 50%;
    border: 0; background: rgba(255, 255, 255, .15); color: #fff; font-size: 22px; line-height: 1; cursor: pointer;
}
.pm-close:hover { background: rgba(255, 255, 255, .28); }

.pm-hero {
    background: radial-gradient(120% 120% at 0% 0%, #2b2410 0%, #111 55%), #111;
    color: #fff; padding: 28px 24px 22px; text-align: center; border-radius: 22px 22px 0 0;
}
.pm-badge {
    display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .12em;
    color: #111; background: linear-gradient(135deg, #ffcc00, #ffe066); padding: 5px 12px; border-radius: 999px;
}
.pm-hero h2 { font-size: 24px; font-weight: 800; line-height: 1.25; margin: 14px 0 8px; color: #fff; }
.pm-hero h2 span { color: #ffcc00; white-space: nowrap; }
.pm-hero p { color: #b9bec7; font-size: 14px; line-height: 1.5; margin: 0; }
.pm-perks { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; }
.pm-perks li {
    font-size: 12px; font-weight: 600; color: #e9ecef; background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12); padding: 6px 10px; border-radius: 999px;
}
.pm-perks i { color: #20c997; margin-right: 4px; }

.pm-step { padding: 22px 24px 24px; }
.pm-step[hidden] { display: none; }

.pm-alert {
    display: none; background: #fff1f1; color: #c92a2a; border: 1px solid #ffc9c9;
    padding: 11px 13px; border-radius: 12px; font-size: 13.5px; line-height: 1.4; margin-bottom: 14px;
}
.pm-alert.show { display: block; animation: pm-shake .35s; }

.pm-label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 8px; color: #1b1f24; }
.pm-input {
    display: flex; align-items: center; gap: 10px; border: 2px solid #dfe3e8; border-radius: 14px;
    padding: 0 14px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.pm-input:focus-within { border-color: #20c997; box-shadow: 0 0 0 4px rgba(32, 201, 151, .15); }
.pm-input i { color: #8a929c; font-size: 18px; }
.pm-input input {
    flex: 1; border: 0; outline: 0; background: transparent; padding: 15px 0; font-size: 18px; font-weight: 600;
    letter-spacing: .04em; color: #1b1f24; min-width: 0;
}
.pm-input input::placeholder { color: #b3b9c1; font-weight: 500; }

.pm-networks {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 18px;
}
.pm-networks img {
    width: 100%; height: 38px; object-fit: contain; background: #f6f7f9; border: 1px solid #eceef1;
    border-radius: 10px; padding: 6px;
}

.pm-pay {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
    background: linear-gradient(135deg, #20c997, #0ca678); color: #fff; border: 0; border-radius: 14px;
    padding: 16px; font-size: 17px; font-weight: 800; cursor: pointer; letter-spacing: .02em;
    box-shadow: 0 10px 24px rgba(12, 166, 120, .35); transition: transform .15s, box-shadow .15s, opacity .15s;
}
.pm-pay:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(12, 166, 120, .45); }
.pm-pay:disabled { opacity: .75; cursor: wait; }
.pm-secure { text-align: center; color: #6c757d; font-size: 12.5px; margin: 12px 0 0; }
.pm-secure i { color: #20c997; }

.pm-spinner {
    width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff;
    border-radius: 50%; display: inline-block; animation: pm-spin .8s linear infinite;
}

.pm-unavailable { text-align: center; padding: 10px 0; color: #495057; }
.pm-unavailable i { font-size: 34px; color: #ffb020; margin-bottom: 10px; }

/* Waiting + success */
#pmStepWait, #pmStepDone { text-align: center; }
#pmStepWait h3, #pmStepDone h3 { font-size: 20px; font-weight: 800; margin: 16px 0 6px; }
#pmStepWait p, #pmStepDone p { color: #555c66; font-size: 14px; line-height: 1.5; margin: 0; }
.pm-ring {
    width: 78px; height: 78px; margin: 4px auto 0; border-radius: 50%; display: grid; place-items: center;
    background: #e6fcf5; color: #0ca678; font-size: 32px; position: relative;
}
.pm-ring::after {
    content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid #20c997;
    border-right-color: transparent; border-bottom-color: transparent; animation: pm-spin 1.1s linear infinite;
}
.pm-progress { height: 6px; background: #eef0f3; border-radius: 99px; overflow: hidden; margin: 20px 0 8px; }
.pm-progress div { height: 100%; width: 0; background: linear-gradient(90deg, #20c997, #ffcc00); transition: width .6s; }
.pm-wait-text { color: #8a929c; font-size: 12.5px; display: block; }
.pm-link { background: none; border: 0; color: #0b7285; font-weight: 600; font-size: 13.5px; margin-top: 16px; cursor: pointer; text-decoration: underline; }
.pm-check {
    width: 78px; height: 78px; margin: 4px auto 0; border-radius: 50%; display: grid; place-items: center;
    background: #20c997; color: #fff; font-size: 34px; animation: pm-pop .4s cubic-bezier(.2, .9, .3, 1.4);
    box-shadow: 0 0 0 10px rgba(32, 201, 151, .15);
}

@keyframes pm-spin { to { transform: rotate(360deg); } }
@keyframes pm-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes pm-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

@media (max-width: 480px) {
    .pm-overlay { align-items: flex-end; padding: 0; }
    .pm-dialog { max-width: none; border-radius: 22px 22px 0 0; max-height: 94vh; transform: translateY(40px); }
    .pm-hero { padding: 26px 18px 18px; }
    .pm-hero h2 { font-size: 21px; }
    .pm-step { padding: 18px 18px 22px; }
}

/* Floating pay button: full-width bar on phones */
@media (max-width: 600px) {
    .floating-lipia-btn { left: 16px; right: 16px; bottom: 14px; justify-content: center; font-size: 16px; padding: 14px 20px; }
}
