/* We Got You - item cards, the "tell us what you need" box and the account pages.
   Colours come from the theme (Appearance > Editor > Styles), with fallbacks. */

.wgy-request,
.wgy-items,
.wgy-account {
	--wgy-ink: var(--wp--preset--color--contrast, #0f2a3d);
	--wgy-paper: var(--wp--preset--color--base, #ffffff);
	--wgy-yellow: var(--wp--preset--color--accent-1, #ffd23f);
	--wgy-sky: var(--wp--preset--color--accent-2, #38b6ff);
	--wgy-deep-sky: var(--wp--preset--color--accent-3, #0a6fb5);
	--wgy-muted: var(--wp--preset--color--accent-4, #516579);
	--wgy-pale-sky: var(--wp--preset--color--accent-5, #eaf6ff);
	--wgy-blue: var(--wp--preset--color--brand-blue, #166fe5);
	--wgy-danger: #b3261e;
}

/* ---- Shared: messages, form fields, the bot trap ---- */

.wgy-msg {
	margin: 0 0 1rem;
	padding: 0.875rem 1.125rem;
	border-radius: 12px;
	font-weight: 600;
	color: var(--wgy-ink);
}

.wgy-msg--ok {
	background: var(--wgy-yellow);
}

.wgy-msg--error {
	background: var(--wgy-paper);
	border: 2px solid var(--wgy-danger);
}

.wgy-request textarea,
.wgy-account textarea,
.wgy-account input[type="text"] {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 0.875rem 1.125rem;
	font: inherit;
	line-height: 1.5;
	color: var(--wgy-ink);
	background: var(--wgy-paper);
	border: 2px solid var(--wgy-sky);
	border-radius: 14px;
}

.wgy-request textarea,
.wgy-account textarea {
	min-height: 9rem;
	resize: vertical;
}

.wgy-request textarea:focus-visible,
.wgy-account textarea:focus-visible,
.wgy-account input[type="text"]:focus-visible {
	outline: 3px solid var(--wgy-yellow);
	outline-offset: 2px;
	border-color: var(--wgy-deep-sky);
}

.wgy-request button,
.wgy-account button {
	cursor: pointer;
	font-weight: 700;
}

/* Hidden from people, visible to bots. */
.wgy-trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* "I need this ASAP": the tick box and its cost warning, on both request forms. */
.wgy-request .wgy-urgent,
.wgy-account .wgy-urgent {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
	margin-top: 0.875rem;
	padding: 0.75rem 1rem;
	font-weight: 400;
	line-height: 1.4;
	color: var(--wgy-ink);
	background: color-mix(in srgb, var(--wgy-yellow) 30%, var(--wgy-paper));
	border-radius: 12px;
	cursor: pointer;
}

.wgy-account .wgy-urgent {
	justify-self: stretch;
	margin-top: 0;
}

.wgy-urgent input {
	flex: none;
	width: 1.375rem;
	height: 1.375rem;
	margin: 0.0625rem 0 0;
	accent-color: var(--wgy-blue);
	cursor: pointer;
}

.wgy-urgent__cost {
	display: block;
	margin-top: 0.125rem;
	font-size: 1rem;
	color: var(--wgy-muted);
}

/* ---- Tell us what you need ---- */

.wgy-request {
	max-width: 44rem;
	margin-inline: auto;
	scroll-margin-top: 2rem;
}

.wgy-request__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.25rem;
	margin-top: 1rem;
}

.wgy-request__note {
	color: var(--wgy-muted);
	font-size: 1rem;
}

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

.wgy-items {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
	gap: 1.5rem;
}

.wgy-item {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	color: var(--wgy-ink);
	background: var(--wgy-paper);
	border: 1px solid color-mix(in srgb, var(--wgy-sky) 45%, transparent);
	border-radius: 16px;
}

.wgy-item__photo {
	position: relative;
	aspect-ratio: 4 / 3;
	max-width: 100%;
	background: var(--wgy-pale-sky);
}

.wgy-item__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wgy-item__tag {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	padding: 0.25rem 0.75rem;
	font-size: 1rem;
	font-weight: 800;
	color: var(--wgy-ink);
	background: var(--wgy-yellow);
	border-radius: 999px;
}

.wgy-item__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1rem 1.125rem 1.25rem;
}

.wgy-item__name {
	margin: 0;
	font-size: 1.125rem;
	line-height: 1.3;
}

.wgy-item__price {
	margin: 0;
	font-size: 1.25rem;
	font-variant-numeric: tabular-nums;
}

.wgy-item__price del {
	margin-right: 0.375rem;
	font-size: 1rem;
	color: var(--wgy-muted);
}

.wgy-buy {
	align-self: flex-start;
	margin-top: auto;
	cursor: pointer;
	font-weight: 700;
}

.wgy-buy__note {
	margin: 0;
	font-size: 1rem;
	color: var(--wgy-muted);
}

/* ---- Account pages ---- */

/* The account views bring their own headings, so the page's big title is not needed. */
.wgy-account-page .wp-block-post-title {
	display: none;
}

.wgy-account {
	display: grid;
	gap: 1.25rem;
	max-width: 52rem;
	margin-inline: auto;
	color: var(--wgy-ink);
}

.wgy-account--narrow {
	max-width: 30rem;
}

.wgy-account > * {
	margin-block: 0;
}

.wgy-account h2,
.wgy-account h3 {
	margin: 0 0 0.75rem;
	line-height: 1.2;
}

.wgy-account h2 {
	font-size: 1.625rem;
}

.wgy-account h3 {
	font-size: 1.1875rem;
}

.wgy-account p {
	margin-block: 0 0.75rem;
}

.wgy-account form {
	display: grid;
	gap: 0.75rem;
	justify-items: start;
}

.wgy-account label {
	font-weight: 600;
}

.wgy-account__top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}

.wgy-account__top h2 {
	margin: 0;
}

.wgy-account__grid {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 1.25rem;
}

@media (max-width: 640px) {
	.wgy-account__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* The customer's own credit: the loudest thing on the page. */
.wgy-account .wgy-card--balance {
	display: flex;
	flex-direction: column;
	justify-content: center;
	color: var(--wgy-paper);
	background: linear-gradient(160deg, var(--wgy-blue), #0f58c0);
	border-color: transparent;
}

.wgy-account .wgy-card--balance h3 {
	font-size: 1.25rem;
	color: inherit;
}

.wgy-card--balance .wgy-credit {
	margin-block: 0 0.5rem;
	font-size: clamp(2.75rem, 9vw, 4.25rem);
	line-height: 1;
	color: var(--wgy-yellow);
	overflow-wrap: anywhere;
}

.wgy-card--balance .wgy-small {
	margin: 0;
	color: color-mix(in srgb, var(--wgy-paper) 85%, transparent);
}

/* Referrals: quieter, smaller, next to the credit. */
.wgy-referral {
	font-size: 1rem;
}

.wgy-account .wgy-referral h3 {
	font-size: 1.1875rem;
}

.wgy-referral__steps {
	margin: 0 0 1rem;
	padding-left: 1.25rem;
}

.wgy-referral__steps li {
	margin-bottom: 0.25rem;
}

.wgy-referral__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 2rem;
	margin: 0;
}

.wgy-referral__stats dt {
	font-size: 0.9375rem;
	color: var(--wgy-muted);
}

.wgy-referral__stats dd {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.wgy-card {
	min-width: 0;
	padding: 1.5rem;
	background: var(--wgy-paper);
	border: 1px solid color-mix(in srgb, var(--wgy-sky) 45%, transparent);
	border-radius: 16px;
}

.wgy-card--soft {
	background: var(--wgy-pale-sky);
	border-color: transparent;
}

.wgy-small {
	font-size: 1rem;
	color: var(--wgy-muted);
}

/* A button that reads as a small text link ("Ticked ASAP by mistake? Remove it"). */
.wgy-account .wgy-linkbutton {
	padding: 0;
	font: inherit;
	font-size: 1rem;
	color: var(--wgy-blue);
	text-decoration: underline;
	background: none;
	border: 0;
	cursor: pointer;
}

.wgy-account .wgy-button--quiet {
	color: var(--wgy-ink);
	background: transparent;
	border: 2px solid var(--wgy-sky);
}

.wgy-account .wgy-button--quiet:hover {
	background: var(--wgy-pale-sky);
}

/* The account number: big, evenly spaced digits. */
.wgy-number,
.wgy-account .wgy-number-input {
	font-family: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.06em;
}

.wgy-account .wgy-number-input {
	font-size: 1.25rem;
}

.wgy-number {
	padding: 1rem;
	font-size: clamp(1.25rem, 5vw, 1.875rem);
	font-weight: 700;
	text-align: center;
	overflow-wrap: anywhere;
	background: var(--wgy-pale-sky);
	border-radius: 12px;
}

.wgy-warning {
	margin-block: 1rem;
	padding: 1rem 1.125rem;
	background: color-mix(in srgb, var(--wgy-yellow) 35%, var(--wgy-paper));
	border-left: 6px solid var(--wgy-yellow);
	border-radius: 8px;
}

.wgy-warning ul {
	margin: 0;
	padding-left: 1.25rem;
}

.wgy-check {
	display: flex;
	gap: 0.5rem;
	align-items: center;
}

.wgy-credit {
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

.wgy-copy-row {
	display: flex;
	gap: 0.5rem;
	margin-block: 0.375rem 1rem;
}

.wgy-copy-row input {
	min-width: 0;
	font-size: 1rem;
}

.wgy-tickets {
	margin: 0;
	padding: 0;
	list-style: none;
}

.wgy-tickets li {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.375rem 0.75rem;
	padding-block: 0.75rem;
	border-top: 1px solid color-mix(in srgb, var(--wgy-sky) 35%, transparent);
}

.wgy-tickets li:first-child {
	border-top: 0;
}

.wgy-tickets a {
	font-weight: 700;
	overflow-wrap: anywhere;
}

.wgy-tickets .wgy-small {
	margin-left: auto;
}

.wgy-pill {
	display: inline-block;
	padding: 0.1875rem 0.75rem;
	font-size: 1rem;
	font-weight: 700;
	vertical-align: middle;
	color: var(--wgy-ink);
	border-radius: 999px;
}

.wgy-pill--open {
	background: var(--wgy-pale-sky);
	border: 1px solid var(--wgy-sky);
}

.wgy-pill--answered {
	background: var(--wgy-yellow);
}

.wgy-pill--closed {
	color: var(--wgy-muted);
	border: 1px solid var(--wgy-muted);
}

.wgy-pill--urgent {
	color: var(--wgy-paper);
	background: var(--wgy-danger);
}

.wgy-ticket-title {
	overflow-wrap: anywhere;
}

.wgy-thread {
	display: grid;
	gap: 0.75rem;
	margin: 0 0 1.25rem;
	padding: 0;
	list-style: none;
}

.wgy-thread__item {
	padding: 0.875rem 1.125rem;
	background: var(--wgy-pale-sky);
	border-radius: 12px;
}

.wgy-thread__item--staff {
	background: color-mix(in srgb, var(--wgy-yellow) 30%, var(--wgy-paper));
}

.wgy-account .wgy-thread__meta {
	margin: 0 0 0.25rem;
	font-size: 1rem;
	color: var(--wgy-muted);
}

.wgy-thread__meta strong {
	color: var(--wgy-ink);
}

.wgy-thread__body {
	overflow-wrap: anywhere;
}

/* ---- "How would you like to pay?" on both request forms ---- */
.wgy-pay {
	display: flex;
	flex-wrap: wrap;
	gap: 0.625rem;
	margin: 0.875rem 0 0;
	padding: 0;
	border: 0;
	justify-self: stretch;
}

.wgy-account .wgy-pay {
	margin-top: 0;
}

.wgy-pay legend {
	width: 100%;
	margin-bottom: 0.5rem;
	padding: 0;
	font-weight: 600;
	color: var(--wgy-ink);
}

/* The real radio buttons stay in the page for keyboards and screen readers, but out of sight. */
.wgy-pay__radio {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.wgy-request .wgy-pay__choice,
.wgy-account .wgy-pay__choice {
	padding: 0.625rem 1.125rem;
	font-weight: 600;
	color: var(--wgy-ink);
	background: var(--wgy-paper);
	border: 2px solid var(--wgy-sky);
	border-radius: 999px;
	cursor: pointer;
}

.wgy-pay__radio:checked + .wgy-pay__choice {
	background: var(--wgy-yellow);
	border-color: var(--wgy-yellow);
}

.wgy-pay__radio:focus-visible + .wgy-pay__choice {
	outline: 3px solid var(--wgy-blue);
	outline-offset: 2px;
}

/* The small box only opens when "other methods" is chosen. */
.wgy-pay__other {
	display: none;
	width: 100%;
}

.wgy-pay__radio--other:checked ~ .wgy-pay__other {
	display: grid;
	gap: 0.375rem;
}

.wgy-pay__other label {
	font-size: 1rem;
	font-weight: 400;
	color: var(--wgy-muted);
}

.wgy-pay__other input {
	width: 100%;
	padding: 0.625rem 0.875rem;
	font: inherit;
	color: var(--wgy-ink);
	background: var(--wgy-paper);
	border: 2px solid var(--wgy-sky);
	border-radius: 12px;
	box-sizing: border-box;
}

/* ---- The price on a request ---- */
.wgy-quote {
	margin: 1rem 0;
	padding: 1rem 1.25rem;
	background: color-mix(in srgb, var(--wgy-yellow) 30%, var(--wgy-paper));
	border-left: 6px solid var(--wgy-yellow);
	border-radius: 12px;
}

.wgy-quote--paid {
	background: var(--wgy-pale-sky);
	border-left-color: var(--wgy-sky);
}

.wgy-quote p {
	margin: 0 0 0.5rem;
}

.wgy-quote__price strong {
	font-size: 1.75rem;
	margin-left: 0.5rem;
}

.wgy-quote__label {
	font-weight: 600;
}

.wgy-quote__how {
	padding: 0.75rem 1rem;
	background: var(--wgy-paper);
	border-radius: 8px;
	overflow-wrap: anywhere;
}
/* "This price does not work for me": a small box that opens under the price. */
.wgy-quote__no {
	margin-top: 0.75rem;
}

.wgy-quote__no summary {
	font-size: 1rem;
	color: var(--wgy-muted);
	text-decoration: underline;
	cursor: pointer;
}

.wgy-quote__no form {
	margin-top: 0.75rem;
}

.wgy-quote__no textarea::placeholder {
	color: var(--wgy-muted);
	opacity: 0.8;
}

/* The request and message boxes: comfortable to read and to type in. */
.wgy-request textarea,
.wgy-account textarea,
.wgy-account input[type="text"] {
	font-size: 1.0625rem;
}

.wgy-thread__body,
.wgy-quote__how {
	font-size: 1.0625rem;
	line-height: 1.6;
}

.wgy-msg {
	font-size: 1.0625rem;
}

/* ---- Referral card: when rewards start, and the small print ---- */
.wgy-referral__when {
	margin: 0 0 0.75rem;
	padding: 0.5rem 0.75rem;
	font-size: 0.9375rem;
	font-weight: 600;
	background: color-mix(in srgb, var(--wgy-yellow) 35%, var(--wgy-paper));
	border-radius: 8px;
}

.wgy-referral__fine {
	margin: 0.75rem 0 0;
	font-size: 0.8125rem;
	color: var(--wgy-muted);
}

/* ---- Buy button on the item cards ---- */
.wgy-buy__form {
	margin-top: auto;
}

/* ---- Paying: credit, crypto checkout ---- */
/* minmax(0, 1fr): the column never grows wider than the box, even on a narrow phone. */
.wgy-payopts {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.75rem;
}

.wgy-payopts > *,
.wgy-crypto > * {
	margin-block: 0;
}

.wgy-crypto {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.75rem;
}

.wgy-coins {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.wgy-account .wgy-button--small {
	padding: 0.375rem 0.875rem;
	font-size: 1rem;
}

.wgy-invoice {
	display: grid;
	gap: 0.75rem;
	padding: 1rem;
	background: var(--wgy-paper);
	border-radius: 12px;
}

.wgy-invoice__grid {
	display: grid;
	grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
	gap: 1.25rem;
	align-items: start;
}

@media (max-width: 640px) {
	.wgy-invoice__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.wgy-invoice__qr {
		max-width: 15rem;
	}
}

.wgy-qr {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 8px;
}

.wgy-invoice__details p {
	margin: 0 0 0.5rem;
}

/* "Copy" and "Open in my wallet app" side by side when there is room, else one under
   the other. On a very narrow phone a long button wraps neatly inside itself
   instead of running off the screen. */
.wgy-invoice__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.wgy-invoice__actions > *,
.wgy-coins > * {
	max-width: 100%;
	text-wrap: balance;
}

.wgy-invoice__amount,
.wgy-invoice__address {
	font-family: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
	font-variant-numeric: tabular-nums;
}

.wgy-invoice__amount {
	font-size: 1.375rem;
	font-weight: 700;
	overflow-wrap: anywhere;
}

.wgy-invoice__address {
	padding: 0.625rem 0.875rem;
	font-size: 1rem;
	word-break: break-all;
	background: var(--wgy-pale-sky);
	border-radius: 8px;
}

.wgy-admin-note {
	padding: 0.375rem 0.75rem;
	font-size: 0.875rem;
	color: var(--wgy-paper);
	background: var(--wgy-ink);
	border-radius: 8px;
}

/* ---- Files we send on a request ---- */
.wgy-files {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1rem;
	margin: 1rem 0 1.25rem;
}

.wgy-files h3 {
	margin: 0;
}

.wgy-file {
	padding: 1rem 1.25rem;
	background: var(--wgy-pale-sky);
	border-radius: 12px;
}

.wgy-file > p {
	margin: 0 0 0.5rem;
	overflow-wrap: anywhere;
}

.wgy-file__previews {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.wgy-file__previews img {
	display: block;
	width: 100%;
	height: auto;
	background: var(--wgy-paper);
	border: 1px solid color-mix(in srgb, var(--wgy-sky) 45%, transparent);
	border-radius: 8px;
}

.wgy-file .wgy-quote {
	margin: 0.5rem 0 0;
}

/* Small previews side by side; tap one to see it big. */
.wgy-file__previews--compact {
	grid-template-columns: repeat(auto-fill, minmax(6.5rem, 8.5rem));
}

.wgy-file__previews--compact a {
	display: block;
	border-radius: 8px;
}

.wgy-file__previews--compact a:focus-visible {
	outline: 3px solid var(--wgy-blue);
	outline-offset: 2px;
}

.wgy-file__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}

/* ---- Receipts, credit line, price in dollars ---- */
.wgy-receipt-link {
	font-size: 1rem;
	font-weight: 600;
}

.wgy-account .wgy-credit-have {
	margin-bottom: -0.25rem;
	color: var(--wgy-ink);
}

.wgy-invoice__details .wgy-invoice__fiat {
	margin-top: -0.25rem;
}

/* ---- Progress steps at the top of a request ---- */
.wgy-progress {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.375rem 0;
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
}

.wgy-progress__step {
	display: flex;
	align-items: center;
	gap: 0.375rem;
	font-size: 0.9375rem;
	color: var(--wgy-muted);
}

.wgy-progress__step + .wgy-progress__step::before {
	content: "";
	width: 1.25rem;
	height: 2px;
	margin-inline: 0.375rem;
	background: color-mix(in srgb, var(--wgy-sky) 55%, transparent);
}

.wgy-progress__dot {
	display: inline-grid;
	place-items: center;
	width: 1.375rem;
	height: 1.375rem;
	font-size: 0.8125rem;
	font-weight: 800;
	line-height: 1;
	color: var(--wgy-paper);
	background: color-mix(in srgb, var(--wgy-sky) 35%, var(--wgy-paper));
	border-radius: 50%;
}

.wgy-progress__step.is-done {
	color: var(--wgy-ink);
}

.wgy-progress__step.is-done .wgy-progress__dot {
	background: var(--wgy-blue);
}

.wgy-progress__step.is-current {
	font-weight: 700;
	color: var(--wgy-ink);
}

.wgy-progress__step.is-current .wgy-progress__dot {
	background: var(--wgy-yellow);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wgy-yellow) 40%, transparent);
}

@media (max-width: 420px) {
	.wgy-progress__step + .wgy-progress__step::before {
		width: 0.625rem;
		margin-inline: 0.25rem;
	}
}

/* ---- The small optional-contact line under the request forms ---- */
.wgy-contact-note {
	margin: 0.625rem 0 0;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: var(--wgy-muted);
}

.wgy-account .wgy-contact-note {
	margin-top: 0;
}

/* ---- Feedback ---- */
.wgy-feedback-page .wp-block-post-title {
	display: none;
}

.wgy-feedback h2 {
	margin-top: 0;
}

.wgy-feedback .wgy-feedback__kinds {
	margin-bottom: 0.875rem;
}

.wgy-account .wgy-feedback-card {
	text-align: center;
}

.wgy-feedback-link {
	margin: 0.75rem 0 0;
	font-size: 0.875rem;
}

.wgy-feedback-link a {
	color: var(--wp--preset--color--accent-4, #516579);
}

/* ---- Narrow phones: slimmer box edges, so the words inside get the room ---- */
@media (max-width: 420px) {
	.wgy-account .wgy-card {
		padding: 1rem;
	}

	.wgy-quote,
	.wgy-file {
		padding: 0.875rem;
	}

	.wgy-invoice {
		padding: 0.75rem;
	}

	.wgy-quote .wp-element-button {
		padding-inline: 1rem;
	}
}
