/* OptionGravity Extra Product Options — front-end form. */

.og-epo {
	--og-epo-border: #e3e5e8;
	--og-epo-bg: #fafbfc;
	--og-epo-accent: #111827;
	--og-epo-radius: 10px;
	margin: 1.25em 0 1.5em;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.og-epo-section {
	background: var( --og-epo-bg );
	border: 1px solid var( --og-epo-border );
	border-radius: var( --og-epo-radius );
	padding: 16px 18px;
}

.og-epo-section-title {
	margin: 0 0 12px;
	padding-bottom: 10px;
	border-bottom: 1px solid var( --og-epo-border );
	font-size: 1em;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: var( --og-epo-accent );
}

.og-epo-field {
	margin: 0 0 14px;
}

.og-epo-section .og-epo-field:last-child {
	margin-bottom: 0;
}

.og-epo-labelrow {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	margin: 0 0 6px;
}

.og-epo-label {
	font-weight: 500;
	color: #1f2328;
	line-height: 1.3;
}

.og-epo-required {
	color: #c0392b;
	margin-left: 2px;
	cursor: help;
}

.og-epo-price,
.og-epo-choice-price {
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
	font-weight: 600;
	font-size: 0.8em;
	color: #0a6b3f;
	background: #e6f6ec;
	border-radius: 999px;
	padding: 2px 9px;
	flex-shrink: 0;
}

.og-epo-input {
	max-width: 100%;
}

/* Text / textarea / select. */
.og-epo-field input[type="text"],
.og-epo-field textarea,
.og-epo-select-wrap select {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid var( --og-epo-border );
	border-radius: 8px;
	padding: 9px 12px;
	font-size: 0.95em;
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.og-epo-field input[type="text"]:focus,
.og-epo-field textarea:focus,
.og-epo-select-wrap select:focus {
	outline: none;
	border-color: var( --og-epo-accent );
	box-shadow: 0 0 0 3px rgba( 17, 24, 39, 0.08 );
}

.og-epo-field textarea {
	min-height: 80px;
	resize: vertical;
}

.og-epo-select-wrap {
	position: relative;
}

.og-epo-select-wrap select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 34px;
	cursor: pointer;
}

.og-epo-select-wrap::after {
	content: "";
	position: absolute;
	right: 13px;
	top: 50%;
	width: 8px;
	height: 8px;
	border-right: 2px solid #6b7280;
	border-bottom: 2px solid #6b7280;
	transform: translateY(-70%) rotate(45deg);
	pointer-events: none;
}

/* Choice chips (radio / checkbox). */
.og-epo-choices {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.og-epo-choice {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 400;
	font-size: 0.92em;
	border: 1.5px solid var( --og-epo-border );
	border-radius: 999px;
	padding: 7px 14px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.og-epo-choice:hover {
	border-color: #b7bcc3;
}

.og-epo-choice input[type="radio"],
.og-epo-choice input[type="checkbox"] {
	accent-color: var( --og-epo-accent );
	margin: 0;
}

.og-epo-choice:has(input:checked) {
	border-color: var( --og-epo-accent );
	background: #f1f2f4;
}

.og-epo-choice-label {
	line-height: 1.2;
}

/* Range. */
.og-epo-range-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
}

.og-epo-range-wrap input[type="range"] {
	flex: 1;
	accent-color: var( --og-epo-accent );
}

.og-epo-range-out {
	display: inline-flex;
	min-width: 2.4em;
	justify-content: center;
	font-weight: 600;
	font-size: 0.85em;
	background: #eef0f2;
	border-radius: 999px;
	padding: 3px 10px;
}

/* Color. */
.og-epo-color-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
}

.og-epo-color-input {
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1.5px solid var( --og-epo-border );
	border-radius: 50%;
	cursor: pointer;
	overflow: hidden;
	background: none;
}

.og-epo-color-input::-webkit-color-swatch-wrapper {
	padding: 0;
	border-radius: 50%;
}

.og-epo-color-input::-webkit-color-swatch {
	border: none;
	border-radius: 50%;
}

.og-epo-color-hex {
	font-size: 0.85em;
	font-weight: 600;
	letter-spacing: 0.03em;
	color: #555;
	text-transform: uppercase;
}

/* File. */
.og-epo-file {
	position: relative;
	display: flex;
	align-items: center;
	border: 1.5px dashed var( --og-epo-border );
	border-radius: 8px;
	padding: 9px 12px;
	cursor: pointer;
	background: #fff;
	transition: border-color 0.15s ease;
}

.og-epo-file:hover {
	border-color: #b7bcc3;
}

.og-epo-file input[type="file"] {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
}

.og-epo-file-cta {
	font-size: 0.9em;
	color: #555;
}

/* Total. */
.og-epo-total {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 0;
	padding: 10px 16px;
	background: #111827;
	color: #fff;
	border-radius: var( --og-epo-radius );
	font-weight: 600;
}

.og-epo-total-label {
	font-size: 0.85em;
	font-weight: 500;
	opacity: 0.75;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.og-epo-total-value {
	font-size: 1.05em;
}
