/**
 * Request List styles (WoodMart-friendly).
 *
 * @package WhatsApp_Checkout
 */

.wcwac-rl {
	--wcwac-rl-accent: var( --wd-primary-color, #25d366 );
	--wcwac-rl-radius: var( --wd-btn-border-radius, 6px );
	--wcwac-rl-border: #e3e6ea;
	--wcwac-rl-muted: #777;
	margin-bottom: 2em;
}

/* ---- List table ---------------------------------------------------------- */

.wcwac-rl-table {
	width: 100%;
	border-collapse: collapse;
}

.wcwac-rl-table th,
.wcwac-rl-table td {
	padding: 12px 10px;
	border-bottom: 1px solid var(--wcwac-rl-border);
	vertical-align: middle;
	text-align: start;
}

.wcwac-rl-thumb img {
	width: 64px;
	height: 64px;
	object-fit: contain;
	display: block;
}

.wcwac-rl-name {
	font-weight: 600;
	text-decoration: none;
}

.wcwac-rl-variation,
.wcwac-rl-addons {
	color: var(--wcwac-rl-muted);
	font-size: 0.85em;
	margin-top: 2px;
}

.wcwac-rl-col-qty,
.wcwac-rl-qty {
	width: 110px;
}

.wcwac-rl-qty-input {
	width: 80px;
	max-width: 100%;
	text-align: center;
}

.wcwac-rl-col-note,
.wcwac-rl-note {
	width: 30%;
}

.wcwac-rl-remove-btn {
	background: transparent;
	border: 0;
	color: #b33;
	font-size: 1.4em;
	line-height: 1;
	cursor: pointer;
	padding: 0 6px;
}

/* ---- Note popovers ------------------------------------------------------- */

.wcwac-rl-note-wrap {
	position: relative;
	display: inline-block;
}

.wcwac-rl-note-btn {
	font-size: 0.85em !important;
	padding: 0.35em 0.9em !important;
	line-height: 1.2 !important;
}

.wcwac-rl-note-preview {
	display: none;
	margin-top: 6px;
	font-size: 0.85em;
	color: var(--wcwac-rl-muted);
	white-space: pre-wrap;
	word-break: break-word;
}

.wcwac-rl-note-wrap.has-note .wcwac-rl-note-preview {
	display: block;
}

.wcwac-rl-note-pop {
	position: absolute;
	inset-inline-start: 0;
	top: calc(100% + 6px);
	z-index: 30;
	width: 280px;
	max-width: 80vw;
	background: #fff;
	border: 1px solid var(--wcwac-rl-border);
	border-radius: var(--wcwac-rl-radius);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
	padding: 10px;
}

.wcwac-rl-note-pop textarea {
	width: 100%;
	box-sizing: border-box;
	resize: vertical;
}

.wcwac-rl-note-actions {
	display: flex;
	gap: 8px;
	margin-top: 8px;
}

.wcwac-rl-note-actions .button {
	font-size: 0.8em;
	padding: 0.4em 1em;
}

.wcwac-rl-general {
	margin: 1.5em 0;
}

/* ---- Actions ------------------------------------------------------------- */

.wcwac-rl-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 1em;
}

.wcwac-rl-actions .button,
.wcwac-rl-drawer-open {
	border-radius: var(--wcwac-rl-radius);
}

.wcwac-rl-message {
	font-size: 0.9em;
}

.wcwac-rl-message.is-error {
	color: #b00020;
}

.wcwac-rl-message.is-ok {
	color: #2e7d32;
}

/* ---- Toast --------------------------------------------------------------- */

.wcwac-rl-toast {
	position: fixed;
	inset-inline-end: 20px;
	bottom: 20px;
	z-index: 100050;
	max-width: min(320px, 85vw);
	background: #1f2b23;
	color: #fff;
	padding: 12px 16px;
	border-radius: var(--wcwac-rl-radius);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
	opacity: 0;
	transform: translateY(12px);
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.wcwac-rl-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* ---- Header mini-drawer -------------------------------------------------- */

.wcwac-rl-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(0, 0, 0, 0.45);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.wcwac-rl-overlay.is-visible {
	opacity: 1;
}

.wcwac-rl-drawer {
	position: fixed;
	top: 0;
	inset-inline-end: 0;
	z-index: 100001;
	width: 360px;
	max-width: 90vw;
	height: 100%;
	background: #fff;
	box-shadow: -2px 0 20px rgba(0, 0, 0, 0.15);
	display: flex;
	flex-direction: column;
	transform: translateX(105%);
	transition: transform 0.3s ease;
	visibility: hidden;
}

.wcwac-rl-drawer.is-open {
	transform: translateX(0);
	visibility: visible;
}

body.wcwac-rl-drawer-open {
	overflow: hidden;
}

.wcwac-rl-drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 18px;
	border-bottom: 1px solid var(--wcwac-rl-border);
}

.wcwac-rl-drawer-title {
	font-size: 1.05em;
	font-weight: 600;
}

.wcwac-rl-drawer-close {
	background: transparent;
	border: 0;
	font-size: 1.6em;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
	color: inherit;
}

.wcwac-rl-drawer-body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 8px 18px;
}

.wcwac-rl-drawer-items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wcwac-rl-drawer-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px 0;
	border-bottom: 1px solid var(--wcwac-rl-border);
}

.wcwac-rl-drawer-thumb img {
	width: 52px;
	height: 52px;
	object-fit: contain;
	display: block;
}

.wcwac-rl-drawer-info {
	flex: 1 1 auto;
	min-width: 0;
}

.wcwac-rl-drawer-name {
	font-weight: 600;
	text-decoration: none;
	font-size: 0.9em;
	display: block;
}

.wcwac-rl-drawer-meta,
.wcwac-rl-drawer-note {
	font-size: 0.78em;
	color: var(--wcwac-rl-muted);
	margin-top: 2px;
}

.wcwac-rl-drawer-qty {
	font-size: 0.85em;
	font-weight: 600;
	margin-top: 4px;
}

.wcwac-rl-drawer-remove {
	flex: 0 0 auto;
}

.wcwac-rl-drawer-foot {
	padding: 16px 18px;
	border-top: 1px solid var(--wcwac-rl-border);
}

.wcwac-rl-drawer-open {
	display: block;
	width: 100%;
	text-align: center;
}

.wcwac-rl-header .wcwac-rl-count-empty {
	display: none;
}

.wcwac-rl-added {
	opacity: 0.85;
}

/* ---- Confirmation -------------------------------------------------------- */

.wcwac-rl-confirmation ul.wcwac-rl-confirm-items {
	margin: 0 0 1em 1.2em;
}

.wcwac-rl-confirm-links {
	margin-top: 0.5em;
}

/* ---- Admin status pills -------------------------------------------------- */

.wcwac-rl-status {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 0.85em;
	background: #eee;
}
.wcwac-rl-status-submitted { background: #e5f0ff; }
.wcwac-rl-status-under_review { background: #fff3cd; }
.wcwac-rl-status-response_sent { background: #e2e3ff; }
.wcwac-rl-status-accepted { background: #dcf5e0; }
.wcwac-rl-status-rejected { background: #fde2e2; }
.wcwac-rl-status-cancelled { background: #e9e9e9; }

@media ( max-width: 767px ) {
	.wcwac-rl-note-pop {
		width: 240px;
	}
}
