/*
Theme Name: Johnworks Pay
Theme URI: https://johnworks.org/
Author: Johnworks
Author URI: https://johnworks.org/
Description: One-page payment theme taken from Johnworks2: PayPal box, Credit / Debit Card and crypto wallets (Bitcoin, USDT TRC20, Ethereum, Litecoin, Solana, BSC, XRP, Dogecoin) with Copy, click-to-select and QR buttons, plus light / dark mode. Every text, the PayPal email and every wallet address is editable in Appearance > Customize > Payment Page.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: johnworks-pay
*/

/* ---------- Tokens ---------- */
/* Light scheme (default): background 1 = page, background 2 = soft shapes */
:root {
	--jw-accent: #ea3d56;
	--jw-yellow: #ffc40e;
	--jw-navy: #1b2c58;
	--jw-bg: #edf1f5;
	--jw-shape-1: #e3e9f0;
	--jw-shape-2: #e3e9f0;
	--jw-shape-3: #e3e9f0;
	--jw-header-bg: #edf1f5;
	--jw-footer-bg: #e3e9f0;
	--jw-fg: #1b2c58;
	--jw-fg-body: #5f6577;
	--jw-fg-mute: rgba(27, 44, 88, .6);
	--jw-text-soft: rgba(27, 44, 88, .6);
	--jw-line: rgba(27, 44, 88, .16);
	--jw-line-soft: rgba(27, 44, 88, .1);
	--jw-chip: rgba(27, 44, 88, .07);
	--jw-chip-fg: #1b2c58;
	--jw-hover-bg: #ea3d56;
	--jw-hover-fg: #ffffff;
	--jw-glass: rgba(27, 44, 88, .06);
	--jw-glass-bar: rgba(27, 44, 88, .1);
	--jw-cloud: #ffffff;
	--jw-card: #ffffff;
	--jw-card-text: #353535;
	--jw-body-gray: #868890;
	--jw-plan-active: #ffffff;
	--jw-mega-bg: #ffffff;
	--jw-head: "Josefin Sans", sans-serif;
	--jw-body: "Montserrat", sans-serif;
	--jw-ease: cubic-bezier(.25, .8, .25, 1);
}

}

/* Dark mode (works on top of either scheme): dark 1 = page, dark 2 = shapes */
html.jw-dark {
	--jw-bg: #38434c;
	--jw-shape-1: #3e4a55;
	--jw-shape-2: #3e4a55;
	--jw-shape-3: #3e4a55;
	--jw-header-bg: #38434c;
	--jw-footer-bg: #3e4a55;
	--jw-fg: #ffffff;
	--jw-fg-body: #d5dbe2;
	--jw-fg-mute: rgba(255, 255, 255, .72);
	--jw-text-soft: rgba(255, 255, 255, .7);
	--jw-line: rgba(255, 255, 255, .2);
	--jw-line-soft: rgba(255, 255, 255, .14);
	--jw-chip: rgba(255, 255, 255, .1);
	--jw-chip-fg: #ffffff;
	--jw-hover-bg: #ea3d56;
	--jw-hover-fg: #ffffff;
	--jw-glass: rgba(255, 255, 255, .1);
	--jw-glass-bar: rgba(255, 255, 255, .18);
	--jw-cloud: rgba(255, 255, 255, .3);
	--jw-card: #47535e;
	--jw-card-text: #f1f3f6;
	--jw-plan-active: rgba(255, 255, 255, .07);
	--jw-mega-bg: #47535e;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font: 400 16px/30px var(--jw-body); color: var(--jw-fg-body); background: var(--jw-bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; transition: background-color .5s; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .25s, background-color .25s, opacity .25s; }
p { margin: 0 0 15px; }
h1, h4, h5 { font-family: var(--jw-head); font-weight: 600; margin: 0 0 20px; color: inherit; }
h1 { font-size: 72px; line-height: 1.05; letter-spacing: -1.8px; }
h4 { font-size: 30px; line-height: 1.2; letter-spacing: -.75px; }
h5 { font-size: 26px; line-height: 1.23; letter-spacing: -.65px; }
button { font: inherit; cursor: pointer; }
.jw-icon { display: inline-flex; width: 1em; height: 1em; }
.jw-icon svg { width: 100%; height: 100%; }
.jw-container { width: 1300px; max-width: calc(100% - 80px); margin: 0 auto; position: relative; }
.jw-page { position: relative; overflow: hidden; min-height: 100vh; display: flex; flex-direction: column; }
.jw-main { position: relative; z-index: 2; flex: 1; }

/* ---------- Animated blob background ---------- */
.jw-blobs { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.jw-blob { position: absolute; display: block; animation: jw-morph 18s ease-in-out infinite alternate; transition: background-color .5s; }
.jw-blob.b1 { width: 980px; height: 980px; left: 18%; top: -420px; background: var(--jw-shape-1); border-radius: 46% 54% 42% 58% / 38% 44% 56% 62%; }
.jw-blob.b2 { width: 900px; height: 900px; right: -380px; top: 900px; background: var(--jw-shape-2); opacity: .85; border-radius: 58% 42% 51% 49% / 49% 61% 39% 51%; animation-duration: 22s; }
@keyframes jw-morph {
	0% { border-radius: 46% 54% 42% 58% / 38% 44% 56% 62%; transform: translate(0, 0) rotate(0deg); }
	50% { border-radius: 58% 42% 60% 40% / 52% 38% 62% 48%; transform: translate(30px, 25px) rotate(8deg); }
	100% { border-radius: 40% 60% 48% 52% / 60% 52% 48% 40%; transform: translate(-25px, 10px) rotate(-6deg); }
}

/* ---------- Header ---------- */
.jw-header { position: relative; z-index: 5; border-bottom: 1px solid var(--jw-line-soft); }
.jw-header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 100px; }
.jw-header .custom-logo-link img { max-height: 60px; width: auto; }
.jw-logo { display: inline-flex; align-items: flex-start; font: 700 36px/1 var(--jw-head); letter-spacing: -1.2px; color: var(--jw-fg); white-space: nowrap; }
.jw-logo .jw-logo-text { padding-top: 6px; direction: ltr; unicode-bidi: isolate; display: inline-block; }
.jw-logo .jw-icon-bolt { width: 18px; height: 26px; color: var(--jw-yellow); margin-left: 2px; transform-origin: bottom; animation: jw-zap 3.5s infinite; }
@keyframes jw-zap { 0%, 88%, 100% { transform: none; } 91% { transform: rotate(-12deg) scale(1.15); } 94% { transform: rotate(8deg); } }
.jw-logo-a, .jw-logo-b { display: inline-block; transition: color .35s var(--jw-ease), transform .45s var(--jw-ease); }
.jw-logo-b { transition-delay: .06s; }
.jw-logo:hover .jw-logo-a, .jw-logo.is-lit .jw-logo-a { color: var(--jw-accent); transform: translateY(-2px); }
.jw-logo:hover .jw-logo-b, .jw-logo.is-lit .jw-logo-b { color: var(--jw-yellow); transform: translateY(-2px); }
.jw-logo:hover .jw-icon-bolt, .jw-logo.is-lit .jw-icon-bolt { animation: jw-zap .6s 1; color: var(--jw-accent); }
.jw-mode { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--jw-chip); color: var(--jw-chip-fg); display: inline-flex; align-items: center; justify-content: center; transition: background-color .3s, transform .4s; }
.jw-mode:hover { background: var(--jw-yellow); transform: rotate(25deg); }
.jw-mode .jw-icon { width: 16px; height: 16px; position: absolute; transition: opacity .3s, transform .4s; }
.jw-mode .jw-icon-sun { opacity: 0; transform: scale(.4) rotate(-90deg); }
html.jw-dark .jw-mode .jw-icon-moon { opacity: 0; transform: scale(.4) rotate(90deg); }
html.jw-dark .jw-mode .jw-icon-sun { opacity: 1; transform: none; color: var(--jw-yellow); }
html.jw-dark .jw-mode:hover .jw-icon-sun { color: #fff; }

/* ---------- Page title ---------- */
.jw-page-title { padding: 130px 0 40px; text-align: center; position: relative; z-index: 1; }
.jw-page-title h1 { font-size: 64px; margin-bottom: 14px; color: var(--jw-fg); }
.jw-page-title p { color: var(--jw-fg-mute); font-family: var(--jw-head); font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; font-size: 13px; }
.jw-section { position: relative; }

/* ---------- Payment (PayPal) ---------- */
.jw-payment { margin-top: 40px; display: flex; align-items: center; gap: 28px; padding: 30px 34px; background: var(--jw-card); box-shadow: 0 25px 50px rgba(27, 44, 88, .1); border-inline-start: 5px solid #0070ba; }
.jw-payment-brand { flex: none; font: italic 800 34px/1 Verdana, "DejaVu Sans", sans-serif; letter-spacing: -1px; }
.jw-pp-1 { color: #003087; }
.jw-pp-2 { color: #009cde; }
html.jw-dark .jw-pp-1 { color: #ffffff; }
.jw-payment-body { flex: 1; min-width: 0; }
.jw-payment-body h5 { margin: 0 0 6px; font-size: 22px; color: var(--jw-card-text); }
.jw-payment-body p { margin: 0 0 12px; font-size: 14px; line-height: 22px; color: var(--jw-body-gray); }
html.jw-dark .jw-payment-body p { color: #d5dbe2; }
.jw-payment-email { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.jw-payment-email code { padding: 8px 14px; background: var(--jw-bg); color: var(--jw-fg); font: 600 15px/1.2 var(--jw-body); word-break: break-all; }
.jw-copy { height: 34px; padding: 0 16px; border: 1px solid var(--jw-line); background: transparent; color: var(--jw-fg); font: 700 11px/1 var(--jw-head); letter-spacing: 1.5px; text-transform: uppercase; transition: background-color .3s, color .3s; }
.jw-copy:hover, .jw-copy.is-done { background: #0070ba; border-color: #0070ba; color: #fff; }
.jw-payment-btn { flex: none; display: inline-flex; align-items: center; height: 52px; padding: 0 30px; border-radius: 26px; background: #ffc439; color: #003087; font: 700 15px/1 var(--jw-body); transition: filter .3s, transform .3s; }
.jw-payment-btn:hover { filter: brightness(.95); transform: translateY(-2px); }
@media (max-width: 768px) {
	.jw-payment { flex-direction: column; align-items: flex-start; padding: 26px 22px; }
}

/* ---------- Payment page ---------- */
.jw-paypage { padding-top: 30px; padding-bottom: 120px; }
.jw-paypage-inner { width: 1000px; }
.jw-paypage .jw-payment { margin-top: 0; }
.jw-paypage-heading { margin: 70px 0 30px; text-align: center; color: var(--jw-fg); }
.jw-paypage-note { max-width: 680px; margin: 50px auto 30px; text-align: center; color: var(--jw-fg-body); }

/* More payment methods: card + crypto wallets */
.jw-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.jw-method { padding: 26px 28px; background: var(--jw-card); box-shadow: 0 20px 44px rgba(27, 44, 88, .09); border-top: 4px solid var(--coin, #0070ba); display: flex; flex-direction: column; gap: 14px; }
.jw-method-head { display: flex; align-items: center; gap: 14px; }
.jw-method-head h5 { margin: 0; font-size: 21px; color: var(--jw-card-text); }
.jw-method-net { display: inline-block; margin-top: 4px; padding: 3px 10px; background: var(--jw-bg); color: var(--jw-fg-mute); font: 700 11px/1.4 var(--jw-head); letter-spacing: 1px; text-transform: uppercase; }
.jw-coin { flex: none; width: 46px; height: 46px; }
.jw-method p { margin: 0; font-size: 14px; line-height: 22px; color: var(--jw-body-gray); }
html.jw-dark .jw-method p { color: #d5dbe2; }
.jw-method-address code { flex: 1 1 100%; font-size: 13px; }
.jw-select-all { cursor: text; user-select: all; -webkit-user-select: all; }
.jw-method-warn { font-size: 12.5px !important; color: var(--jw-fg-mute) !important; }
.jw-qr { align-self: flex-start; padding: 8px; background: #fff; box-shadow: 0 10px 24px rgba(27, 44, 88, .12); }
.jw-qr img { display: block; width: 180px; height: 180px; }
.jw-method-card { border-top-color: #1a1f71; }
.jw-cardmarks { flex: none; display: inline-flex; align-items: center; gap: 6px; }
.jw-visa { padding: 6px 8px; background: #1a1f71; color: #fff; font: italic 900 16px/1 Verdana, "DejaVu Sans", sans-serif; letter-spacing: -.5px; }
.jw-mc { position: relative; width: 38px; height: 24px; }
.jw-mc i { position: absolute; top: 0; width: 24px; height: 24px; border-radius: 50%; background: #eb001b; }
.jw-mc i + i { left: 14px; background: #f79e1b; mix-blend-mode: multiply; opacity: .95; }
.jw-card-btn { align-self: flex-start; height: 46px; background: #1a1f71; color: #fff; }
@media (max-width: 768px) {
	.jw-methods { grid-template-columns: 1fr; }
}

.jw-select-all { cursor: text; user-select: all; -webkit-user-select: all; }

/* ---------- Footer ---------- */
.jw-footer { position: relative; z-index: 2; background: var(--jw-footer-bg); border-top: 1px solid var(--jw-line-soft); transition: background-color .5s; }
.jw-footer-bottom { min-height: 81px; padding: 18px 20px; display: flex; align-items: center; justify-content: center; text-align: center; }
.jw-footer-bottom p { margin: 0; font: 700 12.5px/1.5 var(--jw-head); letter-spacing: .3px; color: var(--jw-text-soft); }
.jw-footer-bottom a { color: var(--jw-fg); }

/* ---------- Reveal on scroll (only when JavaScript runs) ---------- */
html.js .jw-reveal { opacity: 0; transform: translateY(50px); transition: opacity 1s var(--jw-ease), transform 1s var(--jw-ease); transition-delay: var(--d, 0s); }
html.js .jw-reveal.is-in { opacity: 1; transform: none; }

/* ---------- WordPress admin bar ---------- */
.admin-bar .jw-page { min-height: calc(100vh - 32px); }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
	.jw-container { max-width: calc(100% - 32px); }
	.jw-header-inner { min-height: 76px; }
	.jw-logo { font-size: 30px; }
	.jw-page-title { padding-top: 80px; }
	.jw-page-title h1 { font-size: 44px; }
	.jw-paypage-heading { margin-top: 50px; }
	.jw-method { padding: 22px 20px; }
	html.js .jw-reveal { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.jw-blob, .jw-logo .jw-icon-bolt { animation: none; }
	html.js .jw-reveal { opacity: 1; transform: none; transition: none; }
}
