@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ═══════════════════════════════════════════════
   SigiloPay PIX – Premium Checkout Styles v2.0
   ═══════════════════════════════════════════════ */

:root {
    --sg-primary: #32BCAD;
    --sg-primary-dark: #2a9d8f;
    --sg-text: #111827;
    --sg-muted: #6b7280;
    --sg-bg: #ffffff;
    --sg-border: #f0f0f0;
    --sg-surface: #fafafa;
    --sg-radius: 20px;
    --sg-radius-sm: 12px;
    --sg-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 32px rgba(0,0,0,0.06);
    --sg-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Container ──────────────────────────────── */

.sigilopay-pix-container {
    max-width: 480px;
    margin: 40px auto;
    padding: 40px 32px 32px;
    background: var(--sg-bg);
    border-radius: var(--sg-radius);
    box-shadow: var(--sg-shadow);
    font-family: var(--sg-font);
    text-align: center;
    border: 1px solid var(--sg-border);
    position: relative;
    overflow: hidden;
    animation: sg-fadeIn 0.4s ease-out;
}

@keyframes sg-fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Animated gradient top border */
.sigilopay-pix-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--sg-primary), var(--sg-primary-dark), var(--sg-primary));
    background-size: 200% 100%;
    animation: sg-gradient 3s ease infinite;
}

@keyframes sg-gradient {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ── Header ─────────────────────────────────── */

.sigilopay-pix-header {
    margin-bottom: 24px;
}

.sigilopay-pix-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px; height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(50,188,173,0.08), rgba(50,188,173,0.18));
    margin-bottom: 16px;
}

.sigilopay-pix-container h2 {
    color: var(--sg-text);
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}

.sigilopay-pix-header > p {
    color: var(--sg-muted);
    font-size: 14px;
    margin: 0;
}

/* ── QR Code ────────────────────────────────── */

.sigilopay-qr-wrapper {
    display: inline-flex;
    padding: 16px;
    background: var(--sg-surface);
    border-radius: 16px;
    border: 1px solid #f3f4f6;
    margin-bottom: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sigilopay-qr-wrapper:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(50,188,173,0.12);
}

.sigilopay-qr-wrapper img {
    border-radius: var(--sg-radius-sm);
    display: block;
}

/* ── Copy Section ───────────────────────────── */

.sigilopay-copy-section {
    text-align: left;
    margin-bottom: 24px;
}

.sigilopay-copy-section label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.sigilopay-input-group {
    display: flex;
    gap: 8px;
    background: #f9fafb;
    padding: 4px;
    border-radius: var(--sg-radius-sm);
    border: 1px solid #e5e7eb;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.sigilopay-input-group:focus-within {
    border-color: var(--sg-primary);
    box-shadow: 0 0 0 3px rgba(50,188,173,0.1);
}

.sigilopay-input-group input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 14px;
    font-size: 13px;
    color: #4b5563;
    outline: none;
    min-width: 0;
    font-family: var(--sg-font);
}

/* ── Button ─────────────────────────────────── */

.sigilopay-btn {
    background: var(--sg-text);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    font-family: var(--sg-font);
}

.sigilopay-btn:hover {
    background: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.sigilopay-btn:active {
    transform: translateY(0);
}

.sigilopay-btn.copied {
    background: #059669;
}

/* ── Status Bar ─────────────────────────────── */

.sigilopay-status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background: #f0fdf4;
    border-radius: var(--sg-radius-sm);
    border: 1px solid #d1fae5;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #065f46;
    transition: all 0.3s ease;
}

.sigilopay-status-bar.paid {
    background: #ecfdf5;
    border-color: #6ee7b7;
    color: #047857;
}

.sigilopay-status-bar.timeout {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

/* ── Spinner ────────────────────────────────── */

.sigilopay-spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(6,95,70,0.15);
    border-top-color: #059669;
    border-radius: 50%;
    animation: sg-spin 0.8s linear infinite;
}

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

/* ── Footer ─────────────────────────────────── */

.sigilopay-footer p {
    margin: 0;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
    color: var(--sg-text);
    font-size: 16px;
    font-weight: 700;
}

/* ── Checkout Badge ─────────────────────────── */

.sigilopay-checkout-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #f0fdf4;
    border-radius: 24px;
    border: 1px solid #d1fae5;
    font-size: 12px;
    font-weight: 600;
    color: #065f46;
    margin-top: 8px;
    font-family: var(--sg-font);
}

.sigilopay-dot {
    width: 8px; height: 8px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
    animation: sg-pulse 2s ease-in-out infinite;
}

@keyframes sg-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(0.85); }
}

/* ── Responsive ─────────────────────────────── */

@media (max-width: 520px) {
    .sigilopay-pix-container {
        margin: 20px 12px;
        padding: 28px 20px 24px;
    }
    .sigilopay-input-group {
        flex-direction: column;
        gap: 6px;
    }
    .sigilopay-btn {
        width: 100%;
        text-align: center;
        padding: 14px;
    }
}
