/* ── PIX Waiting Page ── Professional UX Design ─────────────────────────── */

.cp-pix-page {
    background: #f4f6f9;
    min-height: 100vh;
}

/* ── Page body ────────────────────────────────────────────────────────────── */
.cp-pix-page-body {
    max-width: 480px;
    margin: 0 auto;
    padding: 24px 16px 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* ── Logo ─────────────────────────────────────────────────────────────────── */
.cp-pix-logo {
    text-align: center;
    margin-bottom: 4px;
}
.cp-pix-logo img {
    max-height: 48px;
    width: auto;
}

/* ── Main card ─────────────────────────────────────────────────────────────── */
.cp-pix-main-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
    width: 100%;
    overflow: hidden;
}

/* Card header */
.cp-pix-card-header {
    background: linear-gradient(135deg, #00a854 0%, #00c76a 100%);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cp-pix-order-badge {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cp-pix-order-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    opacity: .8;
    animation: cp-pulse 1.8s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes cp-pulse {
    0%, 100% { opacity: .8; transform: scale(1); }
    50%       { opacity: 1; transform: scale(1.25); }
}

.cp-pix-order-label {
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
}

.cp-pix-order-num {
    color: rgba(255,255,255,.85);
    font-size: 0.82rem;
}

/* ── Product row ───────────────────────────────────────────────────────────── */
.cp-pix-product-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 24px;
}

.cp-pix-product-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.cp-pix-product-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 4px;
    line-height: 1.3;
}

.cp-pix-product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #00a854;
}

/* ── Divider ───────────────────────────────────────────────────────────────── */
.cp-pix-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 0 24px;
}

/* ── How-to ────────────────────────────────────────────────────────────────── */
.cp-pix-how-title {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 16px 24px 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #444;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.cp-pix-steps {
    list-style: none;
    margin: 0;
    padding: 0 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cp-pix-steps li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.88rem;
    color: #555;
    line-height: 1.4;
}

.cp-pix-steps li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e8f8f0;
    color: #00a854;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── QR Code section ───────────────────────────────────────────────────────── */
.cp-pix-qr-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 24px 16px;
    gap: 14px;
}

.cp-pix-qr-frame {
    position: relative;
    padding: 10px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.1);
}

/* Corner decorations */
.cp-pix-qr-corner {
    position: absolute;
    width: 18px;
    height: 18px;
    border-color: #00a854;
    border-style: solid;
}
.cp-pix-qr-corner.tl { top: -2px; left: -2px;  border-width: 3px 0 0 3px; border-radius: 4px 0 0 0; }
.cp-pix-qr-corner.tr { top: -2px; right: -2px; border-width: 3px 3px 0 0; border-radius: 0 4px 0 0; }
.cp-pix-qr-corner.bl { bottom: -2px; left: -2px;  border-width: 0 0 3px 3px; border-radius: 0 0 0 4px; }
.cp-pix-qr-corner.br { bottom: -2px; right: -2px; border-width: 0 3px 3px 0; border-radius: 0 0 4px 0; }

.cp-pix-qr {
    display: block;
    width: 200px;
    height: 200px;
    border-radius: 6px;
}

/* Timer pill */
.cp-pix-timer-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff8e6;
    border: 1px solid #ffd54f;
    color: #b07800;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 500;
}

.cp-pix-timer-pill strong {
    color: #e65c00;
    font-size: 1rem;
}

/* ── OR divider ────────────────────────────────────────────────────────────── */
.cp-pix-or {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    margin: 4px 0;
}

.cp-pix-or::before,
.cp-pix-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #f0f0f0;
}

.cp-pix-or span {
    font-size: 0.78rem;
    color: #aaa;
    white-space: nowrap;
}

/* ── Copy section ──────────────────────────────────────────────────────────── */
.cp-pix-copy-section {
    padding: 0 24px 24px;
}

.cp-pix-copy-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 8px;
}

.cp-pix-copy-box {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.cp-pix-code-input {
    flex: 1;
    padding: 11px 12px;
    border: 1.5px solid #e8e8e8;
    border-radius: 8px;
    font-size: 11px;
    font-family: monospace;
    color: #666;
    background: #fafafa;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    outline: none;
    cursor: text;
    min-width: 0;
}

.cp-pix-copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 11px 16px;
    background: #00a854;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, transform .1s;
    flex-shrink: 0;
}

.cp-pix-copy-btn:hover  { background: #008c45; }
.cp-pix-copy-btn:active { transform: scale(.97); }
.cp-pix-copy-btn.copied { background: #155724; }

/* ── Polling ───────────────────────────────────────────────────────────────── */
.cp-pix-polling {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: #f9fafb;
    border-top: 1px solid #f0f0f0;
    font-size: 0.82rem;
    color: #888;
    border-radius: 0 0 16px 16px;
}

.cp-pix-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #ddd;
    border-top-color: #00a854;
    border-radius: 50%;
    animation: cp-spin 1s linear infinite;
    display: inline-block;
    flex-shrink: 0;
}

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

/* ── Success card ─────────────────────────────────────────────────────────── */
.cp-pix-success-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
    width: 100%;
    padding: 40px 24px;
    text-align: center;
}

.cp-pix-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #00a854;
    color: #fff;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    animation: cp-pop .4s cubic-bezier(.34,1.56,.64,1);
}

@keyframes cp-pop {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.cp-pix-success-card h2 { color: #00a854; margin-bottom: 8px; }
.cp-pix-success-card p  { color: #888; font-size: 0.9rem; }

/* ── Security badge ────────────────────────────────────────────────────────── */
.cp-pix-security {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #aaa;
    text-align: center;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .cp-pix-page-body { padding: 16px 12px 40px; }
    .cp-pix-card-header { padding: 14px 18px; }
    .cp-pix-product-row,
    .cp-pix-copy-section,
    .cp-pix-how-title,
    .cp-pix-steps,
    .cp-pix-or { padding-left: 18px; padding-right: 18px; }
    .cp-pix-qr { width: 180px; height: 180px; }
    .cp-pix-copy-box { flex-direction: column; }
    .cp-pix-copy-btn { justify-content: center; }
}
