/**
 * Shared CSS styles for x402 paywall pages
 * Import this in HTML files to maintain consistent styling
 */

:root {
    --fg: #111;
    --muted: #6b7280;
    --bg: #f5f6f8;
    --card: #fff;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #64748b;
    --error: #dc2626;
    --success: #16a34a;
    color-scheme: light dark;
}

* {
    box-sizing: border-box;
}

body {
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
}

.wrap {
    max-width: 860px;
    width: 100%;
    padding: 32px;
}

header {
    margin-bottom: 24px;
}

h1 {
    font-size: 28px;
    margin: 0 0 8px;
}

h3 {
    margin: 0 0 12px;
}

.card {
    background: var(--card);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    margin-bottom: 16px;
}

p {
    margin: 0 0 16px;
}

/* Buttons */
.cta,
button.cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 10px;
    border: 0;
    cursor: pointer;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.cta {
    background: var(--primary);
    color: #fff;
}

.cta:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.cta.secondary {
    background: var(--secondary);
    color: #fff;
}

.cta.secondary:hover:not(:disabled) {
    background: #475569;
}

.cta:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Utility classes */
.row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 14px;
}

.note {
    color: var(--muted);
    font-size: 14px;
    margin-top: 16px;
}

.error {
    color: var(--error);
    background: #fee2e2;
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
}

.success {
    color: var(--success);
    background: #dcfce7;
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
}

/* Loading spinner */
.loader {
    width: 24px;
    height: 24px;
    border: 3px solid #cbd5e1;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Status indicator */
[role="status"] {
    min-height: 1.5em;
}

/* Responsive */
@media (max-width: 640px) {
    .wrap {
        padding: 16px;
    }

    h1 {
        font-size: 24px;
    }

    .card {
        padding: 20px;
    }

    .row {
        flex-direction: column;
        align-items: stretch;
    }

    .cta {
        width: 100%;
    }
}