/* -------------------------------------------------------------------------
 * MOAW Price Negotiation — Frontend
 * ------------------------------------------------------------------------- */

:root {
	--moaw-primary: #2c2c2c;
	--moaw-primary-hover: #000000;
	--moaw-primary-soft: rgba(44, 44, 44, 0.08);
	--moaw-text: #1e1e1e;
	--moaw-text-muted: #646970;
	--moaw-border: #dcdcde;
	--moaw-border-focus: #2c2c2c;
	--moaw-bg: #ffffff;
	--moaw-bg-soft: #f6f7f7;
	--moaw-radius: 0px;
	--moaw-radius-sm: 0px;
	--moaw-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
	--moaw-danger: #b32d2e;
	--moaw-success: #1a7a1a;
}

/* -------------------------------------------------------------------------
 * Offer CTA button
 * ------------------------------------------------------------------------- */

.moaw-offer-button {
	display: inline-block;
	margin: 8px 0;
	cursor: pointer;
}

/* Simple pill button — light black, solid black on hover */
.moaw-offer-button.button.alt {
	display: inline-block;
	background-color: #2c2c2c;
	border: 1px solid #2c2c2c;
	color: #ffffff;
	text-decoration: none;
	text-align: center;
	white-space: nowrap;
	padding: 0.65em 1.5em;
	font-size: 0.9em;
	font-weight: 500;
	letter-spacing: 0.02em;
	line-height: 1.3;
	box-shadow: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.moaw-offer-button.button.alt:hover,
.moaw-offer-button.button.alt:focus {
	background-color: #000000;
	border-color: #000000;
	color: #ffffff;
	box-shadow: none;
}

.moaw-offer-button.button.alt:active {
	background-color: #000000;
	border-color: #000000;
}

.moaw-offer-button--loop {
	display: block;
	width: 100%;
	margin: 6px 0 0;
	font-size: 0.85em;
	padding: 0.55em 1em;
}

.moaw-grouped-offer-row td {
	padding-top: 4px;
	padding-bottom: 10px;
}

/* -------------------------------------------------------------------------
 * Modal shell
 * ------------------------------------------------------------------------- */

.moaw-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
}

.moaw-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 15, 20, 0.55);
	backdrop-filter: blur(2px);
}

.moaw-modal__dialog {
	position: relative;
	background: var(--moaw-bg);
	color: var(--moaw-text);
	max-width: 480px;
	width: 100%;
	max-height: 88vh;
	overflow-y: auto;
	padding: 28px 26px 22px;
	border-radius: 10px;
	box-shadow: var(--moaw-shadow);
	border: 1px solid rgba(0, 0, 0, 0.06);
}

.moaw-modal__close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--moaw-bg-soft);
	border: 1px solid var(--moaw-border);
	border-radius: 50%;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	color: var(--moaw-text-muted);
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.moaw-modal__close:hover,
.moaw-modal__close:focus {
	background: #ebebeb;
	color: var(--moaw-text);
	border-color: #c3c4c7;
}

.moaw-modal__title {
	margin: 0 0 8px;
	font-size: 1.35em;
	font-weight: 700;
	line-height: 1.3;
	color: var(--moaw-text);
	padding-right: 28px;
}

/* -------------------------------------------------------------------------
 * Form fields — labels, inputs, textareas
 * ------------------------------------------------------------------------- */

.moaw-field {
	margin: 0 0 16px;
}

.moaw-field label {
	display: block;
	font-weight: 600;
	font-size: 0.9em;
	margin: 0 0 6px;
	color: var(--moaw-text);
	letter-spacing: 0.01em;
}

.moaw-field input[type="text"],
.moaw-field input[type="email"],
.moaw-field input[type="tel"],
.moaw-field input[type="number"],
.moaw-field textarea,
.moaw-modal input[type="text"],
.moaw-modal input[type="email"],
.moaw-modal input[type="tel"],
.moaw-modal input[type="number"],
.moaw-modal textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	font-size: 15px;
	line-height: 1.4;
	color: var(--moaw-text);
	background-color: var(--moaw-bg);
	border: 1px solid var(--moaw-border);
	border-radius: var(--moaw-radius-sm);
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
	appearance: none;
	-webkit-appearance: none;
}

.moaw-field input[type="number"] {
	-moz-appearance: textfield;
}

.moaw-field input[type="number"]::-webkit-outer-spin-button,
.moaw-field input[type="number"]::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.moaw-field textarea,
.moaw-modal textarea {
	min-height: 88px;
	resize: vertical;
	font-family: inherit;
}

.moaw-field input:hover,
.moaw-field textarea:hover,
.moaw-modal input:hover,
.moaw-modal textarea:hover {
	border-color: #b5b5b8;
}

.moaw-field input:focus,
.moaw-field textarea:focus,
.moaw-modal input:focus,
.moaw-modal textarea:focus {
	outline: none;
	border-color: var(--moaw-border-focus);
	box-shadow: 0 0 0 3px var(--moaw-primary-soft);
	background-color: #fff;
}

.moaw-field input::placeholder,
.moaw-field textarea::placeholder {
	color: #a0a5aa;
	opacity: 1;
}

.moaw-field input:disabled,
.moaw-field textarea:disabled {
	background: var(--moaw-bg-soft);
	color: var(--moaw-text-muted);
	cursor: not-allowed;
	opacity: 0.85;
}

/* -------------------------------------------------------------------------
 * Text / helper lines
 * ------------------------------------------------------------------------- */

.moaw-original-price {
	margin: 0 0 18px;
	padding: 10px 12px;
	font-size: 14px;
	line-height: 1.45;
	color: var(--moaw-text-muted);
	background: var(--moaw-bg-soft);
	border-radius: var(--moaw-radius-sm);
	border-left: 3px solid var(--moaw-primary);
}

.moaw-original-price .amount,
.moaw-original-price bdi {
	font-weight: 700;
	color: var(--moaw-text);
}

.moaw-total-line {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 16px;
	padding: 12px 14px;
	font-weight: 600;
	font-size: 0.95em;
	color: var(--moaw-text);
	background: var(--moaw-primary-soft);
	border-radius: var(--moaw-radius-sm);
}

.moaw-offer-total {
	font-size: 1.15em;
	font-weight: 700;
	color: var(--moaw-primary);
}

.moaw-form-message {
	margin: 0 0 14px;
	padding: 10px 12px;
	font-weight: 600;
	font-size: 0.9em;
	line-height: 1.4;
	border-radius: var(--moaw-radius-sm);
}

.moaw-form-message:empty {
	display: none;
}

.moaw-form-message.error {
	color: var(--moaw-danger);
	background: #fcf0f1;
	border: 1px solid #f1c6c8;
}

.moaw-form-message.success {
	color: var(--moaw-success);
	background: #edf7ed;
	border: 1px solid #b8dfb9;
}

.moaw-success-message {
	padding: 12px 0 4px;
	font-size: 0.95em;
	line-height: 1.55;
	color: var(--moaw-text);
}

.moaw-success-message p {
	margin: 0 0 0.6em;
}

/* -------------------------------------------------------------------------
 * Submit button
 * ------------------------------------------------------------------------- */

.moaw-actions {
	margin: 4px 0 0;
}

.moaw-submit-offer.button.alt,
.moaw-actions .button.alt {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 0.8em 1.4em;
	font-size: 0.95em;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: #ffffff;
	background-color: #2c2c2c;
	border: 1px solid #2c2c2c;
	cursor: pointer;
	box-shadow: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.moaw-submit-offer.button.alt:hover,
.moaw-submit-offer.button.alt:focus,
.moaw-actions .button.alt:hover,
.moaw-actions .button.alt:focus {
	background-color: #000000;
	border-color: #000000;
	color: #ffffff;
	box-shadow: none;
}

.moaw-submit-offer.button.alt:active,
.moaw-actions .button.alt:active {
	background-color: #000000;
	border-color: #000000;
}

.moaw-submit-offer.button.alt:disabled,
.moaw-actions .button.alt:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	box-shadow: none;
}

/* -------------------------------------------------------------------------
 * Status badges (My Account)
 * ------------------------------------------------------------------------- */

.moaw-status {
	display: inline-block;
	padding: 3px 10px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	line-height: 1.4;
	background: #eee;
	color: #50575e;
}

.moaw-status--pending {
	background: #fff3cd;
	color: #7a5b00;
}

.moaw-status--accepted,
.moaw-status--completed {
	background: #d4edda;
	color: #155724;
}

.moaw-status--rejected,
.moaw-status--cancelled,
.moaw-status--expired {
	background: #f8d7da;
	color: #721c24;
}

.moaw-status--countered {
	background: #cfe2ff;
	color: #084298;
}

/* -------------------------------------------------------------------------
 * Personalized price on product page
 * ------------------------------------------------------------------------- */

.moaw-personalized-price del {
	opacity: 0.55;
	margin-right: 6px;
}

.moaw-personalized-price ins {
	text-decoration: none;
	font-weight: 700;
	color: var(--moaw-success);
}

.moaw-personalized-price__label {
	font-size: 0.8em;
	font-weight: 600;
	color: var(--moaw-success);
	margin-left: 4px;
}

.moaw-personalized-price__qty {
	display: block;
	font-weight: 400;
	color: var(--moaw-text-muted);
}

/* -------------------------------------------------------------------------
 * My Account offers table (responsive)
 * ------------------------------------------------------------------------- */

.moaw-my-offers-table td[data-title]::before {
	content: attr(data-title) ": ";
	font-weight: 600;
	display: none;
}

@media (max-width: 600px) {
	.moaw-my-offers-table thead {
		display: none;
	}

	.moaw-my-offers-table,
	.moaw-my-offers-table tbody,
	.moaw-my-offers-table tr,
	.moaw-my-offers-table td {
		display: block;
		width: 100%;
	}

	.moaw-my-offers-table td[data-title]::before {
		display: inline;
	}

	.moaw-modal__dialog {
		padding: 22px 18px 18px;
		border-radius: 8px;
	}
}
