/* ============================================================
   WF WAF — Ultimate Multisite Integration — Frontend CSS
   ============================================================ */

/* ── Overlay ─────────────────────────────────────────────── */
#wf-wu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 1000000;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    align-items: center;
    justify-content: center;
    animation: wfWuFadeIn .2s ease;
}

#wf-wu-overlay.wf-wu-active {
    display: flex;
}

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

/* ── Modal ───────────────────────────────────────────────── */
#wf-wu-modal {
    position: relative;
    width: 94%;
    max-width: 860px;
    max-height: 92vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0,0,0,.32);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: wfWuSlideUp .24s cubic-bezier(.22,.61,.36,1);
}

@keyframes wfWuSlideUp {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ── Modal header ────────────────────────────────────────── */
#wf-wu-modal-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
    background: #fff;
}

#wf-wu-modal-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

.wf-wu-lock {
    font-size: 16px;
}

#wf-wu-modal-acts {
    display: flex;
    gap: 6px;
}

#wf-wu-back,
#wf-wu-close {
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    border-radius: 5px;
    padding: 5px 11px;
    transition: background .14s;
}

#wf-wu-back {
    background: #f3f4f6;
    color: #374151;
}

#wf-wu-back:hover { background: #e5e7eb; }

#wf-wu-close {
    background: #fee2e2;
    color: #dc2626;
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    border-radius: 50%;
}

#wf-wu-close:hover { background: #fca5a5; }

/* ── Progress breadcrumb ─────────────────────────────────── */
#wf-wu-progress {
    display: flex;
    align-items: center;
    padding: 9px 18px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
    gap: 0;
}

.wf-wu-step {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
    color: #9ca3af;
}

.wf-wu-step--done  { color: #6b7280; }
.wf-wu-step--active { color: #1d4ed8; font-weight: 700; }

.wf-wu-dot {
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #9ca3af;
    flex-shrink: 0;
}

.wf-wu-step--done  .wf-wu-dot { background: #dcfce7; color: #16a34a; }
.wf-wu-step--active .wf-wu-dot { background: #2563eb; color: #fff; }

.wf-wu-sep {
    flex: 1;
    height: 2px;
    background: #e5e7eb;
    margin: 0 6px;
}

.wf-wu-sep--done { background: #86efac; }

/* ── Iframe wrap ─────────────────────────────────────────── */
#wf-wu-iframe-wrap {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

#wf-wu-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ── Loader ──────────────────────────────────────────────── */
#wf-wu-loader {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #fff;
    z-index: 5;
}

.wf-wu-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: wfWuSpin .7s linear infinite;
}

@keyframes wfWuSpin { to { transform: rotate(360deg); } }

#wf-wu-loader p {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

/* ── Pay button ──────────────────────────────────────────── */
.wf-wu-pay-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    padding: 12px 20px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: filter .14s, transform .1s;
    letter-spacing: .01em;
    margin-top: 4px;
}

.wf-wu-pay-btn:hover {
    filter: brightness(1.07);
    transform: translateY(-1px);
}

.wf-wu-pay-btn:active {
    transform: translateY(0);
}

.wf-wu-pay-btn svg {
    flex-shrink: 0;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
    #wf-wu-modal {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        height: 100vh;
    }
    #wf-wu-overlay.wf-wu-active { align-items: flex-end; }
    #wf-wu-progress { display: none; }
    #wf-wu-modal-hdr { padding: 10px 14px; }
}
