/*
Theme Name: MJ Wedding
Description: A block theme for Jacquelin & Michael's wedding — May 15, 2027. Soft sage, deep navy, and wine, with arched frames and floral line art.
Author: Jacquelin & Michael
Version: 1.2.6
Requires at least: 6.5
Tested up to: 6.9
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: mj-wedding
*/


body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* ---------------------------------------------------------------------------
 * Arch image styles — echoes the arched frame on the save-the-date
 * ------------------------------------------------------------------------ */

.wp-block-image.is-style-arch img {
	border-radius: 999px 999px 6px 6px;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	width: 100%;
}

/* Arch with a thin navy keyline frame around it, like the invitation */
.wp-block-image.is-style-arch-frame {
	border: 1.5px solid var(--wp--preset--color--contrast);
	border-radius: 999px 999px 8px 8px;
	padding: clamp(10px, 2vw, 18px);
	background: var(--wp--preset--color--paper);
}

.wp-block-image.is-style-arch-frame img {
	border-radius: 999px 999px 4px 4px;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	width: 100%;
}

/* ---------------------------------------------------------------------------
 * Small refinements
 * ------------------------------------------------------------------------ */

.wp-block-site-title a {
	letter-spacing: 0.02em;
	text-decoration: none;
}

.wp-block-navigation a:hover {
	color: var(--wp--preset--color--eucalyptus);
}

/* Header divider sits under the nav, matching its (content) width rather than
 * spanning the full viewport. The !important guards against the old full-width
 * border lingering in a cached/customized header part. */
header .wp-block-group.alignfull {
	border-bottom: none !important;
}

header nav.wp-block-navigation {
	padding-bottom: 0.6rem;
	border-bottom: 1px solid var(--wp--preset--color--contrast);
}

/* Default separator: a short, quiet eucalyptus rule — botanical accent.
 * Core draws the separator line with border-top, so style that (not bottom). */
.wp-block-separator:not(.is-style-wide):not(.is-style-dots) {
	width: 72px;
	border-top: 1px solid var(--wp--preset--color--eucalyptus);
	border-bottom: none;
	opacity: 0.7;
}

/* Buttons: gentle lift on hover */
.wp-block-button__link {
	transition: background-color 0.2s ease, color 0.2s ease;
}

/* Secondary button — eucalyptus fill, for non-primary calls to action
 * (e.g. "Get Directions"). The wine button stays the primary CTA. */
.wp-block-button.is-style-eucalyptus > .wp-block-button__link {
	background-color: var(--wp--preset--color--eucalyptus);
	color: var(--wp--preset--color--paper);
}

.wp-block-button.is-style-eucalyptus > .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--paper);
}

/* ---------------------------------------------------------------------------
 * Eucalyptus accents applied globally.
 *
 * The page-* patterns are content patterns: their markup is copied into each
 * page when it's created, so editing the pattern files doesn't restyle pages
 * that already exist. These rules target the rendered structure directly so
 * the accent lands on the live pages regardless of when they were built.
 * ------------------------------------------------------------------------ */

/* Info cards in columns (Travel page): a thin eucalyptus keyline */
.wp-block-column > .wp-block-group.has-paper-background-color {
	border: 1px solid var(--wp--preset--color--eucalyptus);
}

/* Dashed callout box (RSVP page): eucalyptus rule instead of navy.
 * !important overrides the inline border-color baked into the page content. */
.wp-block-group.has-paper-background-color.has-border-color {
	border-color: var(--wp--preset--color--eucalyptus) !important;
}

/* Secondary CTA — a maps/directions link reads as the eucalyptus button,
 * leaving wine as the primary (RSVP) call to action. */
.wp-block-button__link[href*="maps."] {
	background-color: var(--wp--preset--color--eucalyptus);
}

.wp-block-button__link[href*="maps."]:hover {
	background-color: var(--wp--preset--color--contrast);
}

/* ---------------------------------------------------------------------------
 * Florals flanking the page title — a sprig laid on its side each side
 * ------------------------------------------------------------------------ */

.mj-title-flanked {
	align-items: center;
}

/* Each sprig sits in a fixed box matching its ROTATED footprint (wide + short),
 * so the rotated image never bleeds into the title or off the page. */
.mj-sprig {
	position: relative;
	flex: 0 0 auto;
	width: 88px;   /* rotated width  */
	height: 56px;  /* rotated height */
	margin: 0;
	opacity: 0.55;
}

.mj-sprig img {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 56px;   /* pre-rotation width == final rotated height */
	height: auto;  /* preserves the sprig's aspect ratio */
	max-width: none;
}

/* Stems point inward toward the title; blooms fan outward. */
.mj-sprig-left img  { transform: translate(-50%, -50%) rotate(-90deg); }
.mj-sprig-right img { transform: translate(-50%, -50%) rotate(-90deg) scaleY(-1); }

.mj-title-flanked .wp-block-post-title {
	margin-block: 0;
}

/* Shrink on tablets, drop entirely on phones so the title stays centered. */
@media (max-width: 782px) {
	.mj-sprig { width: 62px; height: 40px; }
	.mj-sprig img { width: 40px; }
}

@media (max-width: 480px) {
	.mj-sprig { display: none; }
}


/* ---------------------------------------------------------------------------
 * RSVP name lookup — the two-step guest form ([mj_rsvp_form])
 * ------------------------------------------------------------------------ */

.mj-rsvp {
	max-width: 44rem;
	margin-inline: auto;
	text-align: center;
}

.mj-rsvp__lead {
	font-family: var(--wp--preset--font-family--heading);
	font-style: italic;
	font-size: clamp(1.2rem, 1rem + 1vw, 1.55rem);
	line-height: 1.4;
	color: var(--wp--preset--color--contrast);
	max-width: 42rem;
	margin: 0 auto 1.75rem;
}

.mj-rsvp__input {
	display: block;
	width: 100%;
	max-width: 32rem;
	margin-inline: auto;
	box-sizing: border-box;
	padding: 0.85rem 1.1rem;
	font-family: var(--wp--preset--font-family--body, inherit);
	font-size: 1.15rem;
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--white);
	border: 1px solid rgba(32, 64, 106, 0.35);
	border-radius: 10px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mj-rsvp__input:focus {
	outline: none;
	border-color: var(--wp--preset--color--contrast);
	box-shadow: 0 0 0 3px rgba(32, 64, 106, 0.15);
}

.mj-rsvp__hint {
	margin: 0.65rem 0 0;
	font-size: 0.85rem;
	color: rgba(32, 64, 106, 0.7);
}

.mj-rsvp__submit {
	margin-top: 1.75rem;
	padding: 0.85rem 2.75rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--paper);
	border: 1px solid rgba(32, 64, 106, 0.15);
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.05s ease;
}

.mj-rsvp__submit:hover {
	background: #efece4;
}

.mj-rsvp__submit:active {
	transform: translateY(1px);
}

.mj-rsvp__submit:disabled {
	opacity: 0.65;
	cursor: default;
}

/* Result / message panel */
.mj-rsvp__result {
	margin-top: 2rem;
}

.mj-rsvp__msg {
	font-size: 1rem;
	line-height: 1.5;
	color: var(--wp--preset--color--contrast);
	margin: 0;
}

.mj-rsvp__card {
	background: var(--wp--preset--color--paper);
	border: 1px solid var(--wp--preset--color--eucalyptus);
	border-radius: 12px;
	padding: 1.75rem 1.5rem;
}

.mj-rsvp__found {
	font-family: var(--wp--preset--font-family--heading);
	font-style: italic;
	font-size: 2rem;
	color: var(--wp--preset--color--contrast);
	margin: 0 0 0.75rem;
}

.mj-rsvp__status {
	display: inline-block;
	font-size: 0.8rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	padding: 0.35rem 0.9rem;
	border-radius: 999px;
	margin: 0;
}

.mj-rsvp__status.is-yes {
	background: rgba(95, 115, 85, 0.15);
	color: var(--wp--preset--color--eucalyptus);
}

.mj-rsvp__status.is-no {
	background: rgba(119, 46, 69, 0.12);
	color: var(--wp--preset--color--accent);
}

.mj-rsvp__status.is-pending {
	background: rgba(32, 64, 106, 0.1);
	color: var(--wp--preset--color--contrast);
}

.mj-rsvp__plusone {
	margin: 1rem 0 0;
	font-size: 0.95rem;
	color: rgba(32, 64, 106, 0.8);
}

/* Visually hidden but available to screen readers. */
.mj-rsvp .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

/* --- Party RSVP form (step 2) --- */
.mj-rsvp__party {
	text-align: left;
	margin-top: 1.5rem;
}

.mj-rsvp__member {
	border: none;
	border-top: 1px solid rgba(32, 64, 106, 0.15);
	padding: 1.25rem 0 0.5rem;
	margin: 0;
}

.mj-rsvp__member legend {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.6rem;
	font-weight: 600;
	line-height: 1.25;
	color: var(--wp--preset--color--contrast);
	padding: 0 0.6rem 0 0;
}

/* Small "Edit name" next to each guest/child name. */
.mj-rsvp__edit-name {
	margin-left: 0.6rem;
	padding: 0.15rem 0.7rem;
	vertical-align: middle;
	font-family: var(--wp--preset--font-family--body, inherit);
	font-size: 0.75rem;
	font-weight: 400;
	letter-spacing: 0.04em;
	color: var(--wp--preset--color--contrast);
	background: transparent;
	border: 1px solid rgba(32, 64, 106, 0.35);
	border-radius: 999px;
	cursor: pointer;
}

.mj-rsvp__edit-name:hover,
.mj-rsvp__edit-name:focus-visible {
	background: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--contrast);
}

.mj-rsvp__rename {
	margin: 0.5rem 0 0.25rem;
}

.mj-rsvp__toggle {
	display: flex;
	gap: 0.6rem;
	margin: 0.6rem 0;
	flex-wrap: wrap;
}

.mj-rsvp__pill {
	flex: 1 1 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.55rem 1rem;
	border: 1px solid rgba(32, 64, 106, 0.35);
	border-radius: 999px;
	background: var(--wp--preset--color--white);
	cursor: pointer;
	font-size: 0.95rem;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.mj-rsvp__pill:has(input:checked) {
	background: var(--wp--preset--color--eucalyptus);
	border-color: var(--wp--preset--color--eucalyptus);
	color: #fff;
}

/* "Can't make it" (and the +1's "No") selected: wine instead of eucalyptus. */
.mj-rsvp__pill:has(input[value="no"]:checked) {
	background: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
}

/* Fallback for browsers without :has() — keep the native radio visible. */
.mj-rsvp__pill input {
	accent-color: var(--wp--preset--color--eucalyptus);
}

.mj-rsvp__pill input[value="no"] {
	accent-color: var(--wp--preset--color--accent);
}

.mj-rsvp__dietary {
	margin: 0.5rem 0 0.25rem;
}

/* "Children" heading above the listed kids: a section heading with a rule
   above it, so the children read as their own group under the adults. */
.mj-rsvp__subhead {
	margin: 2rem 0 0;
	padding-top: 1.25rem;
	border-top: 1px solid rgba(32, 64, 106, 0.35);
	font-family: var(--wp--preset--font-family--heading);
	font-style: italic;
	font-size: 1.45rem;
	line-height: 1.25;
	color: var(--wp--preset--color--eucalyptus);
}

/* The heading already draws the rule, so the first child skips its own. */
.mj-rsvp__subhead + .mj-rsvp__member {
	border-top: none;
	padding-top: 0.5rem;
}

/* "… will be removed from your RSVP." — a soft note, not an error. */
.mj-rsvp__kid-removed,
.mj-rsvp__po-removed {
	margin: 0.75rem 0 0.5rem;
	padding: 0.6rem 0.9rem;
	font-style: italic;
	font-size: 0.9rem;
	color: var(--wp--preset--color--accent);
	background: rgba(119, 46, 69, 0.06);
	border-left: 3px solid rgba(119, 46, 69, 0.45);
	border-radius: 0 8px 8px 0;
}

.mj-rsvp__kid-removed[hidden],
.mj-rsvp__po-removed[hidden] {
	display: none;
}

/* Which days: one row per day, label then the Attending / Can't make it pills. */
.mj-rsvp__event {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.mj-rsvp__event-label {
	flex: 0 0 6rem;
	font-size: 0.95rem;
}

.mj-rsvp__event .mj-rsvp__toggle {
	flex: 1 1 14rem;
}

/* +1: first/last inputs side by side. */
.mj-rsvp__names {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.mj-rsvp__names label {
	flex: 1 1 8rem;
}

.mj-rsvp__field,
.mj-rsvp__dietary label,
.mj-rsvp__member label {
	display: block;
	font-size: 0.9rem;
	color: rgba(32, 64, 106, 0.85);
}

.mj-rsvp__field {
	margin-top: 1.25rem;
}

.mj-rsvp__party input[type="text"],
.mj-rsvp__party textarea {
	display: block;
	width: 100%;
	box-sizing: border-box;
	margin-top: 0.35rem;
	padding: 0.6rem 0.8rem;
	font-size: 1rem;
	font-family: inherit;
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--white);
	border: 1px solid rgba(32, 64, 106, 0.3);
	border-radius: 8px;
}

.mj-rsvp__party input[type="text"]:focus,
.mj-rsvp__party textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--contrast);
	box-shadow: 0 0 0 3px rgba(32, 64, 106, 0.12);
}

.mj-rsvp__party-error {
	margin-top: 1rem;
	color: var(--wp--preset--color--accent);
	font-size: 0.9rem;
}

.mj-rsvp__party .mj-rsvp__submit {
	margin-top: 1.5rem;
}

.mj-rsvp__restart {
	margin-top: 1.5rem;
	margin-left: 0.5rem;
	background: none;
	border: none;
	color: var(--wp--preset--color--contrast);
	text-decoration: underline;
	cursor: pointer;
	font-size: 0.9rem;
}

/* Step 1b — "select the right person" list */
.mj-rsvp__select-lead {
	font-family: var(--wp--preset--font-family--heading);
	font-style: italic;
	font-size: 1.25rem;
	line-height: 1.35;
	color: var(--wp--preset--color--contrast);
	text-align: left;
	margin: 0 0 1rem;
}

.mj-rsvp__candidates {
	list-style: none;
	margin: 0;
	padding: 0;
	text-align: left;
	border-top: 1px solid rgba(32, 64, 106, 0.2);
}

.mj-rsvp__candidate {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.1rem 0.25rem;
	border-bottom: 1px solid rgba(32, 64, 106, 0.2);
}

.mj-rsvp__candidate-names {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.25rem;
	line-height: 1.3;
	color: var(--wp--preset--color--contrast);
}

.mj-rsvp__candidate-select {
	margin-top: 0;
	flex: none;
	padding: 0.6rem 1.75rem;
	font-size: 1rem;
}

/* Guest-added children: name + dietary, with a small Remove link. */
.mj-rsvp__kids-add {
	margin: 0.5rem 0 2.5rem;
}

/* "+ Add a child": an outlined pill so it reads as a button, not a link. */
.mj-rsvp__add-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin-top: 1rem;
	padding: 0.6rem 1.4rem;
	font-family: inherit;
	font-size: 0.95rem;
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--white);
	border: 1px dashed rgba(32, 64, 106, 0.5);
	border-radius: 999px;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.mj-rsvp__add-btn:hover,
.mj-rsvp__add-btn:focus-visible {
	background: var(--wp--preset--color--paper);
	border-color: var(--wp--preset--color--contrast);
	border-style: solid;
}

.mj-rsvp__add-btn[hidden] {
	display: none;
}

.mj-rsvp__new-kid .mj-rsvp__remove-kid {
	margin: 0.25rem 0 0;
}

/* Breathing room between the children block and the +1 / days below. */
.mj-rsvp__plus-one,
.mj-rsvp__events {
	margin-top: 1.5rem;
}
