/*
 * BUZY Bulky Items
 *
 * Scoped to .bby-* so nothing collides with Breakdance or WooCommerce.
 * Carries text-size-adjust because these components set their own type sizes
 * and Android Chrome inflates text inside blocks it reads as wide columns.
 */

.bby-notice,
.bby-inline,
.bby-cart-gate,
.bby-modal {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	box-sizing: border-box;
}

.bby-notice *,
.bby-inline *,
.bby-modal * {
	box-sizing: border-box;
}

/* ------------------------------------------------------------------ */
/* Product page — one slim line, so the in-stock indicator keeps its   */
/* place. The detail lives in the modal.                               */
/* ------------------------------------------------------------------ */

.bby-inline {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.4rem 0.5rem;
	margin: 0 0 0.75rem;
	padding: 0;
	border: 0;
	background: none;
	font-size: 14px;
	line-height: 1.4;
	color: #33302b;
}

.bby-inline__tag {
	flex: 0 0 auto;
	padding: 0.15rem 0.45rem;
	border-radius: 3px;
	background: #d9911f;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
}

.bby-inline__text {
	flex: 1 1 auto;
	min-width: 0;
}

/* ------------------------------------------------------------------ */
/* Cart and checkout notice                                            */
/* ------------------------------------------------------------------ */

.bby-notice {
	margin: 0 0 1.25rem;
	padding: 1rem 1.125rem;
	border: 1px solid #e6c98a;
	border-left: 4px solid #d9911f;
	border-radius: 4px;
	background: #fdf7ec;
	color: #33302b;
	font-size: 15px;
	line-height: 1.5;
}

.bby-notice__title {
	margin: 0 0 0.35rem;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.01em;
}

.bby-notice__body {
	margin: 0;
}

/* Secondary line under the main body copy. */
.bby-notice__aside {
	margin-top: 0.5rem;
	font-size: 13px;
	color: #6a5c42;
}

.bby-notice__link {
	white-space: nowrap;
	text-decoration: underline;
}

.bby-notice__actions {
	margin: 0.85rem 0 0;
}

/* ------------------------------------------------------------------ */
/* Cart gate                                                           */
/* ------------------------------------------------------------------ */

.bby-cart-gate {
	margin: 0.65rem 0 0;
	font-size: 13px;
	line-height: 1.45;
	color: #6a4a12;
}

/* The disabled Proceed to Checkout button. Presentation only — the
   server refuses the order regardless of what the button looks like. */
a.bby-disabled,
a.bby-disabled:hover,
a.bby-disabled:focus {
	opacity: 0.45;
	cursor: not-allowed;
	filter: grayscale(100%);
}

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */

.bby-button {
	-webkit-appearance: none;
	appearance: none;
	display: inline-block;
	margin: 0;
	padding: 0.6rem 1.1rem;
	border: 1px solid #33302b;
	border-radius: 3px;
	background: #33302b;
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}

.bby-button:hover,
.bby-button:focus {
	background: #55504a;
	border-color: #55504a;
	color: #fff;
}

.bby-button[disabled] {
	opacity: 0.55;
	cursor: default;
}

.bby-button--plain {
	background: transparent;
	border-color: transparent;
	color: #55504a;
	text-decoration: underline;
	font-weight: 400;
}

.bby-button--plain:hover,
.bby-button--plain:focus {
	background: transparent;
	border-color: transparent;
	color: #33302b;
}

/* A button that reads as a link. */
.bby-linkbutton {
	-webkit-appearance: none;
	appearance: none;
	display: inline;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}

.bby-linkbutton:hover,
.bby-linkbutton:focus {
	opacity: 0.75;
}

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

.bby-modal[hidden] {
	display: none !important;
}

.bby-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 4vh 1rem;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.bby-modal__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(20, 18, 15, 0.6);
}

.bby-modal__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 560px;
	margin: auto;
	padding: 1.5rem 1.5rem 1.75rem;
	border-radius: 6px;
	background: #fff;
	color: #33302b;
	font-size: 15px;
	line-height: 1.5;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.bby-modal__dialog:focus {
	outline: none;
}

.bby-modal__close {
	position: absolute;
	top: 0.4rem;
	right: 0.5rem;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 0;
	background: none;
	color: #6b655c;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.bby-modal__close:hover,
.bby-modal__close:focus {
	color: #33302b;
}

.bby-modal__title {
	margin: 0 2rem 0.75rem 0;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.25;
}

.bby-modal__intro p {
	margin: 0 0 0.75rem;
	font-size: 14px;
	line-height: 1.55;
}

.bby-modal__loading {
	margin: 0;
	color: #6b655c;
	font-size: 14px;
}

/* Lock the page behind the modal. */
html.bby-modal-open,
html.bby-modal-open body {
	overflow: hidden;
}

/* ------------------------------------------------------------------ */
/* Quote request already received                                      */
/* ------------------------------------------------------------------ */

.bby-received {
	margin-top: 1.25rem;
	padding: 0.9rem 1rem;
	border: 1px solid #b7d4b7;
	border-left: 4px solid #3f8f47;
	border-radius: 4px;
	background: #f2f8f2;
}

.bby-received__title {
	margin: 0 0 0.35rem;
	font-size: 15px;
	font-weight: 700;
}

.bby-received__body {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
}

.bby-received__revise {
	margin: 0.75rem 0 0;
	font-size: 13px;
}

.bby-received__revise[hidden] {
	display: none;
}

.bby-quote[hidden] {
	display: none;
}

/* ------------------------------------------------------------------ */
/* Quote form                                                          */
/* ------------------------------------------------------------------ */

.bby-quote {
	margin-top: 1.25rem;
	padding-top: 1.25rem;
	border-top: 1px solid #e6ded1;
}

.bby-quote__heading {
	margin: 0 0 0.85rem;
	font-size: 15px;
	font-weight: 700;
}

.bby-quote__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem 1rem;
}

.bby-field {
	margin: 0;
	min-width: 0;
}

.bby-field--wide {
	grid-column: 1 / -1;
}

.bby-field label {
	display: block;
	margin-bottom: 0.25rem;
	font-size: 13px;
	font-weight: 600;
}

.bby-field input,
.bby-field select {
	width: 100%;
	max-width: 100%;
	/* 16px stops iOS Safari zooming the page when a field takes focus. */
	padding: 0.5rem 0.6rem;
	border: 1px solid #c9c3ba;
	border-radius: 3px;
	background: #fff;
	color: #33302b;
	font: inherit;
	font-size: 16px;
	line-height: 1.3;
}

.bby-field input:focus,
.bby-field select:focus {
	border-color: #d9911f;
	outline: 2px solid rgba(217, 145, 31, 0.25);
	outline-offset: 0;
}

.bby-field--error input,
.bby-field--error select {
	border-color: #b32d2e;
}

/* Forklift */

.bby-forklift {
	margin-top: 1rem;
}

.bby-forklift__label {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.bby-forklift__label input {
	margin: 0.15rem 0 0;
	flex: 0 0 auto;
}

.bby-forklift__help {
	margin: 0.4rem 0 0 1.6rem;
	font-size: 13px;
	line-height: 1.45;
	color: #5c574f;
}

.bby-quote__actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 1.25rem 0 0;
}

.bby-quote__message {
	margin: 0.75rem 0 0;
	font-size: 14px;
}

.bby-quote__message:empty {
	display: none;
}

.bby-quote__message--error {
	color: #b32d2e;
}

.bby-quote__message--ok {
	color: #2f6f37;
}

/* ------------------------------------------------------------------ */
/* Small screens                                                       */
/* ------------------------------------------------------------------ */

@media (max-width: 600px) {

	.bby-modal {
		padding: 0;
		align-items: stretch;
	}

	.bby-modal__dialog {
		max-width: none;
		min-height: 100%;
		margin: 0;
		border-radius: 0;
		padding: 1.25rem 1.125rem 2rem;
	}

	.bby-quote__grid {
		grid-template-columns: 1fr;
	}

	.bby-quote__actions {
		flex-wrap: wrap;
	}

	.bby-button {
		width: 100%;
		text-align: center;
	}

	.bby-button--plain {
		width: auto;
	}
}
