/* =========================================================
   Buy Tier Discount — Frontend Styles v2.0
   ========================================================= */

/* ── Wrapper ── */
.btd-wrapper {
	max-width: 580px;
	font-family: inherit;
}

/* =========================================================
   FREE DELIVERY BANNER
   ========================================================= */
.btd-free-delivery {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	background-color: #cc0000;
	color: #ffffff;
	border: 2px solid #8B0000;
	border-radius: 6px;
	padding: 7px 18px;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .6px;
	text-transform: uppercase;
	margin-bottom: 16px;
	/* clipped diagonal ribbon look */
	clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
	position: relative;
	cursor: default;
	user-select: none;
}

.btd-free-delivery .btd-fd-inner {
	display: flex;
	align-items: center;
	gap: 5px;
}

/* Bottom position spacing */
.btd-free-delivery + .btd-message,
.btd-btn-full + .btd-free-delivery {
	margin-top: 14px;
	margin-bottom: 0;
}

/* =========================================================
   TIER BOXES
   ========================================================= */
.btd-tiers {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 16px;
}

.btd-tier {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 18px;
	border: 2px solid #e4ded2;
	border-radius: 14px;
	background: #ffffff;
	cursor: pointer;
	transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.btd-tier:hover {
	border-color: #c4b68a;
	box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.btd-tier.btd-selected {
	background-color: #f6f0e4;
	border-color: #1a1a1a;
	box-shadow: 0 3px 12px rgba(0,0,0,.1);
}

/* Hidden native radio */
.btd-radio-input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

/* ── Left side ── */
.btd-tier-left {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

/* Custom radio dot */
.btd-radio-dot {
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 2px solid #c4b68a;
	position: relative;
	transition: border-color .18s ease;
	background: #fff;
}

.btd-tier.btd-selected .btd-radio-dot {
	border-color: #1a1a1a;
}

.btd-tier.btd-selected .btd-radio-dot::after {
	content: "";
	position: absolute;
	top: 3px; left: 3px;
	width: 10px; height: 10px;
	border-radius: 50%;
	background: #1a1a1a;
}

.btd-tier-title {
	font-weight: 700;
	font-size: 15px;
	color: #1a1a1a;
}

/* ── Save Badge ── */
.btd-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	background-color: #b89a3c;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
	letter-spacing: .3px;
}

/* ── Right side (price) ── */
.btd-tier-right {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	text-align: right;
	flex-shrink: 0;
}

.btd-price {
	font-weight: 800;
	font-size: 16px;
	color: #1a1a1a;
	white-space: nowrap;
	display: flex;
	align-items: baseline;
	gap: 2px;
}

.btd-price .woocommerce-Price-amount { font-weight: 800; }

.btd-each {
	font-weight: 500;
	font-size: 11px;
	color: #777;
}

.btd-price-old {
	font-size: 12px;
	color: #a8977a;
	text-decoration: line-through;
	white-space: nowrap;
}

/* =========================================================
   ACTIONS ROW
   ========================================================= */
.btd-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

/* Quantity stepper */
.btd-stepper {
	display: flex;
	align-items: center;
	border: 1.5px solid #e2ddd0;
	border-radius: 999px;
	overflow: hidden;
	flex-shrink: 0;
	background: #f8f5ef;
}

.btd-stepper button {
	border: none;
	background: transparent;
	width: 40px;
	height: 44px;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	color: #1a1a1a;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .15s;
}

.btd-stepper button:hover { background: #ece7db; }

.btd-step-value {
	width: 34px;
	text-align: center;
	border: none;
	background: transparent;
	font-weight: 700;
	font-size: 15px;
	color: #b89a3c;
	pointer-events: none;
}

/* ── Buttons ── */
.btd-btn {
	flex: 1 1 auto;
	border: none;
	cursor: pointer;
	background-color: #b89a3c;
	color: #1a1a1a;
	font-weight: 700;
	font-size: 15px;
	padding: 13px 20px;
	border-radius: 30px;
	transition: background-color .18s ease, transform .1s ease, opacity .18s ease;
	text-align: center;
	text-decoration: none;
	display: inline-block;
}

.btd-btn:hover  { background-color: #a5872f; transform: translateY(-1px); }
.btd-btn:active { transform: translateY(0); }
.btd-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.btd-btn-full {
	display: block;
	width: 100%;
}

/* ── Message ── */
.btd-message {
	margin-top: 10px;
	font-size: 13px;
	min-height: 20px;
	padding: 0 4px;
	border-radius: 4px;
	transition: opacity .2s;
}

.btd-message.btd-success { color: #1a7d36; }
.btd-message.btd-error   { color: #cc0000; }

/* ── Notices (editor) ── */
.btd-notice {
	padding: 12px 16px;
	border-radius: 6px;
	font-size: 13px;
	font-style: italic;
}
.btd-notice--error { border: 1px dashed #cc0000; color: #cc0000; }
.btd-notice--warn  { border: 1px dashed #b89a3c; color: #8a6d00; }

/* ── Responsive ── */
@media (max-width: 480px) {
	.btd-tier  { padding: 13px 13px; }
	.btd-tier-title { font-size: 13px; }
	.btd-price { font-size: 14px; }
	.btd-btn   { font-size: 14px; padding: 12px 16px; }
	.btd-free-delivery { font-size: 12px; padding: 6px 14px; }
}
