/**
 * Static Site Gen — frontend generator widget.
 *
 * Deliberately low specificity and theme-neutral: it inherits the host theme's
 * font and colors, and only sets what it must to stay legible.
 */

.ssg-widget {
	--ssg-accent: currentColor;
	--ssg-border: rgba( 128, 128, 128, 0.35 );
	--ssg-muted: rgba( 128, 128, 128, 1 );

	max-width: 42rem;
	margin: 0 auto;
}

/**
 * The user agent hides [hidden] with a `display: none` of its own, but any
 * author `display` rule outranks it whatever its specificity - and this
 * stylesheet sets one on .ssg-progress, as host themes do on their own
 * elements. Every panel the script toggles depends on the attribute, so state
 * it once here rather than pairing each display rule with a hiding class.
 */
.ssg-widget [hidden] {
	display: none !important;
}

.ssg-heading {
	margin: 0 0 1rem;
}

.ssg-field {
	margin: 0 0 1.25rem;
}

.ssg-field label,
.ssg-field legend {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 600;
}

.ssg-optional {
	font-weight: 400;
	color: var( --ssg-muted );
}

.ssg-field-platform {
	border: 0;
	padding: 0;
	margin: 0 0 1.25rem;
}

.ssg-radio {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin-right: 1.25rem;
	font-weight: 400;
}

.ssg-input,
.ssg-textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 0.65rem 0.75rem;
	border: 1px solid var( --ssg-border );
	border-radius: 6px;
	font: inherit;
	background: transparent;
	color: inherit;
}

.ssg-textarea {
	resize: vertical;
}

.ssg-input:focus-visible,
.ssg-textarea:focus-visible,
.ssg-submit:focus-visible,
.ssg-button:focus-visible,
.ssg-claim-button:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.ssg-help {
	margin: 0.35rem 0 0;
	font-size: 0.875em;
	color: var( --ssg-muted );
}

.ssg-submit,
.ssg-button,
.ssg-claim-button,
.ssg-restart {
	display: inline-block;
	padding: 0.7rem 1.4rem;
	border: 1px solid currentColor;
	border-radius: 6px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
}

.ssg-submit[disabled],
.ssg-claim-button[disabled],
.ssg-button[disabled] {
	opacity: 0.55;
	cursor: not-allowed;
}

.ssg-button-secondary {
	font-weight: 400;
}

.ssg-notice {
	padding: 0.75rem 1rem;
	border: 1px solid var( --ssg-border );
	border-left-width: 4px;
	border-radius: 4px;
}

.ssg-notice-error,
.ssg-form-error,
.ssg-claim-error {
	color: #a3231f;
}

.ssg-form-error,
.ssg-claim-error {
	margin: 0.75rem 0 0;
	font-size: 0.9375em;
}

/* ---------- Progress ------------------------------------------------- */

.ssg-progress {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	padding: 2rem 1rem;
	text-align: center;
}

.ssg-spinner {
	width: 2rem;
	height: 2rem;
	border: 3px solid var( --ssg-border );
	border-top-color: currentColor;
	border-radius: 50%;
	animation: ssg-spin 0.9s linear infinite;
}

@keyframes ssg-spin {
	to {
		transform: rotate( 360deg );
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.ssg-spinner {
		animation-duration: 3s;
	}
}

.ssg-progress-label {
	margin: 0;
	font-weight: 600;
}

/* ---------- Result --------------------------------------------------- */

.ssg-result {
	padding: 1.5rem;
	border: 1px solid var( --ssg-border );
	border-radius: 8px;
}

.ssg-result-title {
	margin: 0 0 0.5rem;
}

.ssg-result-url {
	word-break: break-all;
}

.ssg-claim {
	margin-top: 1.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var( --ssg-border );
}

.ssg-claim h4 {
	margin: 0 0 0.5rem;
}

.ssg-claim-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.ssg-claim-label {
	flex: 1 1 12rem;
	min-width: 0;
	padding: 0.6rem 0.7rem;
	border: 1px solid var( --ssg-border );
	border-radius: 6px;
	font: inherit;
	background: transparent;
	color: inherit;
}

.ssg-claim-domain {
	color: var( --ssg-muted );
	white-space: nowrap;
}

.ssg-claim-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.ssg-result-again {
	margin: 1.5rem 0 0;
}

.ssg-pending-claim {
	margin-top: 1.5rem;
	padding: 1rem 1.25rem;
	border: 1px solid var( --ssg-border );
	border-radius: 8px;
}

/* ---------- Upsell ---------------------------------------------------- */

.ssg-upsell {
	margin-top: 1.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var( --ssg-border );
}

.ssg-upsell-heading {
	margin: 0 0 0.25rem;
}

.ssg-upsell-intro {
	margin: 0 0 1rem;
	color: var( --ssg-muted );
}

.ssg-upsell-offers {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 13rem, 1fr ) );
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ssg-upsell-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.4rem;
	padding: 1rem;
	border: 1px solid var( --ssg-border );
	border-radius: 8px;
}

.ssg-upsell-card-featured {
	border-color: currentColor;
}

.ssg-upsell-badge {
	padding: 0.1rem 0.5rem;
	border: 1px solid var( --ssg-border );
	border-radius: 999px;
	font-size: 0.75em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.ssg-upsell-title {
	margin: 0;
	font-size: 1.0625em;
}

.ssg-upsell-description {
	margin: 0;
	font-size: 0.9375em;
	color: var( --ssg-muted );
}

.ssg-upsell-price {
	margin: 0;
	font-weight: 600;
}

/* WooCommerce writes a sale price as <del>old</del> <ins>new</ins>. */
.ssg-upsell-price del {
	margin-right: 0.35rem;
	font-weight: 400;
	opacity: 0.6;
}

.ssg-upsell-price ins {
	background: none;
	color: inherit;
	text-decoration: none;
}

.ssg-upsell-price .woocommerce-Price-currencySymbol {
	font-size: 0.9em;
}

/* Pushed to the foot of the card so buttons line up across a row. */
.ssg-upsell-cta {
	margin-top: auto;
	padding: 0.55rem 1.1rem;
	font-size: 0.9375em;
}

/* ---------- My sites -------------------------------------------------- */

.ssg-my-sites {
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var( --ssg-border );
}

.ssg-my-sites ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ssg-my-sites li {
	padding: 0.5rem 0;
	border-bottom: 1px solid var( --ssg-border );
}

.ssg-my-sites-meta {
	display: block;
	font-size: 0.875em;
	color: var( --ssg-muted );
}
