/*
Theme Name: LilyPay
Theme URI: https://lilypay.pro
Description: Block theme for the LilyPay consumer site, built from the LilyPay Brand Kit v1.1. Ships in waitlist mode; switch to live mode in functions.php.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.1
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: lilypay
*/

/* Brand rules: never place Lily Green on Deep Water (or the reverse). Tints are for surfaces only. */

:root {
	--lp-radius: 10px;
	--lp-rule: #C9D3C7;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Offset anchors for the sticky header. */
[id] { scroll-margin-top: 96px; }

/* Header */
.lp-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: #fff;
	border-bottom: 1px solid #E3E8E2;
}
.admin-bar .lp-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .lp-header { top: 46px; } }
.lp-header .lp-logo img { display: block; width: 120px; height: auto; } /* Brand minimum digital width: 120px */
.lp-header .wp-block-navigation a:hover { color: var(--wp--preset--color--lily-green); }
.lp-header .wp-block-navigation__responsive-container.is-menu-open { padding: 1.5rem; }
@media (max-width: 599px) {
	.lp-header .lp-header-cta { display: none; }
}

/* Eyebrow label: 10/14 SemiBold caps in the brand guide, scaled for web */
.lp-label {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--label);
}

/* Cards */
.lp-card {
	border-radius: var(--lp-radius);
	height: 100%;
}
.lp-step-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	background: var(--wp--preset--color--lily-green);
	color: #fff;
	font-weight: 700;
	line-height: 1;
	margin: 0;
}

/* Hero wallet card mock (Deep Water surface, white logo, per brand guide) */
.lp-wallet-card {
	border-radius: 18px;
	aspect-ratio: 1.6 / 1;
	max-width: 440px;
	margin-left: auto;
	margin-right: auto;
	justify-content: space-between !important;
}
.lp-wallet-card .lp-wallet-logo img { width: 120px; height: auto; display: block; }
.lp-wallet-balance { font-variant-numeric: tabular-nums; }
.lp-checkout-mock {
	max-width: 440px;
	margin-left: auto !important;
	margin-right: auto !important;
}
.lp-checkout-mock .lp-mock-button {
	border-radius: var(--lp-radius);
	text-align: center;
	font-weight: 600;
	padding: 0.85rem 1rem;
	margin: 0;
}
.lp-mock-other {
	border: 1px solid #D5DBE3;
	border-radius: var(--lp-radius);
	padding: 0.75rem 1rem;
	margin: 0;
	color: #4A5A70;
}

/* Fee table */
.lp-fees table {
	border-collapse: collapse;
	width: 100%;
	background: #fff;
	border-radius: var(--lp-radius);
	overflow: hidden;
}
.lp-fees th, .lp-fees td {
	border: 0;
	border-bottom: 1px solid #DCE3EC;
	padding: 1rem 1.25rem;
	text-align: left;
}
.lp-fees thead th {
	background: var(--wp--preset--color--deep-water);
	color: #fff;
	font-weight: 600;
	border-bottom: 0;
}
.lp-fees tbody tr:last-child td { border-bottom: 0; }
.lp-fees td:last-child, .lp-fees th:last-child { text-align: right; white-space: nowrap; }
.lp-fees figcaption { font-size: var(--wp--preset--font-size--small); margin-top: 0.75rem; text-align: left; }

/* FAQ accordion */
.lp-faq .wp-block-details summary {
	font-weight: 600;
	font-size: var(--wp--preset--font-size--large);
	cursor: pointer;
	list-style: none;
	position: relative;
	padding-right: 2.5rem;
}
.lp-faq .wp-block-details summary::-webkit-details-marker { display: none; }
.lp-faq .wp-block-details summary::after {
	content: "+";
	position: absolute;
	right: 0.25rem;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.5rem;
	font-weight: 500;
	color: var(--wp--preset--color--lily-green);
}
.lp-faq .wp-block-details[open] summary::after { content: "\2013"; }
.lp-faq .wp-block-details > :not(summary) { margin-top: 0.75rem; }

/* Waitlist / contact form card */
.lp-form-card { border-radius: 14px; }

/* Formidable Forms: brand the fields */
.lp-form .frm_forms .frm_primary_label,
.lp-form .frm_forms label { color: var(--wp--preset--color--deep-water); font-weight: 600; font-family: inherit; }
.lp-form .frm_forms input[type="text"],
.lp-form .frm_forms input[type="email"],
.lp-form .frm_forms select,
.lp-form .frm_forms textarea {
	font-family: inherit;
	font-size: 1rem;
	color: var(--wp--preset--color--deep-water);
	border: 1px solid #B8C3D1;
	border-radius: var(--lp-radius);
	padding: 0.7rem 0.9rem;
	background: #fff;
	box-shadow: none;
	height: auto;
}
.lp-form .frm_forms input:focus,
.lp-form .frm_forms select:focus,
.lp-form .frm_forms textarea:focus {
	outline: 2px solid var(--wp--preset--color--lily-green);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--lily-green);
}
.lp-form .frm_forms .frm_submit button,
.lp-form .frm_forms .frm_button_submit {
	font-family: inherit;
	font-weight: 600;
	font-size: 1rem;
	background: var(--wp--preset--color--lily-green);
	color: #fff;
	border: 2px solid var(--wp--preset--color--lily-green);
	border-radius: var(--lp-radius);
	padding: 0.8rem 1.4rem;
	width: 100%;
	box-shadow: none;
	cursor: pointer;
}
.lp-form .frm_forms .frm_submit button:hover { background: #183417; border-color: #183417; }
.lp-form .frm_message { border-radius: var(--lp-radius); background: var(--wp--preset--color--pad-tint); color: var(--wp--preset--color--deep-water); border: 0; padding: 1rem 1.25rem; }
.lp-form .frm_description, .lp-form .frm_opt_container label { font-weight: 400; }

/* Shown to admins only when a form is not set up yet */
.lp-form-missing {
	border: 2px dashed #B8C3D1;
	border-radius: var(--lp-radius);
	padding: 1rem 1.25rem;
	font-size: var(--wp--preset--font-size--small);
	background: #fff;
}

/* Placeholder legal pages */
.lp-placeholder-note {
	border-left: 4px solid var(--wp--preset--color--lily-green);
	border-radius: 0 var(--lp-radius) var(--lp-radius) 0;
}

/* Footer (Deep Water surface: white text only) */
.lp-footer, .lp-footer a, .lp-footer p { color: #fff; }
.lp-footer a { text-decoration: none; }
.lp-footer a:hover { text-decoration: underline; }
.lp-footer .lp-footer-logo img { width: 120px; height: auto; display: block; }
.lp-footer .wp-block-navigation { gap: 0.5rem 1.75rem; }
.lp-footer .lp-footer-fine { opacity: 0.8; }
.lp-footer hr { border-color: rgba(255,255,255,0.2) !important; opacity: 1; }

/* White button style on Lily Green surfaces */
.lp-on-green .wp-block-button__link {
	background: #fff;
	color: var(--wp--preset--color--lily-green);
	border-color: #fff;
}
.lp-on-green .wp-block-button__link:hover { background: var(--wp--preset--color--pad-tint); border-color: var(--wp--preset--color--pad-tint); }
.lp-on-green .is-style-outline .wp-block-button__link { background: transparent; color: #fff; border-color: #fff; }

/* Skip link */
.skip-link.screen-reader-text:focus { background: #fff; color: var(--wp--preset--color--deep-water); }

/* Full-width sections sit flush against each other and the header/footer. */
.wp-site-blocks > * + * { margin-block-start: 0; }
main > .wp-block-post-content > .alignfull,
main > .wp-block-post-content > .alignfull + * { margin-block-start: 0; }
main#main { margin-block-start: 0; }
.lp-form .frm_forms { margin-bottom: 0; }
.lp-form .frm_forms .frm_submit { margin-bottom: 0; }
.lp-form .frm_forms form > :last-child, .lp-form .frm_form_fields > fieldset { margin-bottom: 0; padding-bottom: 0; }
