/* Arivel Photo Products - product page (only loaded on products that use a flow). */

.app-flow {
	--app-ink: #1a1a6c;
	--app-ink-soft: #f1f1fa;
	--app-line: #d9d9e3;
	--app-text: #1f1f2b;
	--app-muted: #6b6b7b;
	--app-error: #c62828;
	--app-warn-bg: #fff6e0;
	--app-warn-text: #7a5300;
	--app-radius: 10px;
}

.app-flow form.cart,
.app-flow form.cart .app-fields,
.app-flow form.cart table.variations {
	font-family: 'Mulish', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

/* The old "Upload your photo" button from Custom Stamp Designer is replaced by the on-page upload. */
.app-flow .sd-design-your-stamp-btn {
	display: none !important;
}

/* ---------- Variation rows (Size / Colour / Photo Type...) as stacked blocks ---------- */

.app-flow form.cart table.variations,
.app-flow form.cart table.variations tbody,
.app-flow form.cart table.variations tr,
.app-flow form.cart table.variations th,
.app-flow form.cart table.variations td {
	display: block;
	width: auto;
	padding: 0;
	margin: 0;
	border: 0;
	background: none;
	text-align: left;
}

.app-flow form.cart table.variations {
	margin: 0 0 6px;
}

.app-flow form.cart table.variations tr {
	margin-bottom: 18px;
}

.app-flow form.cart table.variations th,
.app-flow form.cart table.variations td.label {
	margin-bottom: 8px;
	line-height: 1.3;
}

.app-flow form.cart table.variations th label,
.app-flow form.cart table.variations td.label label,
.app-flow .app-field-label {
	display: block;
	font-size: 14.5px;
	font-weight: 700;
	color: var(--app-text);
	margin: 0 0 8px;
	text-transform: none;
	letter-spacing: 0;
}

.app-flow .app-selected-value {
	font-weight: 400;
	color: var(--app-muted);
	margin-left: 6px;
}

.app-flow .app-selected-value:not(:empty)::before {
	content: ': ';
	margin-left: -6px;
}

.app-flow .app-hidden-select {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
	pointer-events: none !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
}

.app-flow form.cart .reset_variations {
	display: inline-block;
	margin-top: 8px;
	font-size: 12.5px;
	color: var(--app-muted);
}

/* ---------- Chips (option buttons) ---------- */

.app-flow .app-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.app-flow .app-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 8px 16px;
	margin: 0;
	border: 1.5px solid var(--app-line);
	border-radius: 8px;
	background: #fff;
	color: var(--app-text);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: none;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.app-flow .app-chip:hover:not(:disabled) {
	border-color: var(--app-ink);
	background: #fff;
	color: var(--app-text);
}

.app-flow .app-chip:focus-visible,
.app-flow .app-chip-orient:focus-within {
	outline: 2px solid var(--app-ink);
	outline-offset: 2px;
}

.app-flow .app-chip.is-selected {
	border-color: var(--app-ink);
	background: var(--app-ink-soft);
	color: var(--app-ink);
	box-shadow: inset 0 0 0 1px var(--app-ink);
}

.app-flow .app-chip.is-unavailable {
	opacity: 0.45;
	border-style: dashed;
}

.app-flow .app-chip.is-unavailable:hover {
	opacity: 0.8;
}

.app-flow .app-chip:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	text-decoration: line-through;
}

.app-flow .app-swatch {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.18);
	flex: 0 0 auto;
}

.app-flow .app-swatch-unknown {
	background: conic-gradient(#e33, #f90, #fd0, #3c3, #39f, #93f, #e33);
}

/* Orientation */
.app-flow .app-chip-orient {
	position: relative;
}

.app-flow .app-chip-orient input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
}

.app-flow .app-orient-icon {
	display: inline-block;
	border: 2px solid currentColor;
	border-radius: 2px;
}

.app-flow .app-orient-portrait {
	width: 12px;
	height: 17px;
}

.app-flow .app-orient-landscape {
	width: 17px;
	height: 12px;
}

/* ---------- Our fields block ---------- */

.app-flow .app-fields {
	width: 100%;
	flex: 0 0 100%;
	margin: 4px 0 18px;
}

.app-flow .app-hint {
	margin: 0 0 16px;
	font-size: 13.5px;
	color: var(--app-muted);
}

.app-flow .app-field {
	margin-bottom: 18px;
}

.app-flow .app-req {
	color: var(--app-error);
}

.app-flow .app-optional {
	font-weight: 400;
	color: var(--app-muted);
	font-size: 13px;
}

/* ---------- Upload ---------- */

.app-flow .app-upload-layout {
	display: flex;
	gap: 16px;
	align-items: flex-start;
}

.app-flow .app-upload-col {
	flex: 1 1 auto;
	min-width: 0;
}

.app-flow .app-dropzone {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 18px;
	margin: 0;
	border: 1.5px dashed #b8b8cc;
	border-radius: var(--app-radius);
	background: #fafafe;
	color: var(--app-text);
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}

.app-flow .app-dropzone:hover,
.app-flow .app-dropzone.is-dragover {
	border-color: var(--app-ink);
	background: var(--app-ink-soft);
}

.app-flow .app-dropzone.is-hidden {
	display: none;
}

.app-flow .app-error .app-dropzone {
	border-color: var(--app-error);
	background: #fff5f5;
}

.app-flow .app-file-input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.app-flow .app-dropzone-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	flex: 0 0 46px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid var(--app-line);
	color: var(--app-ink);
}

.app-flow .app-dropzone-text {
	display: flex;
	flex-direction: column;
	gap: 3px;
	font-size: 13px;
	color: var(--app-muted);
}

.app-flow .app-dropzone-text strong {
	font-size: 14.5px;
	color: var(--app-text);
}

/* File list */
.app-flow ul.app-file-list {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.app-flow .app-file {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	margin: 8px 0 0 !important;
	border: 1px solid var(--app-line);
	border-radius: var(--app-radius);
	background: #fff;
}

.app-flow .app-file:first-child {
	margin-top: 0 !important;
}

.app-flow .app-dropzone:not(.is-hidden) + .app-file-list .app-file:first-child {
	margin-top: 8px !important;
}

.app-flow .app-file-thumb {
	width: 48px;
	height: 48px;
	flex: 0 0 48px;
	border-radius: 6px;
	background: #eee center / cover no-repeat;
}

.app-flow .app-file-thumb-doc {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 800;
	color: #fff;
	background: var(--app-ink);
}

.app-flow .app-file-info {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.app-flow .app-file-name {
	font-size: 13.5px;
	font-weight: 600;
	color: var(--app-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.app-flow .app-file-status {
	font-size: 12px;
	color: var(--app-muted);
}

.app-flow .app-file.is-done .app-file-status::before {
	content: '✓ ';
	color: #2e7d32;
	font-weight: 700;
}

.app-flow .app-progress {
	display: block;
	height: 4px;
	border-radius: 2px;
	background: #ececf3;
	overflow: hidden;
}

.app-flow .app-progress-bar {
	display: block;
	width: 0;
	height: 100%;
	background: var(--app-ink);
	transition: width 0.2s;
}

.app-flow .app-file-remove {
	width: 30px;
	height: 30px;
	flex: 0 0 30px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: #f2f2f6;
	color: #555;
	font-size: 18px;
	line-height: 30px;
	cursor: pointer;
	box-shadow: none;
}

.app-flow .app-file-remove:hover {
	background: #fde8e8;
	color: var(--app-error);
}

.app-flow .app-change-file {
	display: none;
	margin: 8px 0 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--app-ink);
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
	box-shadow: none;
}

.app-flow .app-has-file .app-change-file {
	display: inline-block;
}

.app-flow .app-upload-msg {
	margin: 8px 0 0;
	font-size: 13px;
	font-weight: 600;
	color: var(--app-error);
}

.app-flow .app-res-warning {
	margin: 10px 0 0;
	padding: 8px 12px;
	border-radius: 8px;
	background: var(--app-warn-bg);
	color: var(--app-warn-text);
	font-size: 12.5px;
	line-height: 1.45;
}

/* Preview */
.app-flow .app-preview {
	flex: 0 0 170px;
	width: 170px;
	text-align: center;
}

.app-flow .app-preview-box {
	position: relative;
	width: 100%;
	max-height: 230px;
	margin: 0 auto;
	overflow: hidden;
	background: #eee;
	box-sizing: border-box;
}

.app-flow .app-preview-box[data-orient="portrait"] {
	width: auto;
	height: 210px;
	max-width: 100%;
}

.app-flow .app-preview-box img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.app-flow .app-preview.is-frame .app-preview-box {
	border: 11px solid #2b2b2b;
	box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.9), 0 6px 16px rgba(0, 0, 0, 0.22);
}

.app-flow .app-preview.is-print .app-preview-box {
	border: 6px solid #fff;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.app-flow .app-preview.is-thumb .app-preview-box {
	border-radius: 8px;
	border: 1px solid var(--app-line);
}

.app-flow .app-preview-caption {
	margin: 10px 0 0;
	font-size: 12px;
	color: var(--app-muted);
	line-height: 1.35;
}

/* ---------- Quantity stepper ---------- */

.app-flow .quantity.app-qty {
	display: inline-flex;
	align-items: stretch;
	border: 1.5px solid var(--app-line);
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	height: 46px;
}

.app-flow .quantity.app-qty .app-qty-btn {
	width: 40px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: #f6f6fa;
	color: var(--app-text);
	font-size: 20px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	box-shadow: none;
}

.app-flow .quantity.app-qty .app-qty-btn:hover {
	background: var(--app-ink-soft);
	color: var(--app-ink);
}

.app-flow .quantity.app-qty input.qty {
	width: 52px;
	height: auto;
	min-height: 0;
	padding: 0;
	margin: 0;
	border: 0;
	border-left: 1px solid var(--app-line);
	border-right: 1px solid var(--app-line);
	border-radius: 0;
	text-align: center;
	font-size: 15px;
	font-weight: 700;
	background: #fff;
	box-shadow: none;
	-moz-appearance: textfield;
	appearance: textfield;
}

.app-flow .quantity.app-qty input.qty::-webkit-outer-spin-button,
.app-flow .quantity.app-qty input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Screen-reader-only labels (in case the theme doesn't define the class). */
.app-flow .quantity .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Mobile ---------- */

@media (max-width: 600px) {
	.app-flow .app-upload-layout {
		flex-direction: column;
		align-items: stretch;
	}

	.app-flow .app-preview {
		width: 100%;
		flex-basis: auto;
	}

	.app-flow .app-preview-box,
	.app-flow .app-preview-box[data-orient="portrait"] {
		max-width: 220px;
	}

	.app-flow .app-chip {
		padding: 8px 13px;
	}
}

/* =====================================================================
   Upload title / help (both layouts)
   ===================================================================== */

.app-flow .app-upload-title {
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 600;
	color: var(--app-ink);
}

.app-flow .app-upload-help {
	margin: 0 0 12px;
	font-size: 12.5px;
	color: var(--app-muted);
}

/* =====================================================================
   DROPDOWN LAYOUT (design): "Print Size   [ 4x6 in      v ]"
   ===================================================================== */

.app-style-dropdown {
	--app-row-label: 170px;
	--app-control-max: 340px;
	--app-lilac: #2b2b8f;     /* dashed navy border, as in the design */
	--app-lilac-bg: #f3f3fd;
}

/* Variation rows -> label left, dropdown right */
.app-flow.app-style-dropdown form.cart table.variations tr {
	display: grid;
	grid-template-columns: var(--app-row-label) minmax(0, var(--app-control-max));
	align-items: center;
	column-gap: 16px;
	margin-bottom: 16px;
}

.app-flow.app-style-dropdown form.cart table.variations th,
.app-flow.app-style-dropdown form.cart table.variations td.label {
	margin: 0;
}

.app-flow.app-style-dropdown form.cart table.variations th label,
.app-flow.app-style-dropdown form.cart table.variations td.label label,
.app-flow.app-style-dropdown .app-row-label {
	margin: 0;
	font-size: 15px;
	font-weight: 500;
	color: var(--app-text);
}

.app-flow.app-style-dropdown form.cart table.variations td.value {
	position: relative;
}

.app-flow.app-style-dropdown form.cart .reset_variations {
	display: none !important; /* an option is always selected in this layout */
}

.app-flow.app-style-dropdown form.cart table.variations select,
.app-flow .app-select {
	display: block;
	width: 100%;
	max-width: var(--app-control-max, 340px);
	height: 46px;
	margin: 0;
	padding: 0 44px 0 16px;
	border: 1px solid #4a4a57;
	border-radius: 8px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231f1f2b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center;
	color: var(--app-text);
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	line-height: 44px;
	box-shadow: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	cursor: pointer;
}

.app-flow.app-style-dropdown form.cart table.variations select:focus,
.app-flow .app-select:focus {
	outline: none;
	border-color: var(--app-ink);
	box-shadow: 0 0 0 3px rgba(26, 26, 108, 0.12);
}

/* Our own rows (Orientation, Quantity) */
.app-flow .app-row {
	display: grid;
	grid-template-columns: var(--app-row-label, 170px) minmax(0, var(--app-control-max, 340px));
	align-items: center;
	column-gap: 16px;
	margin-bottom: 16px;
}

.app-flow .app-row[hidden] {
	display: none;
}

/* Real quantity input is driven by the Quantity dropdown */
.app-flow form.cart .quantity.app-qty-hidden {
	display: none !important;
}

/* Variation price moves into the price box */
.app-flow.app-pricebox form.cart .woocommerce-variation-price {
	display: none;
}

.app-flow.app-pricebox .summary > p.price,
.app-flow.app-pricebox .summary > .price,
.app-flow.app-pricebox .entry-summary > p.price,
.app-flow.app-pricebox .elementor-widget-woocommerce-product-price {
	display: none !important;
}

/* Upload box (design: dashed lilac panel, centred) */
.app-flow.app-style-dropdown .app-upload {
	margin-top: 26px;
}

.app-flow.app-style-dropdown .app-upload-layout {
	align-items: stretch;
}

.app-flow.app-style-dropdown .app-dropzone {
	flex-direction: column;
	justify-content: center;
	gap: 8px;
	min-height: 150px;
	padding: 22px 16px;
	border: 1.5px dashed var(--app-lilac);
	border-radius: 10px;
	background: var(--app-lilac-bg);
	text-align: center;
}

.app-flow.app-style-dropdown .app-dropzone:hover,
.app-flow.app-style-dropdown .app-dropzone.is-dragover {
	border-color: var(--app-ink);
	background: #efeafd;
}

.app-flow.app-style-dropdown .app-dropzone-icon {
	width: 34px;
	height: 34px;
	flex: 0 0 auto;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--app-ink);
	box-shadow: 0 1px 4px rgba(26, 26, 108, 0.12);
}

.app-flow.app-style-dropdown .app-dropzone-icon svg {
	width: 18px;
	height: 18px;
}

.app-flow .app-upload-btn {
	display: inline-block;
	padding: 8px 20px;
	border-radius: 999px;
	background: var(--app-ink);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
}

.app-flow .app-upload-types {
	font-size: 12px;
	font-weight: 700;
	color: var(--app-text);
}

.app-flow .app-upload-note {
	font-size: 11.5px;
	color: var(--app-muted);
}

/* Buttons layout keeps the compact dropzone - hide design-only bits there */
.app-flow.app-style-buttons .app-upload-btn,
.app-flow.app-style-buttons .app-upload-types {
	display: none;
}

/* Estimate Delivery + price box */
.app-flow .app-buy-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
	margin: 22px 0 6px;
	padding-top: 16px;
	border-top: 1px solid #ececf2;
}

.app-flow .app-delivery {
	flex: 1 1 auto;
	min-width: 0;
	max-width: 330px;
}

.app-flow .app-delivery-label {
	display: block;
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 700;
	color: var(--app-text);
}

.app-flow .app-pincode {
	display: block;
	width: 100%;
	height: 40px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid #4a4a57;
	border-radius: 8px;
	background: #fff;
	font: inherit;
	font-size: 15px;
	letter-spacing: 1px;
	box-shadow: none;
}

.app-flow .app-pincode:focus {
	outline: none;
	border-color: var(--app-ink);
	box-shadow: 0 0 0 3px rgba(26, 26, 108, 0.12);
}

.app-flow .app-delivery-help {
	display: block;
	margin-top: 5px;
	font-size: 11.5px;
	color: var(--app-muted);
}

.app-flow .app-delivery-result {
	margin: 6px 0 0;
	font-size: 13px;
	font-weight: 700;
	color: #1f7a35;
}

.app-flow .app-delivery-result.is-error {
	color: var(--app-error);
}

.app-flow .app-price-box {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-top: 26px;
}

.app-flow .app-price-value {
	display: inline-block;
	min-width: 140px;
	padding: 9px 22px;
	border-radius: 8px;
	background: var(--app-ink);
	color: #fff;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.2;
	text-align: center;
	white-space: nowrap;
}

.app-flow .app-price-note {
	margin-top: 5px;
	font-size: 11px;
	color: var(--app-muted);
}

/* Badges on the main product image */
.app-flow .app-gallery {
	position: relative;
}

.app-flow .app-gallery-tag {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 9;
	padding: 6px 10px;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.95);
	color: var(--app-ink);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	pointer-events: none;
}

.app-flow .app-gallery-badge {
	position: absolute;
	left: 14px;
	bottom: 14px;
	z-index: 9;
	display: flex;
	flex-direction: column;
	gap: 2px;
	max-width: 70%;
	padding: 8px 12px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.95);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	pointer-events: none;
}

.app-flow .app-gallery-badge strong {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	color: var(--app-ink);
}

.app-flow .app-gallery-badge span {
	font-size: 11px;
	color: var(--app-muted);
}

/* Narrow screens */
@media (max-width: 600px) {
	.app-style-dropdown {
		--app-row-label: 110px;
	}

	.app-flow .app-buy-row {
		flex-direction: column;
		align-items: stretch;
	}

	.app-flow .app-delivery {
		max-width: none;
	}

	.app-flow .app-price-box {
		padding-top: 0;
		align-items: stretch;
	}
}

/* Keep widths inside their column (themes don't always set border-box) */
.app-flow .app-fields,
.app-flow .app-fields *,
.app-flow .app-fields *::before,
.app-flow .app-fields *::after,
.app-flow.app-style-dropdown form.cart table.variations select {
	box-sizing: border-box;
}

/* "✦ Styled for tabletop display ...... Select a thumbnail to preview" */
.app-flow .app-gallery-caption {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 10px 0 0;
	font-family: 'Mulish', Arial, sans-serif;
	font-size: 12px;
	color: var(--app-muted);
}

.app-flow .app-gallery-note {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
	color: var(--app-ink);
}

.app-flow .app-gallery-hint {
	margin-left: auto;
	font-size: 11.5px;
}

/* Buttons layout: "= 16 Pieces" beside the stepper */
.app-flow .app-pieces-note {
	align-self: center;
	font-size: 13px;
	font-weight: 600;
	color: var(--app-muted);
}

/* Site already has its own delivery checker: price box alone, left-aligned */
.app-flow .app-buy-row.app-no-delivery {
	justify-content: flex-start;
	border-top: 0;
	padding-top: 0;
}

.app-flow .app-buy-row.app-no-delivery .app-price-box {
	padding-top: 0;
	align-items: flex-start;
}

/* ---------- Category options (Photo Products > Product Options) ---------- */

/* An option with a single value: shown like the dropdown, without the arrow. */
.app-flow .app-fixed-value {
	display: flex;
	align-items: center;
	width: 100%;
	max-width: var(--app-control-max, 340px);
	min-height: 46px;
	padding: 0 16px;
	border: 1px solid #4a4a57;
	border-radius: 8px;
	background: #fff;
	color: var(--app-text);
	font-size: 15px;
	font-weight: 500;
	box-sizing: border-box;
}

.app-flow .app-opt-row .app-row-label {
	cursor: default;
}
