/* SuperPet Auto Orders — frontend blocks (product / cart / checkout) */

:root {
	--spao-accent: #ea005a;
	--spao-cashback: #1aa83b;
	--spao-border: #e6e6e6;
	--spao-radius: 12px;
}

/* ------------------------------------------------------------------ */
/* Product page block                                                 */
/* ------------------------------------------------------------------ */
.spao-product-block {
	margin: 16px 0 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.spao-pb-subtitle {
	font-size: 15px;
	font-weight: 600;
	color: #222;
}

.spao-option {
	position: relative;
	display: flex;
	gap: 12px;
	padding: 14px 16px;
	border: 1.5px solid var(--spao-border);
	border-radius: var(--spao-radius);
	cursor: pointer;
	transition: border-color .15s ease, box-shadow .15s ease;
	background: #fff;
}

.spao-option.is-selected {
	border-color: var(--spao-accent);
	box-shadow: 0 0 0 1px var(--spao-accent) inset;
}

.spao-option .spao-pb-radio {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.spao-option__control {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin-top: 2px;
	border: 2px solid #c5c5c5;
	border-radius: 50%;
	transition: border-color .15s ease;
}

.spao-option.is-selected .spao-option__control {
	border-color: var(--spao-accent);
	box-shadow: inset 0 0 0 4px var(--spao-accent);
}

.spao-option__body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.spao-option__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
}

.spao-option__title {
	font-size: 16px;
	font-weight: 600;
	color: #222;
}

.spao-option__price {
	font-size: 18px;
	font-weight: 700;
	color: #222;
	white-space: nowrap;
}

.spao-cashback-badge {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	border-radius: 100px;
	background: rgba(26, 168, 59, .12);
	color: var(--spao-cashback);
	font-size: 13px;
	font-weight: 600;
}

.spao-bullets {
	list-style: none;
	margin: 4px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.spao-bullet {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	color: #444;
}

.spao-bullet__icon {
	width: 22px;
	height: 22px;
	object-fit: contain;
	flex: 0 0 auto;
}

/* ------------------------------------------------------------------ */
/* Cart / checkout auto-order block + toggles                         */
/* ------------------------------------------------------------------ */
.spao-block {
	border: 1.5px solid var(--spao-border);
	border-radius: var(--spao-radius);
	padding: 18px 20px;
	margin: 16px 0;
	background: #fff;
}

.spao-block.spao-loading {
	opacity: .5;
	pointer-events: none;
}

.spao-block__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

.spao-block__title {
	font-size: 17px;
	font-weight: 700;
	color: #222;
	margin: 0;
}

.spao-block__subtitle {
	font-size: 14px;
	color: #666;
	margin: 4px 0 0;
}

.spao-block .spao-bullets {
	margin-top: 14px;
}

/* iOS-style switch */
.spao-switch {
	position: relative;
	display: inline-block;
	width: 46px;
	height: 26px;
	flex: 0 0 auto;
}

.spao-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.spao-switch .spao-switch__slider {
	position: absolute;
	inset: 0;
	background: #ccc;
	border-radius: 100px;
	transition: background .15s ease;
	cursor: pointer;
}

.spao-switch .spao-switch__slider::before {
	content: "";
	position: absolute;
	height: 20px;
	width: 20px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform .15s ease;
}

.spao-switch input:checked + .spao-switch__slider,
.spao-switch.is-on .spao-switch__slider {
	background: var(--spao-accent);
}

.spao-switch input:checked + .spao-switch__slider::before,
.spao-switch.is-on .spao-switch__slider::before {
	transform: translateX(20px);
}

/* per-item toggle row */
.spao-item-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #444;
	margin-top: 6px;
}

/* checkout click-based toggle (no <input>; survives wp_kses_post) */
.spao-item-toggle--js {
	cursor: pointer;
	user-select: none;
}

/* Cashback line in totals + auto-order totals block */
.spao-cashback-row th,
.spao-cashback-row td,
.spao-cashback-amount-line {
	color: var(--spao-cashback) !important;
	font-weight: 600;
}

.spao-auto-totals {
	margin-top: 14px;
	border-top: 1px dashed var(--spao-border);
	padding-top: 14px;
}

.spao-auto-totals__title {
	font-size: 15px;
	font-weight: 700;
	margin: 0 0 8px;
}

.spao-auto-totals__row {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	font-size: 14px;
	padding: 4px 0;
}

.spao-auto-totals__row--cashback {
	color: var(--spao-cashback);
	font-weight: 600;
}

/* Checkout carousel */
.spao-carousel {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	padding: 6px 0 10px;
}

.spao-carousel__item {
	flex: 0 0 auto;
	width: 90px;
	text-align: center;
}

.spao-carousel__item img {
	width: 90px;
	height: 90px;
	object-fit: cover;
	border-radius: 10px;
	border: 1px solid var(--spao-border);
}

.spao-carousel__cashback {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	font-weight: 600;
	color: var(--spao-cashback);
}

.spao-field {
	margin-top: 14px;
}

.spao-field label {
	display: block;
	font-size: 13px;
	color: #666;
	margin-bottom: 4px;
}

.spao-field select {
	width: 100%;
}

.spao-next-charge {
	margin-top: 12px;
	font-size: 14px;
	color: #444;
}

.spao-next-charge strong {
	color: #222;
}

.spao-hint {
	margin-top: 12px;
	font-size: 12px;
	color: #888;
}
