/**
 * com_weddingbook - customer facing styles
 *
 * Scoped under .wb so nothing here can leak into the site template.
 * Every colour is a variable: restyle the whole booking flow by
 * overriding these six values in the template's own stylesheet.
 */

.wb {
	--wb-ink: #263238;
	--wb-muted: #6b7580;
	--wb-line: #e2ddd5;
	--wb-paper: #ffffff;
	--wb-wash: #f7f5f1;
	--wb-accent: #2f4553;
	--wb-accent-ink: #fbfaf6;
	--wb-gold: #8a6f3f;
	--wb-good: #2f6b4f;
	--wb-alert: #9b3b30;
	--wb-radius: 4px;

	width: 100%;
	max-width: none;
	box-sizing: border-box;
	color: var(--wb-ink);
	font-size: 1rem;
	line-height: 1.55;
}

.wb *,
.wb *::before,
.wb *::after {
	box-sizing: inherit;
}

/*
 * Rows here are flex or block, which outranks the browser's own rule for the
 * hidden attribute. Without this, anything the script hides stays on screen.
 */
.wb [hidden] {
	display: none !important;
}

/* ------------------------------------------------------------------ header */

.wb-hero,
.wb-banner {
	padding: 1.75rem 0 1.25rem;
	border-bottom: 1px solid var(--wb-line);
	margin-bottom: 1.75rem;
}

.wb-hero h1,
.wb-banner h1 {
	margin: 0 0 .4rem;
	font-size: clamp(1.6rem, 3.4vw, 2.4rem);
	font-weight: 500;
	letter-spacing: .01em;
	line-height: 1.2;
}

.wb-hero-sub,
.wb-banner p {
	margin: 0;
	color: var(--wb-muted);
	font-size: 1.05rem;
}

.wb-banner-good h1 {
	color: var(--wb-good);
}

.wb-banner-muted h1 {
	color: var(--wb-muted);
}

/* ------------------------------------------------------------------ layout */

.wb-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.5rem;
	width: 100%;
	align-items: start;
}

@media (min-width: 62rem) {
	.wb-layout {
		grid-template-columns: minmax(0, 1.9fr) minmax(19rem, .9fr);
		gap: 2rem;
	}

	.wb-side {
		position: sticky;
		top: 1.25rem;
	}
}

.wb-main,
.wb-side {
	min-width: 0;
}

/* ------------------------------------------------------------------- cards */

.wb-card {
	background: var(--wb-paper);
	border: 1px solid var(--wb-line);
	border-radius: var(--wb-radius);
	padding: 1.4rem;
	margin-bottom: 1.25rem;
}

.wb-card-title {
	margin: 0 0 1.1rem;
	font-size: 1.15rem;
	font-weight: 600;
	letter-spacing: .02em;
	text-transform: none;
	padding-bottom: .6rem;
	border-bottom: 1px solid var(--wb-line);
}

/* ------------------------------------------------------------------ fields */

.wb-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	gap: 1rem 1.25rem;
}

/*
 * The wedding-day grid pairs a time with a venue. A time needs very little
 * room, so give it half the share it would otherwise take and hand the rest
 * to the venue, which now holds a name, address and phone number.
 */
.wb-grid-day {
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 48rem) {
	.wb-grid-day {
		grid-template-columns: minmax(7.5rem, 0.5fr) minmax(12rem, 1.5fr);
	}
}

.wb-field {
	margin-bottom: 1rem;
	text-align: left;
}

.wb-field:last-child {
	margin-bottom: 0;
}

.wb-field label {
	display: block;
	margin-bottom: .35rem;
	font-size: .88rem;
	font-weight: 600;
	letter-spacing: .03em;
	text-transform: uppercase;
	color: var(--wb-muted);
}

.wb-field input,
.wb-field textarea,
.wb-field select {
	width: 100%;
	max-width: 100%;
	padding: .7rem .8rem;
	border: 1px solid var(--wb-line);
	border-radius: var(--wb-radius);
	background: var(--wb-paper);
	color: var(--wb-ink);
	font-size: 1rem;
	font-family: inherit;
	line-height: 1.4;
}

.wb-field input:focus,
.wb-field textarea:focus {
	outline: 2px solid var(--wb-accent);
	outline-offset: 1px;
	border-color: var(--wb-accent);
}

.wb-field input[aria-invalid="true"] {
	border-color: var(--wb-alert);
}

.wb-field-date input {
	font-size: 1.15rem;
	font-weight: 600;
}

/*
 * A short value should not stretch just because its column is wide.
 * Must sit after the rule above, which sets max-width on every field input
 * at the same specificity.
 */
.wb-field-narrow input {
	max-width: 12rem;
}

.wb-hint {
	margin: .35rem 0 0;
	font-size: .85rem;
	color: var(--wb-muted);
}

.wb-hint.is-bad {
	color: var(--wb-alert);
	font-weight: 600;
}

.wb-hint.is-good {
	color: var(--wb-good);
	font-weight: 600;
}

.wb-req {
	color: var(--wb-alert);
}

.wb-error {
	margin: .5rem 0 0;
	color: var(--wb-alert);
	font-weight: 600;
	font-size: .9rem;
}

/* ---------------------------------------------------------------- choices */

.wb-choices {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
	gap: .85rem;
}

.wb-choice {
	display: flex;
	gap: .7rem;
	align-items: flex-start;
	padding: 1rem;
	border: 1px solid var(--wb-line);
	border-radius: var(--wb-radius);
	cursor: pointer;
	background: var(--wb-wash);
}

.wb-choice:has(input:checked) {
	border-color: var(--wb-accent);
	box-shadow: inset 0 0 0 1px var(--wb-accent);
	background: var(--wb-paper);
}

.wb-choice input {
	margin-top: .25rem;
	flex: 0 0 auto;
}

.wb-choice-body {
	display: block;
}

.wb-choice-title {
	display: block;
	font-weight: 600;
}

.wb-choice-price {
	display: block;
	color: var(--wb-gold);
	font-weight: 600;
	margin: .15rem 0 .3rem;
}

.wb-choice-desc {
	display: block;
	font-size: .9rem;
	color: var(--wb-muted);
}

/* ------------------------------------------------------------------ terms */

.wb-terms {
	max-height: 17rem;
	overflow-y: auto;
	padding: 1rem 1.1rem;
	border: 1px solid var(--wb-line);
	border-radius: var(--wb-radius);
	background: var(--wb-wash);
	font-size: .93rem;
	margin-bottom: 1rem;
}

.wb-terms:focus {
	outline: 2px solid var(--wb-accent);
}

.wb-terms > *:first-child {
	margin-top: 0;
}

.wb-check {
	display: flex;
	gap: .65rem;
	align-items: flex-start;
	padding: .9rem 1rem;
	border: 1px solid var(--wb-line);
	border-radius: var(--wb-radius);
	background: var(--wb-paper);
	cursor: pointer;
	font-weight: 600;
}

.wb-check input {
	margin-top: .2rem;
	width: 1.15rem;
	height: 1.15rem;
	flex: 0 0 auto;
	accent-color: var(--wb-accent);
}

.wb-check.is-missing {
	border-color: var(--wb-alert);
	background: #fdf4f3;
}

/* ---------------------------------------------------------------- summary */

.wb-summary {
	background: var(--wb-wash);
	border: 1px solid var(--wb-line);
	border-radius: var(--wb-radius);
	padding: 1.3rem;
}

.wb-summary-title {
	margin: 0 0 1rem;
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--wb-muted);
}

.wb-lines {
	margin: 0 0 1.1rem;
}

.wb-line {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: .45rem 0;
	border-bottom: 1px dotted var(--wb-line);
}

.wb-line dt,
.wb-line dd {
	margin: 0;
}

.wb-line dd {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.wb-line-discount dt,
.wb-line-discount dd {
	color: var(--wb-gold);
	font-weight: 600;
}

.wb-line-total {
	border-bottom: none;
	padding-top: .6rem;
	font-size: 1.1rem;
	font-weight: 700;
}

.wb-due,
.wb-balance {
	display: block;
	padding: .95rem 1rem;
	border-radius: var(--wb-radius);
	margin-bottom: .8rem;
	text-align: left;
}

.wb-due {
	background: var(--wb-accent);
	color: var(--wb-accent-ink);
}

.wb-due-clear {
	background: var(--wb-good);
}

.wb-balance {
	background: var(--wb-paper);
	border: 1px solid var(--wb-line);
}

.wb-due-label,
.wb-balance-label {
	display: block;
	font-size: .78rem;
	letter-spacing: .09em;
	text-transform: uppercase;
	opacity: .85;
}

.wb-due-amount,
.wb-balance-amount {
	display: block;
	font-size: 1.85rem;
	font-weight: 700;
	line-height: 1.15;
	font-variant-numeric: tabular-nums;
}

.wb-due-note,
.wb-balance-note {
	display: block;
	font-size: .85rem;
	margin-top: .25rem;
	opacity: .9;
}

.wb-balance-note {
	color: var(--wb-muted);
}

.wb-callout {
	border-left: 3px solid var(--wb-gold);
	padding: .7rem .9rem;
	background: var(--wb-paper);
	margin-bottom: 1.1rem;
}

.wb-callout strong {
	display: block;
	color: var(--wb-gold);
	font-size: 1.05rem;
}

.wb-callout p {
	margin: .3rem 0 0;
	font-size: .88rem;
	color: var(--wb-muted);
}

.wb-fineprint {
	margin: .7rem 0 0;
	font-size: .8rem;
	color: var(--wb-muted);
}

.wb-reference {
	margin: 1rem 0 0;
	padding-top: .8rem;
	border-top: 1px solid var(--wb-line);
	font-size: .8rem;
	color: var(--wb-muted);
	letter-spacing: .04em;
}

/* ---------------------------------------------------------------- buttons */

.wb-btn {
	display: block;
	width: 100%;
	padding: .95rem 1.2rem;
	border: 1px solid transparent;
	border-radius: var(--wb-radius);
	font-size: 1.05rem;
	font-weight: 600;
	font-family: inherit;
	letter-spacing: .02em;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
}

.wb-btn-primary {
	background: var(--wb-accent);
	color: var(--wb-accent-ink);
}

.wb-btn-primary:hover,
.wb-btn-primary:focus {
	background: var(--wb-ink);
	color: var(--wb-accent-ink);
}

.wb-btn[disabled] {
	opacity: .55;
	cursor: progress;
}

/* -------------------------------------------------------------- countdown */

.wb-countdown-card {
	border: 1px solid var(--wb-gold);
	border-left-width: 3px;
	border-radius: var(--wb-radius);
	background: var(--wb-paper);
	padding: 1.3rem;
	margin-bottom: 1.25rem;
}

.wb-countdown-lead {
	margin: 0 0 .9rem;
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--wb-gold);
}

.wb-countdown {
	display: flex;
	flex-wrap: wrap;
	gap: .6rem;
}

.wb-cd-unit {
	flex: 1 1 4.5rem;
	min-width: 4.5rem;
	padding: .6rem .3rem;
	background: var(--wb-accent);
	color: var(--wb-accent-ink);
	border-radius: var(--wb-radius);
	text-align: center;
}

.wb-cd-num {
	display: block;
	font-size: 1.9rem;
	font-weight: 700;
	line-height: 1.05;
	font-variant-numeric: tabular-nums;
}

.wb-cd-lbl {
	display: block;
	font-size: .68rem;
	letter-spacing: .11em;
	text-transform: uppercase;
	opacity: .85;
}

.wb-countdown-explain {
	margin: .9rem 0 0;
	font-size: .92rem;
	color: var(--wb-muted);
}

.wb-countdown.is-expired .wb-cd-unit {
	background: var(--wb-muted);
}

/* --------------------------------------------------------------- notices */

.wb-notice {
	padding: 1rem 1.1rem;
	border-radius: var(--wb-radius);
	border-left: 3px solid var(--wb-muted);
	background: var(--wb-wash);
	margin-bottom: 1.25rem;
}

.wb-notice p {
	margin: .4rem 0 0;
}

.wb-notice-warn {
	border-left-color: var(--wb-gold);
}

.wb-notice-alert {
	border-left-color: var(--wb-alert);
	background: #fdf4f3;
}

.wb-notice-alert strong {
	color: var(--wb-alert);
}

/* --------------------------------------------------------------- details */

.wb-detail {
	margin: 0;
}

.wb-detail-row {
	display: flex;
	flex-wrap: wrap;
	gap: .3rem 1rem;
	padding: .5rem 0;
	border-bottom: 1px dotted var(--wb-line);
}

.wb-detail-row:last-child {
	border-bottom: none;
}

.wb-detail dt {
	flex: 0 0 13rem;
	margin: 0;
	color: var(--wb-muted);
	font-size: .88rem;
	letter-spacing: .02em;
	text-transform: uppercase;
}

.wb-detail dd {
	flex: 1 1 14rem;
	margin: 0;
	font-weight: 500;
}

/* ---------------------------------------------------------------- tables */

.wb-table {
	width: 100%;
	border-collapse: collapse;
	text-align: left;
}

.wb-table th,
.wb-table td {
	padding: .55rem .6rem .55rem 0;
	border-bottom: 1px solid var(--wb-line);
	text-align: left;
	vertical-align: top;
}

.wb-table th {
	font-size: .78rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--wb-muted);
}

.wb-pill {
	display: inline-block;
	padding: .1rem .55rem;
	border-radius: 999px;
	font-size: .78rem;
	font-weight: 600;
	background: var(--wb-wash);
	color: var(--wb-muted);
}

.wb-pill-succeeded {
	background: #e6f1ea;
	color: var(--wb-good);
}

.wb-pill-failed {
	background: #fbe9e7;
	color: var(--wb-alert);
}

.wb-soft {
	color: var(--wb-muted);
	font-weight: 400;
}
