/* Previously Ordered Items for WooCommerce – front.css */

/* ── Wrapper ──────────────────────────────────────────────────────────────── */
.poi-wrapper {
	font-size: 14px;
	color: #333;
}

.poi-heading {
	font-size: 1.8em;
	font-weight: 700;
	margin-bottom: .4em;
}

.poi-intro {
	color: #555;
	margin-bottom: 1.2em;
	line-height: 1.6;
}

.poi-no-products {
	color: #777;
	padding: 1.5em 0;
}

/* ── Notices ──────────────────────────────────────────────────────────────── */
.poi-notice {
	padding: .8em 1.2em .8em 3em;
	margin-bottom: 1em;
	border-radius: 4px;
	animation: poi-fade-in .2s ease;
}

@keyframes poi-fade-in {
	from { opacity: 0; transform: translateY(-4px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ── Controls bar ─────────────────────────────────────────────────────────── */
.poi-controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1.2em;
	flex-wrap: wrap;
	gap: .75em;
}

.poi-toggle-wrap {
	display: flex;
	align-items: center;
	gap: .7em;
}

.poi-toggle-label {
	color: #444;
	font-size: .95em;
}

/* Toggle switch */
.poi-switch {
	position: relative;
	display: inline-block;
	width: 42px;
	height: 24px;
	flex-shrink: 0;
}

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

.poi-switch-slider {
	position: absolute;
	cursor: pointer;
	top: 0; left: 0; right: 0; bottom: 0;
	background: #ccc;
	border-radius: 24px;
	transition: background .2s;
}

.poi-switch-slider::before {
	content: '';
	position: absolute;
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform .2s;
	box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.poi-switch input:checked + .poi-switch-slider {
	background: #228800; /* overridden by inline style for accent */
}

.poi-switch input:checked + .poi-switch-slider::before {
	transform: translateX(18px);
}

/* Sort */
.poi-sort-wrap {
	display: flex;
	align-items: center;
}

.poi-sort-select-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.woocommerce .woocommerce-MyAccount-content .poi-sort {
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: .54em 2.2em .54em .7em;
	font-size: 1em;
	background: #fff;
	cursor: pointer;
	color: #333;
	appearance: none;
	-webkit-appearance: none;
	min-width: 160px;
	line-height: 1.4;
}

.poi-sort:focus {
	outline: none;
	border-color: #aaa;
}

.poi-sort-chevron {
	position: absolute;
	right: .55em;
	pointer-events: none;
	color: #666;
	flex-shrink: 0;
}

/* ── Product list ─────────────────────────────────────────────────────────── */
.poi-list {
	display: flex;
	flex-direction: column;

}

/* ── Product item ─────────────────────────────────────────────────────────── */
.poi-item {
	display: flex;
	align-items: center;
	background: #fff;
	border: 1px solid #e8e8e8;
	padding: 1.1em 1.2em;
	gap: 1.1em;
	transition: box-shadow .15s, opacity .28s;
	position: relative;
	margin-top: -1px;
}
.poi-item:first-child {
    border-top-right-radius:6px;
       border-top-left-radius:6px;
}
.poi-item:last-child {
    border-bottom-right-radius:6px;
       border-bottom-left-radius:6px;
}
.poi-item.poi-item--discontinued {
    padding: 3em 1.2em 1.1em;

}
.poi-item:hover {
	background: #f8f8f8;
}

.poi-item--discontinued {
	opacity: .85;
}

.poi-item--removing {
	opacity: 0;
	transform: translateX(16px);
	transition: opacity .28s ease, transform .28s ease;
}

/* Thumbnail */
.poi-item__thumb {
	flex-shrink: 0;
	width: 78px;
}

.poi-item__thumb img {
	width: 78px;
	height: 78px;
	object-fit: cover;
	border-radius: 4px;
	background: #f8f8f8;
	display: block;
}

/* Details column — price, sku, name, nickname */
.poi-item__details {
	flex: 1 1 0;
	min-width: 0;
}

/* Variations column — sits between details and actions for variable products */
.poi-item__variations {
    flex: 0 0 auto;
    min-width: 220px;
    display: flex;
    flex-direction: row;
    gap: .45em;
    justify-content: flex-end;
    text-align: left;
}

.poi-item__variation-row {
    display: flex;
    align-items: flex-start;
    gap: .25em;
    font-size: .85em;
    white-space: nowrap;
    flex-direction: column;
    text-align: center;

}

.poi-variation__label {
	font-weight: 600;
	color: #333;
	    text-align: left;
	min-width: 70px;
}

.poi-variation__price {
	color: #555;
	    text-align: left;
	min-width: 55px;
}

.poi-variation--unavailable {
	opacity: .5;
}

.poi-variation__unavailable {
	font-size: .8em;
	color: #999;
	font-style: italic;
}

/* Actions column — hide button, qty stepper, add to cart */
.poi-item__actions {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: flex-start;
	gap: .65em;
	min-width: 160px;
}
	object-fit: contain;
	border-radius: 4px;
	background: #f8f8f8;
}

/* Details column */

.poi-item__price {
	font-size: 1.3em;
	font-weight: 700;
	color: #222;
	margin-bottom: .15em;
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: .4em;
}

.poi-item__price .woocommerce-Price-amount {
	font-size: 1em;
	font-wegiht: bold;
}

.poi-item__excl-gst {
	font-size: .55em;
	font-weight: 400;
	color: #888;
	letter-spacing: .02em;
}

.poi-item__sku {
	font-size: .8em;
	color: #888;
	margin-bottom: .25em;
}

.poi-item__name-wrap {
	margin-bottom: .2em;
}

.poi-item__name,
.poi-item__nickname {
	font-size: 1em;
	font-weight: 700;
	color: #222;
	display: block;
}

.poi-item__realname {
	font-size: .9em;
	color: #aaa;
	display: block;
	text-decoration: line-through;
	margin-top: .05em;
}

.poi-item__desc {
	font-size: .82em;
	color: #999;
	margin-bottom: .4em;
	line-height: 1.4;
}

/* Nickname toggle */
.poi-nickname-toggle {
	display: inline-flex;
	align-items: center;
	gap: .3em;
	font-size: .8em;
	color: #228800;
	text-decoration: none;
	margin-top: .3em;
	cursor: pointer;
	transition: color .15s;
}

.poi-nickname-toggle:hover {
	color: #333;
}

/* Nickname form */
.poi-nickname-form {
	display: flex;
	align-items: center;
	gap: .4em;
	margin-top: .45em;
}

.poi-nickname-form input[name="nickname"] {
	flex: 1 1 0;
	min-width: 0;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: .9em;
	font-size: .9em;
	color: #333;
	    height: 40px;
    box-sizing: border-box;
}

.poi-nickname-form input[name="nickname"]:focus {
	outline: none;
	border-color: #aaa;
}

.woocommerce .woocommerce-MyAccount-content button.poi-nickname-form__save,
.woocommerce .woocommerce-MyAccount-content button.poi-nickname-form__clear {
	background: none;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding:.655em .55em!important;
	margin: 0!important;
	cursor: pointer;
	color: #555;
	font-size: .9em;
	line-height: 1;
	transition: background .15s, color .15s;
	display: flex;
	align-items: center;
	    height: 40px;
    width: 40px;
    text-align: center;
    box-sizing: border-box;
        justify-content: center;
}

.poi-nickname-form__save:hover { background: #f0f0f0; color: #111; }
.poi-nickname-form__clear:hover { background: #fee; color: #c33; border-color: #c33; }

/* Actions column */

/* Hide / unhide button */
.poi-hide-btn,
.poi-unhide-btn {
	background: none;
	border: none;
	cursor: pointer;
	font-size: .8em;
	color: #999;
	padding: 0;
	display: inline-flex;
	align-items: center;
	gap: .25em;
	transition: color .15s;
	line-height: 1;
}

.poi-hide-btn:hover   { color: #c33; }
.poi-unhide-btn:hover { color: #090; }
.poi-hide-btn svg path {
    	color: #999;
    	fill: #999;
}
.poi-hide-btn:hover svg path {
    	color: #c33;
    	fill: #c33;
}
/* Quantity stepper */
.poi-qty-wrap {
	display: flex;
	align-items: center;
	border: 1px solid #ddd;
	border-radius: 5px;
	overflow: hidden;
	background: #fff;
	height: 40px;
	min-height: 40px;
	max-height: 40px;
	box-sizing: border-box;
}

.poi-qty-btn {
	background: #f4f4f4;
	border: none;
	width: 32px;
	height: 40px;
	min-height: 40px;
	max-height: 40px;
	cursor: pointer;
	font-size: 1rem;
	color: #555;
	transition: background .15s;
	line-height: 40px;
	box-sizing: border-box;
	padding: 0;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.poi-qty-btn:hover {
	background: #e8e8e8;
}

.poi-qty-input {
	width: 42px;
	border: none;
	text-align: center;
	font-size: .875rem;
	font-weight: 600;
	color: #222;
	height: 40px;
	min-height: 40px;
	max-height: 40px;
	padding: 0;
	box-sizing: border-box;
	line-height: 40px;
	-moz-appearance: textfield;
}

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

/* Add to cart button */
.poi-item__actions .poi-add-to-cart,
.poi-item__actions .poi-view-product,
.poi-item__actions .poi-replacement-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .4rem;
	height: 36px;
	min-height: 36px;
	max-height: 36px;
	padding: 0 1.1rem;
	border-radius: 50px;
	font-weight: 600;
	font-size: .875rem;
	color: #fff !important;
	text-decoration: none;
	cursor: pointer;
	transition: filter .15s, transform .1s;
	white-space: nowrap;
	border: none;
	box-sizing: border-box;
	line-height: 1;
	vertical-align: middle;
	overflow: hidden;
}

/* Prevent themes from stretching or shrinking the cart icon */
.poi-item__actions .poi-add-to-cart svg,
.poi-item__actions .poi-view-product svg,
.poi-item__actions .poi-replacement-btn svg,
.poi-out-of-stock-btn svg {
	flex-shrink: 0;
	width: 16px !important;
	height: 16px !important;
	display: block;
}

.poi-item__actions .poi-add-to-cart:hover,
.poi-item__actions .poi-view-product:hover,
.poi-item__actions .poi-replacement-btn:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
}

.poi-item__actions .poi-add-to-cart.loading {
	opacity: .7;
	cursor: wait;
}

.poi-item__actions .poi-add-to-cart.poi-added {
	filter: brightness(0.88);
	cursor: default;
	color: #fff !important;
}

/* Discontinued badge on past orders page */
.poi-disc-badge {
font-size: .75rem;
    font-weight: 700;
    padding: 0 3px;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: .05em;
    position: absolute;
    left: 1.2em;
    top: 1.1em;
}

/* Out of stock — same shape as Add to Cart but at 40% opacity */
.poi-out-of-stock-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .4rem;
	height: 40px;
	min-height: 40px;
	max-height: 40px;
	padding: 0 1.1rem;
	border-radius: 50px;
	font-weight: 600;
	font-size: .875rem;
	border: none;
	cursor: not-allowed;
	opacity: .4;
	white-space: nowrap;
	box-sizing: border-box;
	line-height: 1;
	vertical-align: middle;
	overflow: hidden;
	/* Colour set via inline style matching accent colour — see template */
}

/* ── Single product page: discontinued banner ─────────────────────────────── */
.poi-disc-banner-wrap {
	margin-bottom: 1.4em;
	line-height: 1.8;
}

.poi-disc-banner {
	/* True inline highlighter — colour only behind the text, not full width */
	display: inline;
	background-color: var(--poi-disc-bg, #E44C3A);
	color: var(--poi-disc-color, #ffffff) !important;
	font-weight: 700;
	font-size: 18px;
	padding: .15em .5em;
	border-radius: 2px;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
	line-height: 1.7;
}

.poi-replacement-link.button,
a.poi-replacement-link {
	display: inline-block !important;
	margin-top: .6em;
	margin-bottom: 1.2em;
	padding: .65rem 1.4rem !important;
	background-color: var(--poi-accent, #228800) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 50px !important;
	font-weight: 600 !important;
	font-size: 1rem !important;
	text-decoration: none !important;
	cursor: pointer;
	transition: filter .15s;
	box-sizing: border-box;
	line-height: 1;
}

.poi-replacement-link.button:hover,
a.poi-replacement-link:hover {
	filter: brightness(1.1);
	color: #fff !important;
}

.poi-replacement-link {
	display: inline-block;
	margin-bottom: 1.2em;
}

/* ── Alternatives grid ────────────────────────────────────────────────────── */
.poi-alternatives {
	margin-top: 2.5em;
	padding-top: 1.5em;
	border-top: 1px solid #eee;
}

.poi-alternatives__heading {
	font-size: 1em;
	font-weight: 700;
	letter-spacing: .08em;
	text-align: center;
	margin-bottom: 1.4em;
	color: #222;
}

.poi-alternatives__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 1.2em;
}

.poi-alternatives__item {
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .5em;
}

.poi-alternatives__img img {
	width: 100%;
	max-width: 160px;
	height: 160px;
	object-fit: contain;
	border-radius: 4px;
	background: #f8f8f8;
}

.poi-alternatives__name {
	font-size: .85em;
	font-weight: 600;
	color: #333;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: .03em;
	line-height: 1.3;
}

.poi-alternatives__name:hover { color: #000; }

.poi-alternatives__price {
	font-size: .95em;
	color: #444;
}

.poi-alternatives__btn {
	font-size: .8rem;
	padding: .5rem 1.1rem;
	background: #222 !important;
	color: #fff !important;
	border-radius: 3px;
	text-decoration: none;
	font-weight: 600;
	letter-spacing: .03em;
	transition: background .15s;
	box-sizing: border-box;
	line-height: 1;
}

.poi-alternatives__btn:hover {
	background: #000 !important;
	color: #fff !important;
}

@media (max-width: 640px) {
	.poi-item {
		flex-wrap: wrap;
		gap: .8em;
	}

	.poi-item__thumb {
		width: 56px;
	}

	.poi-item__thumb img {
		width: 56px;
		height: 56px;
	}

	.poi-item__actions {
		flex-direction: row;
		flex-wrap: wrap;
		width: 100%;
		min-width: 0;
		justify-content: flex-start;
		border-top: 1px solid #f0f0f0;
		padding-top: .6em;
	}

	.poi-hide-btn,
	.poi-unhide-btn {
		position: static;
		order: -1;
		flex-basis: 100%;
	}

	.poi-controls {
		flex-direction: column;
		align-items: flex-start;
	}
}


