/*
 * Hefty wishlist pages. Plain CSS on top of the theme: the theme's Tailwind is not rebuilt for these pages, so this
 * uses only theme classes that are already in its style.css (.box, .button-primary, .wp-block-group.is-style-light-wave)
 * and otherwise the theme's CSS variables.
 */

.hfty-wl {
	--wl-text: var(--color-gray-700);
	--wl-heading: var(--color-gray-900);
	--wl-muted: var(--color-gray-500);
	--wl-accent: var(--color-indigo-700);
	--wl-line: color-mix(in oklab, var(--color-indigo-500) 70%, transparent);
	--wl-soft: var(--color-indigo-50);
	--wl-danger: var(--color-red-700);
	--wl-success: var(--color-green-700);
	box-sizing: border-box;
	padding: 0 0 48px;
	color: var(--wl-text);
	font-size: 16px;
	line-height: 1.5;
}

.hfty-wl *,
.hfty-wl *::before,
.hfty-wl *::after {
	box-sizing: border-box;
}

/* ---------- Hero band, like the top of /da/rabatkoder/ (the theme's light wave group) ---------- */

.hfty-wl-hero {
	padding-top: 32px;
	padding-inline: 16px;
	text-align: center;
}

.hfty-wl-hero:empty {
	min-height: 120px;
}

.hfty-wl-hero > * {
	max-width: 55rem;
	margin-inline: auto;
}

.hfty-wl .hfty-wl-title {
	margin-top: 0;
	margin-bottom: 0;
	color: var(--wl-heading);
	font-size: var(--wp--preset--font-size--6-xl, 2.25rem);
	font-weight: var(--font-weight-extrabold);
	line-height: 1.1;
	overflow-wrap: anywhere;
}

.hfty-wl-title mark {
	background: none;
	color: var(--color-primary);
}

.hfty-wl .hfty-wl-lead {
	margin: 16px auto 0;
	color: var(--color-gray-600);
	font-size: var(--wp--preset--font-size--medium, 1.125rem);
	line-height: 1.6;
}

.hfty-wl-body {
	max-width: 720px;
	margin: 0 auto;
	padding: 8px 16px 0;
}

@media (min-width: 48rem) {
	.hfty-wl-hero {
		padding-top: 48px;
	}
}

/* ---------- Text ---------- */

.hfty-wl h2 {
	margin: 0 0 8px;
	color: var(--wl-heading);
	font-size: var(--text-xl);
	font-weight: var(--font-weight-bold);
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.hfty-wl h3 {
	margin: 0 0 8px;
	color: var(--wl-heading);
	font-size: var(--text-lg);
	font-weight: var(--font-weight-bold);
}

.hfty-wl p {
	margin: 0 0 12px;
}

.hfty-wl a:not(.hfty-wl-button) {
	color: var(--color-primary);
	font-weight: var(--font-weight-semibold);
}

.hfty-wl-muted {
	color: var(--wl-muted);
	font-size: var(--text-sm);
}

/* ---------- Cards (the theme's .box gives the white, rounded, softly shadowed look) ---------- */

.hfty-wl-card {
	padding: 16px;
	margin: 0 0 16px;
}

.hfty-wl-card.is-notice {
	background-color: var(--wl-soft);
	box-shadow: none;
}

@media (min-width: 48rem) {
	.hfty-wl-card {
		padding: 24px;
	}
}

/* ---------- Forms ---------- */

.hfty-wl-form label {
	display: block;
	margin: 12px 0 4px;
	color: var(--wl-heading);
	font-size: var(--text-sm);
	font-weight: var(--font-weight-semibold);
}

.hfty-wl-form label > .hfty-wl-input {
	margin-top: 4px;
	font-weight: var(--font-weight-normal);
}

/* Like the theme's search field: white, 2px indigo border at 70%, radius-2xl. */
.hfty-wl-input {
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	min-height: 48px;
	padding: 10px 16px;
	border: 2px solid var(--wl-line);
	border-radius: var(--radius-2xl);
	background: var(--color-white);
	color: var(--color-gray-950);
	font: inherit;
}

.hfty-wl-input::placeholder {
	color: var(--color-gray-400);
}

.hfty-wl-input:focus {
	border-color: var(--color-indigo-600);
	outline: 3px solid var(--color-indigo-200);
	outline-offset: 0;
}

.hfty-wl-input[readonly] {
	background: var(--wl-soft);
}

/* iOS WebKit gives a date input an intrinsic width wider than a phone card and ignores width without this. */
.hfty-wl-input[type="date"] {
	-webkit-appearance: none;
	appearance: none;
	min-width: 0;
	text-align: left;
}

.hfty-wl-input[type="date"]::-webkit-date-and-time-value {
	text-align: left;
}

.hfty-wl-row {
	display: flex;
	gap: 8px;
	align-items: flex-end;
}

.hfty-wl-row > * {
	flex: 1 1 0;
	min-width: 0;
}

.hfty-wl-row > .hfty-wl-button {
	flex: 0 0 auto;
	min-height: 48px;
}

/* ---------- Buttons ---------- */

/* Secondary: an outline that matches .button-primary's shape. */
.hfty-wl-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin: 0;
	padding: 10px 18px;
	border: 2px solid var(--wl-line);
	border-radius: var(--radius-2xl);
	background-color: var(--color-white);
	color: var(--wl-accent);
	font: inherit;
	font-size: var(--text-sm);
	font-weight: var(--font-weight-bold);
	line-height: 1.25;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

.hfty-wl-button:hover {
	background-color: var(--wl-soft);
}

.hfty-wl-button:focus-visible {
	outline: 3px solid var(--color-indigo-200);
	outline-offset: 1px;
}

.hfty-wl-button:disabled {
	opacity: 0.6;
	cursor: default;
}

/* Primary: the theme's .button-primary (gradient, purple bottom border); only its built-in margins are taken off. */
.hfty-wl .hfty-wl-button.button-primary {
	margin: 0;
	border: 0;
	border-bottom: 2px solid var(--color-purple-800);
	color: var(--color-white);
}

.hfty-wl-button.is-danger {
	border-color: color-mix(in oklab, var(--color-red-500) 55%, transparent);
	color: var(--wl-danger);
}

.hfty-wl-button.is-danger:hover {
	background-color: var(--color-red-50);
}

.hfty-wl-button.is-link {
	min-height: 44px;
	padding: 0 2px;
	border: 0;
	background: none;
	color: var(--color-primary);
	font-weight: var(--font-weight-semibold);
}

.hfty-wl-button.is-link:hover {
	text-decoration: underline;
}

.hfty-wl-button.is-link.is-danger {
	color: var(--wl-danger);
}

.hfty-wl .hfty-wl-form > .hfty-wl-button {
	margin-top: 16px;
}

.hfty-wl-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin-top: 12px;
}

.hfty-wl-confirm {
	margin-top: 12px;
}

.hfty-wl-confirm > p {
	margin: 0;
	color: var(--wl-heading);
	font-weight: var(--font-weight-semibold);
}

.hfty-wl-delete-account {
	margin-top: 24px;
	text-align: center;
}

.hfty-wl-delete-account .hfty-wl-card {
	text-align: left;
}

.hfty-wl-delete-account .hfty-wl-confirm {
	margin-top: 0;
}

/* ---------- Messages ---------- */

.hfty-wl-message {
	padding: 12px 16px;
	border-radius: var(--radius-2xl);
	background: var(--color-indigo-100);
	color: var(--color-indigo-900);
	font-size: var(--text-sm);
}

.hfty-wl-message.is-error {
	background: var(--color-red-50);
	color: var(--wl-danger);
}

.hfty-wl-message.is-success {
	background: var(--color-green-50);
	color: var(--wl-success);
}

.hfty-wl-form .hfty-wl-message {
	margin: 12px 0 0;
}

/* ---------- Owner page ---------- */

.hfty-wl-account {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin: 0 0 12px;
	overflow-wrap: anywhere;
}

.hfty-wl-lists,
.hfty-wl-items {
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
}

.hfty-wl-list-open {
	display: flex;
	flex-direction: column;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.hfty-wl-list-title {
	color: var(--wl-heading);
	font-size: var(--text-lg);
	font-weight: var(--font-weight-bold);
	overflow-wrap: anywhere;
}

.hfty-wl-list-open:hover .hfty-wl-list-title {
	color: var(--color-primary);
}

/* Still in the page (it is a live region), but without the gap it would add while empty. */
.hfty-wl-share-status:empty {
	margin-left: -8px;
}

.hfty-wl-share-status .hfty-wl-input {
	min-width: 240px;
}

.hfty-wl-list-head {
	margin: 8px 0 16px;
}

.hfty-wl-list-head h2 {
	font-size: var(--text-2xl);
	font-weight: var(--font-weight-extrabold);
}

/* ---------- Items ---------- */

.hfty-wl-item {
	display: grid;
	grid-template-columns: 72px 1fr;
	gap: 12px 16px;
	align-items: start;
}

.hfty-wl-item > .hfty-wl-actions,
.hfty-wl-item > .hfty-wl-item-actions,
.hfty-wl-item > .hfty-wl-confirm,
.hfty-wl-item > form {
	grid-column: 1 / -1;
}

.hfty-wl-item.is-removed .hfty-wl-image,
.hfty-wl-item.is-removed .hfty-wl-item-text {
	opacity: 0.5;
}

.hfty-wl-image {
	display: block;
	width: 72px;
	height: 72px;
	object-fit: contain;
	border-radius: var(--radius-xl);
	background: var(--color-white);
}

.hfty-wl-image.is-empty {
	border: 0;
	background: var(--wl-soft);
}

.hfty-wl-item-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.hfty-wl-item-name {
	color: var(--wl-heading);
	font-weight: var(--font-weight-bold);
	overflow-wrap: anywhere;
}

.hfty-wl-item-price {
	color: var(--wl-accent);
	font-weight: var(--font-weight-bold);
}

.hfty-wl-item-note {
	font-size: var(--text-sm);
	font-style: italic;
	overflow-wrap: anywhere;
}

.hfty-wl-item-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: space-between;
	align-items: flex-start;
}

/* ---------- Guest page ---------- */

.hfty-wl-reserve {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.hfty-wl-reserve-form {
	width: 100%;
}

.hfty-wl-status {
	font-weight: var(--font-weight-semibold);
}

.hfty-wl-status.is-reserved,
.hfty-wl-status.is-removed {
	color: var(--wl-muted);
}

.hfty-wl-status.is-mine {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	color: var(--wl-success);
}

.hfty-wl-buy {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 4px;
	max-width: 260px;
	margin-left: auto;
	text-align: right;
}

.hfty-wl-buy .hfty-wl-button {
	min-width: 120px;
}

.hfty-wl-buy small {
	font-size: var(--text-xs);
	line-height: 1.4;
}

.hfty-wl-error-text {
	color: var(--wl-danger);
	font-size: var(--text-sm);
}

.hfty-wl-preview {
	display: flex;
	gap: 12px;
	align-items: center;
	margin-top: 8px;
}

.hfty-wl-preview:empty {
	display: none;
}


/* ---------- "How it works" below the login card (static, for visitors and search engines) ---------- */

.hfty-wl-howto {
	margin-top: 32px;
}

.hfty-wl-howto[hidden] {
	display: none;
}

.hfty-wl-steps {
	display: grid;
	gap: 16px;
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
	counter-reset: hfty-wl-step;
}

.hfty-wl-steps > li {
	margin: 0;
	counter-increment: hfty-wl-step;
}

.hfty-wl-steps h3::before {
	content: counter(hfty-wl-step) ". ";
	color: var(--color-primary);
}

.hfty-wl-steps p {
	margin: 0;
}

.hfty-wl-faq {
	color: var(--wl-muted);
	font-size: var(--text-sm);
}

@media (min-width: 48rem) {
	.hfty-wl-steps {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.hfty-wl-disclosure {
	margin-top: 24px;
	color: var(--wl-muted);
	font-size: var(--text-xs);
	text-align: center;
}

@media (max-width: 480px) {
	/* The product link gets the whole width, its button goes under it. */
	.hfty-wl-row:has(> .hfty-wl-button) {
		flex-wrap: wrap;
	}

	.hfty-wl-row:has(> .hfty-wl-button) > .hfty-wl-input {
		flex-basis: 100%;
	}

	.hfty-wl-buy {
		align-items: stretch;
		max-width: none;
		margin-left: 0;
		text-align: left;
		width: 100%;
	}

	.hfty-wl-buy .hfty-wl-button {
		width: 100%;
	}
}

/* ---------- In the iOS app (?app=1): the app's own look ----------
 * hfty-wl--app is on <body> and <main> only in app mode, so nothing here touches the website. The values are the
 * app's (HeftyApp/Resources/Style.css in the extension repo): system font, light indigo background, #4f39f6 accent,
 * flat purple buttons with 8px corners, white cards with a thin border, 1rem spacing, and the compact
 * .page-intro header instead of the wave band.
 */

body.hfty-wl--app {
	margin: 0;
	background: #eef2ff;
}

.hfty-wl.hfty-wl--app {
	--app-primary: #4f39f6;
	--app-bg: #eef2ff;
	--app-text: #030712;
	--app-heading: #1e1a4d;
	/* The app's --color-muted (#99a1af) is for small dates; one step darker keeps longer hints readable. */
	--app-muted: #6a7282;
	--app-line: #d6deff;
	/* The app's --color-muted: the outline of its secondary button. */
	--app-border: #99a1af;
	--app-card-line: #e3e3e3;
	--app-rounded: 8px;
	--app-rounded-large: 12px;
	--wl-text: var(--app-text);
	--wl-heading: var(--app-heading);
	--wl-muted: var(--app-muted);
	--wl-accent: var(--app-primary);
	--wl-soft: var(--app-bg);
	padding: 0 0 24px;
	background: var(--app-bg);
	color: var(--app-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 1rem;
	line-height: 1.4;
}

.hfty-wl--app button,
.hfty-wl--app input {
	font-family: inherit;
}

/* Header: the app's .page-intro in .page-content (left aligned, 2.2rem title, no band). */
.hfty-wl--app .hfty-wl-hero {
	padding: 16px 16px 0;
	background: none;
	text-align: left;
}

.hfty-wl--app .hfty-wl-hero:empty {
	min-height: 0;
	padding: 0;
}

.hfty-wl--app .hfty-wl-hero > * {
	max-width: none;
}

.hfty-wl--app .hfty-wl-title {
	color: var(--app-text);
	font-size: 2.2rem;
	font-weight: 700;
	line-height: 1.2;
}

.hfty-wl--app .hfty-wl-title mark {
	color: inherit;
}

.hfty-wl--app .hfty-wl-lead {
	margin: 4px 0 0;
	color: var(--app-text);
	font-size: 1.15rem;
}

.hfty-wl--app .hfty-wl-body {
	max-width: none;
	padding: 16px 16px 0;
}

/* Text */
.hfty-wl--app h2 {
	color: var(--app-heading);
	font-size: 1.15rem;
	font-weight: 600;
}

.hfty-wl--app h3 {
	color: var(--app-heading);
	font-size: 1.05rem;
	font-weight: 600;
	margin-bottom: 0.3rem;
}

.hfty-wl--app .hfty-wl-list-head h2 {
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.4;
}

.hfty-wl--app a:not(.hfty-wl-button) {
	color: var(--app-primary);
	font-weight: 500;
}

.hfty-wl--app .hfty-wl-muted {
	color: var(--app-muted);
	font-size: 0.9rem;
}

/* Cards: the app's .card. */
.hfty-wl--app .hfty-wl-card,
.hfty-wl--app .box {
	margin: 0 0 16px;
	padding: 1rem 1.25rem;
	border: 1px solid var(--app-card-line);
	border-radius: var(--app-rounded-large);
	background-color: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	color: var(--app-heading);
}

.hfty-wl--app .hfty-wl-card.is-notice {
	border-color: var(--app-line);
	background-color: var(--app-bg);
	box-shadow: none;
}

/* Buttons: primary is the app's .step__cta-link, secondary its outlined "previous" button. Both keep 44px for touch. */
.hfty-wl--app .hfty-wl-button {
	min-height: 44px;
	padding: 0.5rem 0.9rem;
	border: 1px solid var(--app-border);
	border-radius: var(--app-rounded);
	background-color: #fff;
	color: var(--app-text);
	font-size: 1rem;
	font-weight: 500;
}

.hfty-wl--app .hfty-wl-button:hover {
	background-color: var(--app-bg);
}

.hfty-wl--app .hfty-wl-button:focus-visible {
	outline: 3px solid var(--app-line);
}

.hfty-wl--app .hfty-wl-button.button-primary {
	margin: 0;
	border: 1px solid var(--app-primary);
	background: var(--app-primary);
	color: #fff;
	font-size: 1rem;
	font-weight: 500;
	box-shadow: none;
}

.hfty-wl--app .hfty-wl-button.button-primary:hover {
	background: #4330d8;
}

.hfty-wl--app .hfty-wl-form > .hfty-wl-button {
	margin-top: 16px;
}

.hfty-wl--app .hfty-wl-button.is-danger {
	border-color: #e7000b;
	color: #c10007;
}

.hfty-wl--app .hfty-wl-button.is-danger:hover {
	background-color: #fef2f2;
}

.hfty-wl--app .hfty-wl-button.is-link {
	padding: 0 2px;
	border: 0;
	background: none;
	color: var(--app-primary);
	font-weight: 500;
}

.hfty-wl--app .hfty-wl-button.is-link.is-danger {
	color: #c10007;
}

/* Forms */
.hfty-wl--app .hfty-wl-form label {
	color: var(--app-heading);
	font-size: 0.9rem;
	font-weight: 600;
}

.hfty-wl--app .hfty-wl-input {
	min-height: 44px;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--app-border);
	border-radius: var(--app-rounded);
	background: #fff;
	color: var(--app-text);
	font-size: 1rem;
}

.hfty-wl--app .hfty-wl-input:focus {
	border-color: var(--app-primary);
	outline: 3px solid var(--app-line);
}

.hfty-wl--app .hfty-wl-input[readonly] {
	background: var(--app-bg);
}

.hfty-wl--app .hfty-wl-row > .hfty-wl-button {
	min-height: 44px;
}

/* Messages: info in the app's light indigo, errors in its alert bar colours. */
.hfty-wl--app .hfty-wl-message {
	border-radius: var(--app-rounded);
	background: var(--app-line);
	color: var(--app-heading);
	font-size: 0.9rem;
	line-height: 1.4;
}

.hfty-wl--app .hfty-wl-message.is-error {
	border: 1px solid #ffae66;
	background: #ffe9d5;
	color: #7e2a0c;
}

.hfty-wl--app .hfty-wl-message.is-success {
	background: #f0fdf4;
	color: #008236;
}

/* Lists and items */
.hfty-wl--app .hfty-wl-account .hfty-wl-button {
	flex-shrink: 0;
	white-space: nowrap;
}

.hfty-wl--app .hfty-wl-list-title {
	color: var(--app-heading);
	font-size: 1.05rem;
	font-weight: 600;
}

.hfty-wl--app .hfty-wl-list-open:hover .hfty-wl-list-title {
	color: var(--app-primary);
}

.hfty-wl--app .hfty-wl-image {
	border-radius: var(--app-rounded);
}

.hfty-wl--app .hfty-wl-item-name,
.hfty-wl--app .hfty-wl-confirm > p {
	color: var(--app-heading);
	font-weight: 600;
}

.hfty-wl--app .hfty-wl-item-price {
	color: var(--app-primary);
	font-weight: 600;
}

.hfty-wl--app .hfty-wl-status.is-mine {
	color: #008236;
}

.hfty-wl--app .hfty-wl-disclosure,
.hfty-wl--app .hfty-wl-buy small {
	color: var(--app-muted);
	font-size: 0.75rem;
}
