.ra-itp-tool,
.ra-itp-tool * {
	box-sizing: border-box;
}

.ra-itp-tool {
	--ra-purple: #992bff;
	--ra-purple-dark: #7e1ad8;
	--ra-lilac: #d6abff;
	--ra-blue: #0200c4;
	--ra-ink: #09072a;
	--ra-muted: #676779;
	width: 100%;
	color: var(--ra-ink);
	font-family: Arial, Helvetica, sans-serif;
	font-size: 16px;
	line-height: 1.5;
}

.ra-itp-shell {
	width: 100%;
	max-width: 920px;
	margin: 0 auto;
	padding: 26px 16px 48px;
}

.ra-itp-heading {
	width: 100%;
	max-width: 500px;
	margin: 0 auto 16px;
	padding-left: 58px;
	text-align: left;
}

.ra-itp-brand {
	display: inline-block;
	margin: 0;
	background: linear-gradient(90deg, #5170ff 0%, #cb6ce6 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	font-size: 23px;
	font-weight: 700;
	line-height: 1;
}

.ra-itp-heading h2 {
	margin: -1px 0 0;
	padding: 0;
	background: linear-gradient(180deg, #000026 5%, #0200f4 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 64px;
	font-weight: 700;
	letter-spacing: -3px;
	line-height: 1.02;
	white-space: nowrap;
}

.ra-itp-dropzone {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	width: 100%;
	max-width: 500px;
	min-height: 160px;
	margin: 0 auto;
	padding: 24px;
	overflow: hidden;
	background-color: #000026;
	background-image: url('../images/image-panel-gradient.png');
	background-position: center;
	background-repeat: no-repeat;
	background-size: 100% 100%;
	border: 2px solid transparent;
	border-radius: 27px;
	transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.ra-itp-dropzone::after {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: rgba(153, 43, 255, 0);
	content: '';
	pointer-events: none;
	transition: background 160ms ease;
}

.ra-itp-dropzone.is-dragover {
	border-color: #d6abff;
	box-shadow: 0 0 0 5px rgba(153, 43, 255, 0.16);
	transform: translateY(-2px);
}

.ra-itp-dropzone.is-dragover::after {
	background: rgba(153, 43, 255, 0.12);
}

.ra-itp-gradient-button,
.ra-itp-secondary-button,
.ra-itp-text-button {
	-webkit-appearance: none;
	appearance: none;
	width: fit-content;
	max-width: 100%;
	font: inherit;
	cursor: pointer;
	white-space: nowrap;
}

.ra-itp-gradient-button {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	width: auto;
	max-width: 100%;
	min-height: 36px;
	padding: 7px 18px;
	background: linear-gradient(90deg, #7e1ad8 0%, #d6abff 100%);
	border: 2px solid var(--ra-purple);
	border-radius: 11px;
	box-shadow: none;
	color: #fff;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition: filter 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.ra-itp-gradient-button:hover,
.ra-itp-gradient-button:focus-visible {
	color: #fff;
	filter: saturate(1.08) brightness(1.05);
	transform: translateY(-1px);
	box-shadow: 0 8px 20px rgba(92, 25, 190, 0.2);
}

.ra-itp-gradient-button:focus-visible,
.ra-itp-secondary-button:focus-visible,
.ra-itp-text-button:focus-visible,
.ra-itp-field select:focus-visible,
.ra-itp-field input:focus-visible {
	outline: 3px solid rgba(81, 112, 255, 0.35);
	outline-offset: 2px;
}

.ra-itp-gradient-button:disabled,
.ra-itp-secondary-button:disabled {
	cursor: wait;
	filter: grayscale(0.35);
	opacity: 0.68;
	transform: none;
}

.ra-itp-drop-button {
	width: auto;
	min-height: 36px;
}

.ra-itp-arrow {
	display: inline-block;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: 700;
	line-height: 1;
}

.ra-itp-file-input {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.ra-itp-file-details {
	position: relative;
	z-index: 1;
	max-width: 90%;
	margin-top: 13px;
	color: #fff;
	text-align: center;
}

.ra-itp-file-details strong,
.ra-itp-file-details span {
	display: block;
}

.ra-itp-file-details strong {
	overflow: hidden;
	font-size: 14px;
	line-height: 1.25;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ra-itp-file-details span {
	margin-top: 2px;
	color: rgba(255, 255, 255, 0.76);
	font-size: 12px;
}

.ra-itp-primary-actions {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 25px;
	width: 100%;
	max-width: 500px;
	margin: 15px auto 0;
}

.ra-itp-main-button {
	width: auto;
	min-height: 36px;
	padding-inline: 18px;
}

.ra-itp-notice {
	width: 100%;
	max-width: 720px;
	margin: 20px auto 0;
	padding: 11px 14px;
	background: #f4efff;
	border: 1px solid #dfcaff;
	border-radius: 10px;
	color: #4c1b7c;
	font-size: 14px;
	text-align: center;
}

.ra-itp-notice.is-error {
	background: #fff1f1;
	border-color: #ffc7c7;
	color: #a51c1c;
}

.ra-itp-notice.is-success {
	background: #effbf4;
	border-color: #b9ebcd;
	color: #17643a;
}

.ra-itp-options,
.ra-itp-selected,
.ra-itp-progress-panel,
.ra-itp-results {
	width: 100%;
	margin-right: auto;
	margin-left: auto;
}

.ra-itp-options {
	max-width: 720px;
	margin-top: 24px;
	padding: 20px;
	background: #fff;
	border: 1px solid #e8e4f0;
	border-radius: 16px;
	box-shadow: 0 12px 32px rgba(16, 10, 57, 0.07);
}

.ra-itp-option-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.ra-itp-field {
	display: flex;
	flex-direction: column;
	gap: 7px;
	margin: 0;
	color: var(--ra-ink);
	font-size: 13px;
	font-weight: 700;
}

.ra-itp-field select,
.ra-itp-field input[type='text'] {
	width: 100%;
	min-height: 42px;
	margin: 0;
	padding: 8px 11px;
	background: #faf9fd;
	border: 1px solid #d9d4e5;
	border-radius: 8px;
	color: #252235;
	font: 400 14px/1.2 Arial, Helvetica, sans-serif;
}

.ra-itp-field input[type='range'] {
	width: 100%;
	margin: 9px 0 0;
	accent-color: var(--ra-purple);
}

.ra-itp-privacy {
	margin: 16px 0 0;
	color: var(--ra-muted);
	font-size: 12px;
	text-align: center;
}

.ra-itp-selected {
	max-width: 920px;
	margin-top: 34px;
}

.ra-itp-selected-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	margin-bottom: 18px;
}

.ra-itp-selected-header h3 {
	margin: 0;
	color: #171431;
	font-size: 24px;
	line-height: 1.2;
}

.ra-itp-selected-header p {
	margin: 4px 0 0;
	color: var(--ra-muted);
	font-size: 13px;
}

.ra-itp-selected-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 18px;
}

.ra-itp-selected-card {
	overflow: hidden;
	background: #fff;
	border: 1px solid #e3deeb;
	border-radius: 13px;
	box-shadow: 0 8px 22px rgba(16, 10, 57, 0.06);
	cursor: grab;
	transition: border-color 150ms ease, box-shadow 150ms ease, opacity 150ms ease, transform 150ms ease;
}

.ra-itp-selected-card:hover {
	border-color: #caa7ec;
	box-shadow: 0 12px 28px rgba(16, 10, 57, 0.1);
}

.ra-itp-selected-card.is-dragging {
	opacity: 0.46;
	transform: scale(0.98);
}

.ra-itp-selected-preview {
	--ra-itp-rotation: 0deg;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 180px;
	padding: 16px;
	overflow: hidden;
	background: #f3f0f7;
}

.ra-itp-selected-preview img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 100%;
	object-fit: contain;
	box-shadow: 0 3px 12px rgba(14, 12, 35, 0.15);
	transform: rotate(var(--ra-itp-rotation));
	transition: transform 180ms ease;
}

.ra-itp-page-number {
	position: absolute;
	top: 9px;
	left: 9px;
	padding: 3px 8px;
	background: rgba(0, 0, 38, 0.82);
	border-radius: 999px;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
}

.ra-itp-selected-meta {
	padding: 12px;
}

.ra-itp-selected-copy strong,
.ra-itp-selected-copy span {
	display: block;
}

.ra-itp-selected-copy strong {
	overflow: hidden;
	font-size: 13px;
	line-height: 1.25;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ra-itp-selected-copy span {
	margin-top: 3px;
	color: var(--ra-muted);
	font-size: 11px;
}

.ra-itp-image-controls {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 10px;
}

.ra-itp-mini-button {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: auto;
	min-width: 30px;
	max-width: 100%;
	min-height: 30px;
	margin: 0;
	padding: 4px 9px;
	background: #fff;
	border: 1px solid #d8d2e2;
	border-radius: 8px;
	color: #4b405d;
	font: 700 14px/1 Arial, Helvetica, sans-serif;
	cursor: pointer;
	white-space: nowrap;
}

.ra-itp-mini-button:hover,
.ra-itp-mini-button:focus-visible {
	background: #f4efff;
	border-color: #b885e4;
	color: #6b2baa;
}

.ra-itp-mini-button:focus-visible {
	outline: 3px solid rgba(81, 112, 255, 0.35);
	outline-offset: 2px;
}

.ra-itp-mini-button:disabled {
	cursor: default;
	opacity: 0.38;
}

.ra-itp-progress-panel {
	max-width: 720px;
	margin-top: 24px;
	padding: 18px 20px;
	background: #f8f6fc;
	border: 1px solid #e2dceb;
	border-radius: 14px;
}

.ra-itp-progress-copy {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	font-size: 14px;
}

.ra-itp-progress-track {
	height: 8px;
	margin-top: 10px;
	overflow: hidden;
	background: #e5dded;
	border-radius: 999px;
}

.ra-itp-progress-track span {
	display: block;
	width: 0;
	height: 100%;
	background: linear-gradient(90deg, #5170ff 0%, #992bff 58%, #cb6ce6 100%);
	border-radius: inherit;
	transition: width 160ms ease;
}

.ra-itp-text-button {
	display: table;
	margin: 12px auto 0;
	padding: 0;
	background: transparent;
	border: 0;
	color: #6b2baa;
	font-size: 12px;
	text-decoration: underline;
}

.ra-itp-results {
	max-width: 920px;
	margin-top: 34px;
}

.ra-itp-results-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	margin-bottom: 18px;
}

.ra-itp-results-header h3 {
	margin: 0;
	color: #171431;
	font-size: 24px;
	line-height: 1.2;
}

.ra-itp-results-header p {
	margin: 4px 0 0;
	color: var(--ra-muted);
	font-size: 13px;
}

.ra-itp-result-actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

.ra-itp-secondary-button {
	min-height: 38px;
	padding: 8px 14px;
	background: #fff;
	border: 1px solid #d8d2e2;
	border-radius: 9px;
	color: #39324c;
	font-size: 13px;
	font-weight: 700;
}

.ra-itp-download-all {
	min-height: 38px;
	padding-inline: 16px;
	font-size: 13px;
}

.ra-itp-pdf-file {
	display: flex;
	align-items: center;
	gap: 14px;
	max-width: 520px;
	padding: 16px;
	background: #fff;
	border: 1px solid #e3deeb;
	border-radius: 13px;
	box-shadow: 0 8px 22px rgba(16, 10, 57, 0.06);
}

.ra-itp-pdf-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 48px;
	height: 58px;
	background: linear-gradient(180deg, #992bff 0%, #0200c4 100%);
	border-radius: 8px;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.5px;
}

.ra-itp-pdf-file strong,
.ra-itp-pdf-file span {
	display: block;
}

.ra-itp-pdf-file strong {
	font-size: 15px;
}

.ra-itp-pdf-file span {
	margin-top: 3px;
	color: var(--ra-muted);
	font-size: 12px;
}

.ra-itp-result-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 18px;
}

.ra-itp-result-card {
	overflow: hidden;
	background: #fff;
	border: 1px solid #e3deeb;
	border-radius: 13px;
	box-shadow: 0 8px 22px rgba(16, 10, 57, 0.06);
}

.ra-itp-result-preview {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 210px;
	padding: 12px;
	background: #f3f0f7;
}

.ra-itp-result-preview img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 100%;
	object-fit: contain;
	box-shadow: 0 3px 12px rgba(14, 12, 35, 0.15);
}

.ra-itp-result-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 12px;
}

.ra-itp-result-copy strong,
.ra-itp-result-copy span {
	display: block;
}

.ra-itp-result-copy strong {
	font-size: 13px;
}

.ra-itp-result-copy span {
	margin-top: 2px;
	color: var(--ra-muted);
	font-size: 11px;
}

.ra-itp-page-download {
	flex: 0 0 auto;
	min-height: 32px;
	padding: 6px 10px;
	border-radius: 8px;
	font-size: 11px;
}

.ra-itp-tool [hidden] {
	display: none !important;
}

@media (max-width: 620px) {
	.ra-itp-shell {
		padding: 22px 12px 38px;
	}

	.ra-itp-heading {
		padding-left: 0;
		text-align: center;
	}

	.ra-itp-brand {
		font-size: 19px;
	}

	.ra-itp-heading h2 {
		font-size: clamp(42px, 13vw, 58px);
		letter-spacing: -2.4px;
	}

	.ra-itp-dropzone {
		min-height: 160px;
		border-radius: 23px;
	}

	.ra-itp-primary-actions {
		gap: 10px;
	}

	.ra-itp-main-button {
		flex: 0 0 auto;
		width: auto;
		max-width: 100%;
		padding-inline: 16px;
		font-size: 14px;
	}

	.ra-itp-option-grid {
		grid-template-columns: 1fr;
	}

	.ra-itp-results-header {
		align-items: flex-start;
		flex-direction: column;
	}

	.ra-itp-selected-header {
		align-items: flex-start;
		flex-direction: column;
	}

	.ra-itp-selected-grid {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 12px;
	}

	.ra-itp-result-actions {
		width: 100%;
	}

	.ra-itp-result-actions button {
		flex: 0 0 auto;
	}
}

@media (max-width: 380px) {
	.ra-itp-heading h2 {
		font-size: 39px;
		letter-spacing: -1.8px;
	}

	.ra-itp-dropzone {
		min-height: 145px;
		padding: 18px;
	}

	.ra-itp-primary-actions {
		align-items: center;
		flex-direction: row;
		flex-wrap: wrap;
	}

	.ra-itp-main-button {
		width: auto;
		max-width: 100%;
	}
}
