/**
 * SP Order Lists — minimal frontend styles.
 *
 * The account tables and buttons reuse the theme's komet-* component library
 * (owned by the design/Elementor conveyor); this file only styles the few
 * plugin-owned affordances (toast, PDP action cluster, quick-order block,
 * active heart state) so they work before the theme CSS lands.
 *
 * RTL: the site is dir="rtl"; logical properties are used throughout.
 */

.sp-ol-pdp-actions,
.sp-ol-elementor-actions {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
	margin-block-start: 10px;
}

/* Active favorite heart. */
.sp-ol-fav.is-on,
.komet-card__fav.is-on {
	color: var(--error, #cc3344);
}
.sp-ol-fav.is-on span,
.komet-card__fav.is-on span {
	content: "\2665"; /* filled heart handled via JS class + this hint */
}

/* Quick order block. */
.sp-ol-quick-order {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.sp-ol-qo__paste-input {
	width: 100%;
	direction: ltr;
	font-family: "IBM Plex Mono", ui-monospace, monospace;
}
.sp-ol-qo__report {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.sp-ol-qo__line {
	font-size: 0.9rem;
	padding: 4px 8px;
	border-inline-start: 3px solid transparent;
}
.sp-ol-qo__line.is-ok {
	border-inline-start-color: #1f9d57;
}
.sp-ol-qo__line.is-warn {
	border-inline-start-color: #e0a200;
}
.sp-ol-qo__line.is-error {
	border-inline-start-color: #d83a2c;
	color: #b3242f;
}

/* Toast. */
.sp-ol-toast {
	position: fixed;
	inset-block-end: 20px;
	inset-inline-start: 20px;
	z-index: 9999;
	max-width: min(360px, 90vw);
	padding: 12px 16px;
	border-radius: 8px;
	background: #173557;
	color: #fff;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
	font-size: 0.92rem;
	opacity: 1;
	transition: opacity 0.3s ease, transform 0.3s ease;
}
.sp-ol-toast.is-out {
	opacity: 0;
	transform: translateY(8px);
}
.sp-ol-toast--warn {
	background: #8a5b00;
}
.sp-ol-toast--error {
	background: #b3242f;
}

/* Minimal link-styled button used in list tables. */
.komet-linkbtn {
	background: none;
	border: 0;
	padding: 0;
	color: var(--brand, #0069b4);
	cursor: pointer;
	text-decoration: underline;
	font: inherit;
}

/* Popular products shortcode fallback list. */
.sp-ol-popular {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 8px;
}
.sp-ol-popular__price {
	color: var(--text-soft, #69756f);
	font-weight: 600;
}

/* Quick-order interactive rows (FR-10). */
.sp-ol-qo__lines {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.sp-ol-qo__row {
	display: flex;
	gap: 8px;
	align-items: center;
}
.sp-ol-qo__row .sp-ol-qo__sku {
	flex: 1 1 auto;
	min-width: 0;
	direction: ltr;
}
.sp-ol-qo__row .sp-ol-qo__qty {
	flex: 0 0 84px;
	width: 84px;
}
.sp-ol-qo__row-remove {
	flex: 0 0 auto;
	font-size: 1.1rem;
	line-height: 1;
}
.sp-ol-qo__rows-controls {
	display: flex;
	gap: 8px;
	margin-block-start: 10px;
	flex-wrap: wrap;
}

/* Order-again preview modal (FR-6). */
.sp-ol-modal {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(23, 53, 87, 0.45);
}
.sp-ol-modal__dialog {
	background: var(--surface, #fff);
	color: var(--text, #13201e);
	border-radius: 12px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.24);
	width: min(560px, 100%);
	max-height: 84vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.sp-ol-modal__head,
.sp-ol-modal__foot {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 18px;
}
.sp-ol-modal__head {
	justify-content: space-between;
	border-block-end: 1px solid var(--line, #e3e8e7);
}
.sp-ol-modal__title {
	margin: 0;
	font-size: 1.05rem;
}
.sp-ol-modal__close {
	background: none;
	border: 0;
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	color: inherit;
}
.sp-ol-modal__body {
	padding: 12px 18px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.sp-ol-modal__row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 6px 0;
	border-block-end: 1px solid var(--line, #eef2f1);
}
.sp-ol-modal__name {
	flex: 1 1 auto;
	min-width: 0;
}
.sp-ol-modal__qty {
	flex: 0 0 84px;
	width: 84px;
}
.sp-ol-modal__row.is-unavailable .sp-ol-modal__name {
	color: var(--text-soft, #69756f);
	text-decoration: line-through;
}
.sp-ol-modal__badge {
	flex: 0 0 auto;
	font-size: 0.82rem;
	color: #b3242f;
}
.sp-ol-modal__foot {
	justify-content: flex-end;
	border-block-start: 1px solid var(--line, #e3e8e7);
}
