/**
 * Make an Offer — витрина: кнопка на странице товара, модалка, страница оффера.
 * Палитра бренда: крем #FCF8EF, волосок #E4D9C3, латунь #876A39, чернила #1C160D.
 */

/* ── кнопка на странице товара ──
   Стиль даёт тема (классы .button.alt в разметке) — кнопка выглядит как
   Add to basket / Buy Now. Здесь только раскладка иконки внутри. */
.fnf-offer-wrap { margin: 2px 0 4px; }

.fnf-offer-open.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

/* ── модалка ── */
.fnf-offer-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(28, 22, 13, .55);
	z-index: 9998;
}
.fnf-offer-modal {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: min(460px, calc(100vw - 32px));
	max-height: calc(100vh - 40px);
	overflow: auto;
	background: #fffdf8;
	border: 1px solid #e4d9c3;
	border-radius: 14px;
	box-shadow: 0 18px 50px rgba(28, 22, 13, .25);
	padding: 26px 26px 22px;
	z-index: 9999;
	text-align: left;
}
/* ⚠️ Flatsome стилизует голые <button> (min-width/padding/line-height) —
   без жёстких override крестик раздувается в большой овал */
.fnf-offer-close {
	position: absolute;
	top: 10px;
	right: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px !important;
	height: 34px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0;
	border-radius: 50%;
	background: #fcf8ef;
	color: #876a39;
	font-size: 20px;
	line-height: 1 !important;
	box-shadow: none;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}
.fnf-offer-close:hover { background: #f4ead7; color: #a23b2d; }

.fnf-offer-title {
	margin: 0 0 6px;
	font-family: 'Cormorant Garamond', serif;
	font-size: 26px;
	color: #1c160d;
}
.fnf-offer-sub {
	margin: 0 0 16px;
	font-size: 13.5px;
	line-height: 1.55;
	color: #5a4d3a;
}
.fnf-offer-listed { color: #876a39; font-weight: 600; }

/* поля */
.fnf-offer-modal .fnf-field { margin-bottom: 12px; }
.fnf-offer-modal label {
	display: block;
	margin-bottom: 4px;
	font-family: 'DM Sans', sans-serif;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #8c6f3f;
}
.fnf-req { color: #a23b2d; }

/* счётчик символов «N / 300» в лейбле textarea */
.fnf-offer-count {
	float: right;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0;
	text-transform: none;
	color: #9a8e79;
	font-variant-numeric: tabular-nums;
}
.fnf-offer-count.is-full { color: #a23b2d; font-weight: 700; }
.fnf-offer-modal input[type="text"],
.fnf-offer-modal input[type="email"],
.fnf-offer-modal input[type="number"],
.fnf-offer-modal textarea {
	width: 100%;
	margin: 0; /* Flatsome даёт инпутам margin-bottom — ломает позицию £ */
	padding: 10px 12px;
	background: #fff;
	border: 1px solid #d8cdb4;
	border-radius: 8px;
	font-size: 14px;
	color: #1c160d;
	box-shadow: none;
}
.fnf-offer-modal input:focus,
.fnf-offer-modal textarea:focus {
	outline: none;
	border-color: #876a39;
	box-shadow: 0 0 0 3px rgba(135, 106, 57, .14);
}
.fnf-offer-modal input[readonly] { background: #faf6ec; color: #6b5d45; }

.fnf-offer-cols {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}
@media (max-width: 480px) {
	.fnf-offer-cols { grid-template-columns: 1fr; }
}

/* поле цены с валютой.
   ⚠️ Специфичность: голый `.fnf-offer-price-field input` (0,1,1) проигрывает
   `.fnf-offer-modal input[type=number]` (0,2,1) — потому селекторы с обёртками. */
.fnf-offer-price-field { position: relative; }
.fnf-offer-price-field .fnf-offer-currency {
	position: absolute;
	left: 12px;
	bottom: 11px;
	font-size: 15px;
	line-height: 1.4;
	font-weight: 600;
	color: #876a39;
	pointer-events: none;
}
.fnf-offer-modal .fnf-offer-price-field input,
.fnf-offer-counterform .fnf-offer-price-field input {
	padding-left: 30px;
	font-weight: 600;
	font-size: 16px;
	margin: 0;
}

/* honeypot */
.fnf-offer-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.fnf-offer-submit {
	display: block;
	width: 100%;
	margin-top: 4px;
	padding: 12px 20px;
	background: #876a39;
	border: 1px solid #876a39;
	border-radius: 8px;
	color: #fffdf8;
	font-family: 'DM Sans', sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background .15s ease;
}
.fnf-offer-submit:hover { background: #6f5730; }
.fnf-offer-submit[disabled] { opacity: .6; cursor: wait; }

.fnf-offer-privacy {
	margin: 10px 0 0;
	font-size: 11.5px;
	color: #9a8e79;
	text-align: center;
}
.fnf-offer-privacy a { color: #876a39; }

.fnf-offer-success,
.fnf-offer-error {
	padding: 12px 14px;
	border-radius: 8px;
	font-size: 13.5px;
	line-height: 1.5;
	margin-bottom: 14px;
}
.fnf-offer-success { background: #eef4ec; color: #3d5c3a; border: 1px solid #cfe0cb; }
.fnf-offer-error { background: #f9efed; color: #a23b2d; border: 1px solid #ecd4cf; }

/* ── страница оффера (magic-link) ── */
.fnf-offer-page {
	max-width: 640px;
	margin: 40px auto 70px;
	padding: 0 16px;
}
.fnf-offer-card {
	background: #fffdf8;
	border: 1px solid #e4d9c3;
	border-radius: 14px;
	padding: 30px 32px;
	box-shadow: 0 6px 24px rgba(28, 22, 13, .06);
}
.fnf-offer-page-title {
	margin: 0 0 18px;
	font-family: 'Cormorant Garamond', serif;
	font-size: 32px;
	color: #1c160d;
}
.fnf-offer-product {
	display: flex;
	gap: 16px;
	align-items: center;
	padding: 14px;
	background: #fcf8ef;
	border: 1px solid #e4d9c3;
	border-radius: 10px;
	margin-bottom: 18px;
}
.fnf-offer-thumb img {
	width: 84px;
	height: 84px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}
.fnf-offer-product-title {
	display: block;
	font-family: 'Cormorant Garamond', serif;
	font-size: 19px;
	font-weight: 600;
	color: #1c160d;
	margin-bottom: 6px;
	line-height: 1.3;
}
.fnf-offer-product-title:hover { color: #876a39; }
.fnf-offer-prices {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
	font-size: 13px;
	color: #5a4d3a;
}
.fnf-offer-prices b { color: #1c160d; }
.fnf-offer-counter-line b { color: #876a39; }

.fnf-offer-note {
	padding: 13px 16px;
	border-radius: 8px;
	background: #fcf8ef;
	border: 1px solid #e4d9c3;
	color: #5a4d3a;
	font-size: 14px;
	line-height: 1.55;
	margin-bottom: 14px;
}
.fnf-offer-note.is-ok { background: #eef4ec; border-color: #cfe0cb; color: #3d5c3a; }
.fnf-offer-note.is-bad { background: #f9efed; border-color: #ecd4cf; color: #a23b2d; }

.fnf-offer-smallprint { font-size: 12.5px; color: #9a8e79; margin: 0 0 14px; }

.fnf-offer-go {
	display: block;
	text-align: center;
	padding: 14px 24px;
	background: #876a39;
	border-radius: 8px;
	color: #fffdf8 !important;
	font-family: 'DM Sans', sans-serif;
	font-size: 13.5px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background .15s ease;
	margin-bottom: 8px;
}
.fnf-offer-go:hover { background: #6f5730; }
.fnf-offer-go .woocommerce-Price-amount { color: #fffdf8; }

.fnf-offer-counterform {
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid #f0e9da;
}
.fnf-offer-counterform h3 {
	font-family: 'Cormorant Garamond', serif;
	font-size: 21px;
	color: #1c160d;
	margin: 0 0 4px;
}
.fnf-offer-rounds { font-size: 12.5px; color: #9a8e79; margin: 0 0 12px; }
.fnf-offer-counterform label {
	display: block;
	margin-bottom: 4px;
	font-family: 'DM Sans', sans-serif;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #8c6f3f;
}
.fnf-offer-counterform .fnf-field { margin-bottom: 12px; }
.fnf-offer-counterform input[type="number"],
.fnf-offer-counterform textarea {
	width: 100%;
	padding: 10px 12px;
	background: #fff;
	border: 1px solid #d8cdb4;
	border-radius: 8px;
	font-size: 14px;
	color: #1c160d;
}
.fnf-offer-counterform input:focus,
.fnf-offer-counterform textarea:focus {
	outline: none;
	border-color: #876a39;
	box-shadow: 0 0 0 3px rgba(135, 106, 57, .14);
}
.fnf-offer-counterform .fnf-offer-submit { width: auto; padding: 11px 26px; }

@media (max-width: 549px) {
	.fnf-offer-card { padding: 22px 18px; }
	.fnf-offer-product { flex-direction: row; }
	.fnf-offer-thumb img { width: 64px; height: 64px; }
}
