.stp-poster-app {
	--stp-red: #c8102e;
	display: grid;
	grid-template-columns: minmax(280px, 420px) 1fr;
	gap: 32px;
	max-width: 1400px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #1d2327;
	box-sizing: border-box;
}
.stp-poster-app *,
.stp-poster-app *::before,
.stp-poster-app *::after {
	box-sizing: border-box;
}

@media (max-width: 900px) {
	.stp-poster-app {
		grid-template-columns: 1fr;
	}
}

/* ---------- Form ---------- */

.stp-poster-form {
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 24px;
}

.stp-field {
	margin-bottom: 22px;
}

.stp-label {
	display: block;
	font-weight: 600;
	margin-bottom: 8px;
}

.stp-label-inline {
	margin-top: 14px;
}

.stp-poster-form input[type="text"],
.stp-poster-form textarea,
.stp-poster-form select,
.stp-poster-form input[type="file"] {
	width: 100%;
	padding: 9px 11px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	font-size: 15px;
	font-family: inherit;
	background: #fff;
}

.stp-poster-form textarea {
	resize: vertical;
	min-height: 120px;
}

.stp-hint {
	font-size: 12px;
	color: #646970;
	margin: 6px 0 0;
}

.stp-loading {
	font-size: 13px;
	color: #646970;
}

/* Logo choices */

.stp-logo-choices {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.stp-logo-choice {
	border: 2px solid #dcdcde;
	border-radius: 6px;
	padding: 10px;
	cursor: pointer;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 130px;
	height: 90px;
}

.stp-logo-choice img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.stp-logo-choice.is-selected {
	border-color: var(--stp-red);
	box-shadow: 0 0 0 1px var(--stp-red);
}

/* Background tabs */

.stp-bg-tabs {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
}

.stp-tab-btn {
	padding: 7px 14px;
	border: 1px solid #8c8f94;
	background: #fff;
	border-radius: 4px;
	cursor: pointer;
	font-size: 13px;
}

.stp-tab-btn.is-active {
	background: var(--stp-red);
	border-color: var(--stp-red);
	color: #fff;
}

.stp-tab-panel {
	display: none;
}

.stp-tab-panel.is-active {
	display: block;
}

.stp-bg-existing-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
	gap: 8px;
	max-height: 260px;
	overflow-y: auto;
	padding: 4px;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	background: #fff;
}

.stp-bg-existing-item {
	cursor: pointer;
	border: 2px solid transparent;
	border-radius: 4px;
	overflow: hidden;
	aspect-ratio: 1;
}

.stp-bg-existing-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.stp-bg-existing-item.is-selected {
	border-color: var(--stp-red);
}

.stp-range-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.stp-range-row input[type="range"] {
	flex: 1;
}

.stp-range-value {
	font-size: 13px;
	font-variant-numeric: tabular-nums;
	min-width: 40px;
	text-align: right;
}

.stp-selected-bg-preview {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 12px;
	font-size: 13px;
}

.stp-selected-bg-preview img {
	width: 60px;
	height: 40px;
	object-fit: cover;
	border-radius: 3px;
	border: 1px solid #dcdcde;
}

.stp-upload-status {
	font-size: 13px;
	margin-top: 6px;
}
.stp-upload-status.is-error {
	color: #b32d2e;
}
.stp-upload-status.is-success {
	color: #007017;
}

/* Honeypot: visually and structurally hidden, but not display:none so basic bots still fill it in. */
.stp-hp-field {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.stp-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.stp-btn {
	padding: 11px 22px;
	border-radius: 4px;
	border: 1px solid #8c8f94;
	background: #fff;
	cursor: pointer;
	font-size: 15px;
	font-weight: 600;
}

.stp-btn-primary {
	background: var(--stp-red);
	border-color: var(--stp-red);
	color: #fff;
}

.stp-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ---------- Preview column ---------- */

.stp-preview-heading {
	font-size: 16px;
	margin: 0 0 12px;
}

.stp-poster-scale-wrap {
	width: 100%;
	overflow: hidden;
	position: relative;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	background: #e2e2e2;
}

.stp-result {
	margin-top: 32px;
}

.stp-result img {
	max-width: 100%;
	height: auto;
	display: block;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	margin-bottom: 16px;
}

/* ---------- The poster itself (also captured verbatim by html2canvas) ---------- */

.stp-poster {
	width: 1000px;
	background: #ffffff;
	position: relative;
	overflow: hidden;
	transform-origin: top left;
}

.stp-poster-hero {
	position: relative;
	min-height: 560px;
	overflow: hidden;
	background: #16181c;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.stp-poster-bg {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	display: block;
	width: 100%;
	height: 100%;
	z-index: 1;
}

.stp-poster-logo {
	position: relative;
	z-index: 2;
	max-width: 420px;
	max-height: 170px;
	object-fit: contain;
	margin-top: 44px;
}

.stp-poster-title-wrap {
	position: relative;
	z-index: 2;
	margin-top: auto;
	margin-bottom: 54px;
	width: 100%;
	padding: 0 70px;
	text-align: center;
}

.stp-title-bar {
	border: none;
	border-top: 2px solid var(--stp-red, #c8102e);
	width: 65%;
	margin: 16px auto;
}

.stp-poster-title {
	color: #ffffff;
	font-family: "Lora", Georgia, "Times New Roman", serif;
	font-weight: 700;
	font-size: 66px;
	line-height: 1.15;
	margin: 0;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
	overflow-wrap: break-word;
}

.stp-poster-text-section {
	background: var(--stp-red, #c8102e);
	color: #ffffff;
	padding: 54px 74px 64px;
}

.stp-poster-subheading {
	font-family: "Lora", Georgia, "Times New Roman", serif;
	font-size: 34px;
	font-weight: 700;
	text-align: center;
	margin: 0 0 26px;
}

.stp-poster-freetext {
	font-family: "Lora", Georgia, "Times New Roman", serif;
	font-size: 28px;
	line-height: 1.55;
	white-space: pre-wrap;
	overflow-wrap: break-word;
}
