/**
 * WPFOK Block Order Pop-up Modal Styles
 * Premium pop-up shown when order is blocked (Fraud/VPN/No History).
 * Brand colors: #8f00ff (violet), #0b0412 (black)
 *
 * @package WPFOK
 */

/* ═══════════════════════════════════════════════════════════════════════
   OVERLAY
   ═══════════════════════════════════════════════════════════════════════ */
.wpfok-block-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 4, 18, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 16px;
    box-sizing: border-box;
}

.wpfok-block-overlay.wpfok-block-active {
    opacity: 1;
    visibility: visible;
}

/* ═══════════════════════════════════════════════════════════════════════
   MODAL BOX
   ═══════════════════════════════════════════════════════════════════════ */
.wpfok-block-modal {
    background: #ffffff;
    border-radius: 20px;
    padding: 0;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 24px 80px rgba(11, 4, 18, 0.25), 0 0 0 1px rgba(143, 0, 255, 0.08);
    transform: scale(0.88) translateY(24px);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    position: relative;
}

.wpfok-block-active .wpfok-block-modal {
    transform: scale(1) translateY(0);
}

/* ── Close Button (high specificity to override themes) ── */
.wpfok-block-overlay .wpfok-block-modal .wpfok-block-close,
.wpfok-block-overlay .wpfok-block-modal button.wpfok-block-close,
button#wpfok-block-close.wpfok-block-close {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    left: auto !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.18) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 50% !important;
    color: #ffffff !important;
    font-size: 20px !important;
    font-weight: 300 !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    line-height: 1 !important;
    z-index: 10 !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    text-decoration: none !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15) !important;
    outline: none !important;
    text-align: center !important;
    text-indent: 0 !important;
    letter-spacing: 0 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.wpfok-block-overlay .wpfok-block-modal .wpfok-block-close:hover,
button#wpfok-block-close.wpfok-block-close:hover {
    background: rgba(255, 255, 255, 0.35) !important;
    color: #ffffff !important;
    transform: scale(1.12) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.wpfok-block-overlay .wpfok-block-modal .wpfok-block-close:focus,
button#wpfok-block-close.wpfok-block-close:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5) !important;
    outline-offset: 2px !important;
}

.wpfok-block-overlay .wpfok-block-modal .wpfok-block-close:active,
button#wpfok-block-close.wpfok-block-close:active {
    transform: scale(0.95) !important;
}

/* ═══════════════════════════════════════════════════════════════════════
   MODAL HEADER
   ═══════════════════════════════════════════════════════════════════════ */
.wpfok-block-header {
    background: linear-gradient(135deg, #0b0412 0%, #1a0d2e 50%, #7200cc 100%);
    padding: 32px 28px 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.wpfok-block-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -25%;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(143, 0, 255, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.wpfok-block-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -15%;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(167, 51, 255, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

/* ── Icon ── */
.wpfok-block-header-icon {
    width: 64px;
    height: 64px;
    background: rgba(143, 0, 255, 0.25);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.wpfok-block-header-icon svg {
    width: 32px;
    height: 32px;
    fill: #ffffff;
}

/* ── Title ── */
.wpfok-block-header h3 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    position: relative;
    z-index: 2;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.wpfok-block-header p {
    margin: 0;
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
    line-height: 1.5;
    position: relative;
    z-index: 2;
}

/* ═══════════════════════════════════════════════════════════════════════
   MODAL BODY — CONTACT BUTTONS
   ═══════════════════════════════════════════════════════════════════════ */
.wpfok-block-body {
    padding: 24px 20px 28px;
}

.wpfok-block-contacts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── Contact Button Card ── */
.wpfok-block-contact-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #eee8f5;
    background: #faf8ff;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.wpfok-block-contact-btn:hover {
    border-color: rgba(143, 0, 255, 0.2);
    background: rgba(143, 0, 255, 0.04);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(143, 0, 255, 0.08);
}

.wpfok-block-contact-btn:active {
    transform: translateY(0);
}

/* ── Contact Icon Circle ── */
.wpfok-block-contact-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
}

.wpfok-block-contact-icon.wpfok-block-icon-call {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.wpfok-block-contact-icon.wpfok-block-icon-wa {
    background: rgba(37, 211, 102, 0.1);
    color: #25d366;
}

.wpfok-block-contact-icon.wpfok-block-icon-email {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

/* ── Contact Text ── */
.wpfok-block-contact-info {
    flex: 1;
    min-width: 0;
}

.wpfok-block-contact-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1225;
    line-height: 1.3;
    margin-bottom: 2px;
}

.wpfok-block-contact-value {
    display: block;
    font-size: 12px;
    color: #7c6f8a;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Arrow Icon ── */
.wpfok-block-contact-arrow {
    color: #c4bcd0;
    font-size: 18px;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.wpfok-block-contact-btn:hover .wpfok-block-contact-arrow {
    color: #8f00ff;
    transform: translateX(3px);
}

/* ═══════════════════════════════════════════════════════════════════════
   REASON BADGE (shown in body when specific reason exists)
   ═══════════════════════════════════════════════════════════════════════ */
.wpfok-block-reason {
    text-align: center;
    padding: 10px 14px;
    margin-bottom: 16px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    color: #dc2626;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.12);
    line-height: 1.5;
}

.wpfok-block-reason-phone {
    color: #b45309;
    background: rgba(245, 158, 11, 0.06);
    border-color: rgba(245, 158, 11, 0.12);
}

/* ═══════════════════════════════════════════════════════════════════════
   NO CONTACTS FALLBACK
   ═══════════════════════════════════════════════════════════════════════ */
.wpfok-block-no-contacts {
    text-align: center;
    padding: 16px;
    color: #9b92a8;
    font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════════════════
   ANIMATION
   ═══════════════════════════════════════════════════════════════════════ */
@keyframes wpfok-block-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.wpfok-block-body .wpfok-block-contact-btn {
    animation: wpfok-block-fade-in 0.3s ease both;
}

.wpfok-block-body .wpfok-block-contact-btn:nth-child(1) { animation-delay: 0.1s; }
.wpfok-block-body .wpfok-block-contact-btn:nth-child(2) { animation-delay: 0.18s; }
.wpfok-block-body .wpfok-block-contact-btn:nth-child(3) { animation-delay: 0.26s; }

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE FIRST (Centered card like OTP modal)
   ═══════════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 480px) {
    .wpfok-block-overlay {
        padding: 16px;
        align-items: center;
        justify-content: center;
    }

    .wpfok-block-modal {
        width: 95%;
        max-width: 380px;
        margin: 10px auto;
        border-radius: 20px;
        box-sizing: border-box;
    }

    .wpfok-block-header {
        padding: 28px 20px 24px;
    }

    .wpfok-block-header h3 {
        font-size: 18px;
    }

    .wpfok-block-header-icon {
        width: 56px;
        height: 56px;
        border-radius: 14px;
    }

    .wpfok-block-header-icon svg {
        width: 28px;
        height: 28px;
    }

    .wpfok-block-body {
        padding: 20px 16px 24px;
    }

    .wpfok-block-contact-btn {
        padding: 12px 14px;
        gap: 12px;
    }

    .wpfok-block-contact-icon {
        width: 38px;
        height: 38px;
    }

    .wpfok-block-close {
        top: 12px !important;
        right: 12px !important;
        left: auto !important;
        width: 36px !important;
        height: 36px !important;
        font-size: 22px !important;
    }
}

@media screen and (max-width: 360px) {
    .wpfok-block-overlay {
        padding: 10px;
    }

    .wpfok-block-modal {
        width: 96%;
    }

    .wpfok-block-header {
        padding: 24px 16px 20px;
    }

    .wpfok-block-header h3 {
        font-size: 16px;
    }

    .wpfok-block-header p {
        font-size: 12px;
    }

    .wpfok-block-contact-label {
        font-size: 13px;
    }

    .wpfok-block-close {
        top: 10px !important;
        right: 10px !important;
        left: auto !important;
        width: 34px !important;
        height: 34px !important;
    }
}

/* Safe area for notched phones (iPhone X+) */
@supports (padding: env(safe-area-inset-bottom)) {
    .wpfok-block-overlay {
        padding-bottom: max(16px, env(safe-area-inset-bottom));
        padding-top: max(16px, env(safe-area-inset-top));
    }
}
