/* Shookbook box sheet — mobile bottom sheet, desktop dialog ~520px */

.hh-sb-box,
.hh-sb-box-draft,
.hh-sb-box-prompt {
	--hh-sb-green: var(--hahishook-green, #699d21);
	--hh-sb-green-soft: #e8f3d8;
	--hh-sb-green-muted: #a8c47a;
	--hh-sb-text: #1a2433;
	--hh-sb-muted: #6b7280;
	--hh-sb-border: #e5e7eb;
	--hh-sb-warn-bg: #fff8e6;
	--hh-sb-warn-border: #e6c86a;
	--hh-sb-warn-text: #6b4e00;
	--hh-sb-radius: 12px;
	--hh-sb-link: #1a5fb4;
}

.hh-sb-box {
	position: fixed;
	inset: 0;
	z-index: 100050;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	font-family: inherit;
	color: var(--hh-sb-text);
}

.hh-sb-box[hidden] {
	display: none !important;
}

.hh-sb-box__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 28, 20, 0.45);
}

.hh-sb-box__panel {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 100%;
	height: 100%;
	max-height: 100%;
	background: #fff;
	border-radius: 16px 16px 0 0;
	box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
	overflow: hidden;
}

.hh-sb-box__header {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	padding: 14px 104px 8px;
	flex: 0 0 auto;
}

.hh-sb-box__title {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 700;
	text-align: center;
	line-height: 1.3;
}

.hh-sb-box__close,
.hh-sb-box__close:hover,
.hh-sb-box__close:focus {
	position: absolute;
	inset-inline-start: 10px;
	top: 10px;
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 0;
	padding: 0 12px;
	height: 36px;
	min-width: 0;
	width: auto;
	border: 1px solid var(--hh-sb-border);
	border-radius: 999px;
	background: #fff;
	color: #1e3a5f;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1;
	text-align: center;
	transform: none;
	box-shadow: none;
	cursor: pointer;
}

.hh-sb-box__close:hover {
	background: #f3f4f6;
	border-color: #d1d5db;
}

.hh-sb-box__close-x {
	font-size: 0.95rem;
	line-height: 1;
}

.hh-sb-box__hint {
	margin: -4px 16px 10px;
	font-size: 0.82rem;
	line-height: 1.4;
	color: var(--hh-sb-muted);
	text-align: center;
}

.hh-sb-box__resume {
	background: var(--hh-sb-green-soft);
	border: 1px solid var(--hh-sb-green-muted);
	border-radius: 10px;
	padding: 10px 12px;
	margin-bottom: 12px;
	font-size: 0.9rem;
	line-height: 1.45;
}

.hh-sb-box__restart {
	appearance: none;
	border: 0;
	background: none;
	padding: 0;
	color: var(--hh-sb-link);
	font: inherit;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}

.hh-sb-box__sizes {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
}

.hh-sb-box__sizes-label {
	font-weight: 700;
}

.hh-sb-box__size {
	appearance: none;
	border: 1.5px solid var(--hh-sb-green);
	border-radius: 999px;
	background: #fff;
	color: var(--hh-sb-green);
	font-weight: 700;
	font-size: 0.88rem;
	padding: 6px 14px;
	cursor: pointer;
}

.hh-sb-box__size.is-selected {
	background: var(--hh-sb-green);
	color: #fff;
}

.hh-sb-box__size:disabled {
	opacity: 0.6;
	cursor: wait;
}

.hh-sb-box__size-note {
	background: #fff1e0;
	border: 1px solid #f0a54a;
	color: #8a4b00;
	border-radius: 10px;
	padding: 10px 12px;
	margin-bottom: 12px;
	font-size: 0.9rem;
	line-height: 1.45;
	font-weight: 600;
}

.hh-sb-box__size-note[hidden] {
	display: none;
}

.hh-sb-box__close:focus-visible {
	outline: 2px solid var(--hh-sb-green);
	outline-offset: 2px;
}

.hh-sb-box__steps {
	display: flex;
	gap: 8px;
	padding: 4px 16px 12px;
	flex: 0 0 auto;
}

.hh-sb-box__step {
	flex: 1;
	appearance: none;
	border: 0;
	border-radius: 999px;
	padding: 8px 12px;
	font-weight: 700;
	font-size: 0.92rem;
	background: #eef2e8;
	color: var(--hh-sb-green);
	cursor: pointer;
}

.hh-sb-box__step.is-active {
	background: var(--hh-sb-green);
	color: #fff;
}

.hh-sb-box__step:disabled {
	cursor: default;
	opacity: 0.85;
}

.hh-sb-box__body {
	flex: 1 1 auto;
	overflow: auto;
	padding: 0 16px 16px;
	-webkit-overflow-scrolling: touch;
}

.hh-sb-box__notice {
	background: var(--hh-sb-warn-bg);
	border: 1px solid var(--hh-sb-warn-border);
	border-radius: 10px;
	padding: 12px 14px;
	margin-bottom: 14px;
	font-size: 0.92rem;
	line-height: 1.45;
	color: var(--hh-sb-warn-text);
}

.hh-sb-box__notice strong {
	font-weight: 700;
}

.hh-sb-box__slot-card {
	background: var(--hh-sb-green-soft);
	border: 1px solid var(--hh-sb-green);
	border-radius: 10px;
	padding: 12px 14px;
	margin-bottom: 14px;
	line-height: 1.45;
}

.hh-sb-box__slot-card strong {
	display: block;
	color: var(--hh-sb-green);
	margin-bottom: 4px;
}

.hh-sb-box__slot-summary {
	color: var(--hh-sb-muted);
	font-size: 0.9rem;
	margin: 0 0 12px;
	line-height: 1.4;
}

.hh-sb-box__err {
	background: #fde8e8;
	border: 1px solid #e0a0a0;
	color: #8a1f1f;
	border-radius: 10px;
	padding: 10px 12px;
	margin-bottom: 12px;
	font-weight: 600;
}

.hh-sb-box__date-row {
	margin-bottom: 16px;
}

.hh-sb-box__date-label {
	font-weight: 700;
	margin-bottom: 8px;
}

.hh-sb-box__windows {
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
}

.hh-sb-box__windows--3 {
	flex-wrap: wrap;
}

.hh-sb-box__win {
	appearance: none;
	flex: 1 1 0;
	min-width: 0;
	min-height: 52px;
	padding: 8px 10px;
	border-radius: 10px;
	border: 1.5px solid var(--hh-sb-green);
	background: #fff;
	color: var(--hh-sb-green);
	font-weight: 700;
	font-size: 0.88rem;
	cursor: pointer;
	line-height: 1.25;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
}

@media (min-width: 768px) {
	.hh-sb-box__windows--3 {
		flex-wrap: nowrap;
	}
}

@media (max-width: 767px) {
	.hh-sb-box__windows--3 {
		flex-wrap: wrap;
	}

	.hh-sb-box__windows--3 .hh-sb-box__win {
		flex: 1 1 calc(50% - 4px);
	}
}

.hh-sb-box__win.is-selected {
	background: var(--hh-sb-green);
	color: #fff;
}

.hh-sb-box__win:disabled,
.hh-sb-box__win.is-unavailable {
	border-color: #d1d5db;
	color: #9ca3af;
	background: #f9fafb;
	cursor: not-allowed;
	font-weight: 600;
}

.hh-sb-box__win-label {
	display: block;
}

.hh-sb-box__win-sub {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	margin-top: 0;
}

.hh-sb-box__bar {
	height: 6px;
	border-radius: 999px;
	background: #e5e7eb;
	overflow: hidden;
}

.hh-sb-box__bar > span {
	display: block;
	height: 100%;
	background: var(--hh-sb-green);
	border-radius: inherit;
	width: 0;
	transition: width 0.15s ease;
}

.hh-sb-box__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
}

.hh-sb-box__card {
	border: 1.5px solid var(--hh-sb-border);
	border-radius: 12px;
	padding: 8px 6px 10px;
	background: #fff;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	min-width: 0;
}

.hh-sb-box__card.is-picked {
	border-color: var(--hh-sb-green);
	box-shadow: 0 0 0 1px var(--hh-sb-green);
}

.hh-sb-box__card img {
	width: 64px;
	height: 64px;
	object-fit: contain;
	margin-bottom: 6px;
}

.hh-sb-box__card-name {
	font-weight: 700;
	font-size: 0.82rem;
	line-height: 1.25;
	margin: 0 0 2px;
	word-break: break-word;
}

.hh-sb-box__card-weight {
	color: var(--hh-sb-muted);
	font-size: 0.72rem;
	line-height: 1.2;
	margin: 0 0 8px;
	min-height: 1.2em;
}

.hh-sb-box__qty {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: auto;
}

.hh-sb-box__qty-btn {
	appearance: none;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1.5px solid var(--hh-sb-green);
	background: #fff;
	color: var(--hh-sb-green);
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}

.hh-sb-box__qty-btn.is-plus {
	background: var(--hh-sb-green);
	color: #fff;
}

.hh-sb-box__qty-btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.hh-sb-box__qty-val {
	min-width: 1.2em;
	font-weight: 700;
	font-size: 0.95rem;
}

.hh-sb-box__footer {
	flex: 0 0 auto;
	padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid var(--hh-sb-border);
	background: #fff;
}

.hh-sb-box__footer.has-count {
	display: flex;
	align-items: center;
	gap: 12px;
}

.hh-sb-box__count {
	flex: 1 1 auto;
	min-width: 0;
}

.hh-sb-box__count-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	column-gap: 8px;
	font-weight: 700;
	font-size: 0.92rem;
	margin-bottom: 6px;
}

.hh-sb-box__count-left {
	color: var(--hh-sb-muted);
	font-weight: 600;
	font-size: 0.85rem;
}

.hh-sb-box__count.is-full .hh-sb-box__count-left {
	color: var(--hh-sb-green);
	font-weight: 700;
}

.hh-sb-box__count.is-over .hh-sb-box__count-left {
	color: #c25e00;
	font-weight: 700;
}

.hh-sb-box__count.is-over .hh-sb-box__bar > span {
	background: #e07b00;
}

.hh-sb-box__footer.has-count .hh-sb-box__cta {
	flex: 0 0 auto;
	width: auto;
	min-width: 168px;
	max-width: 55%;
	padding: 13px 14px;
	font-size: 1rem;
}

.hh-sb-box__cta {
	appearance: none;
	width: 100%;
	border: 0;
	border-radius: 12px;
	padding: 14px 16px;
	font-size: 1.05rem;
	font-weight: 700;
	background: var(--hh-sb-green);
	color: #fff;
	cursor: pointer;
}

.hh-sb-box__cta:disabled {
	background: var(--hh-sb-green-muted);
	cursor: not-allowed;
}

.hh-sb-box__cta:focus-visible,
.hh-sb-box__win:focus-visible,
.hh-sb-box__qty-btn:focus-visible,
.hh-sb-box-edit-link:focus-visible {
	outline: 2px solid var(--hh-sb-green);
	outline-offset: 2px;
}

/* web T-15: which Shookbook product is already in the cart (instead of a red error). */
.hh-sb-box__block-note {
	background: #eef4fb;
	border: 1px solid #b9cfe8;
	border-radius: 10px;
	padding: 10px 12px;
	margin-bottom: 12px;
	font-size: 0.9rem;
	line-height: 1.45;
}

.hh-sb-box__block-note a {
	color: var(--hh-sb-link);
	font-weight: 600;
	text-decoration: underline;
}

/* web T-15: unfinished box above the cart. */
.hh-sb-box-draft {
	background: var(--hh-sb-green-soft);
	border: 1px solid var(--hh-sb-green-muted);
	border-radius: 12px;
	padding: 12px 14px;
	margin: 0 0 16px;
	line-height: 1.5;
	font-size: 0.95rem;
	color: var(--hh-sb-text);
}

.hh-sb-box-draft__text {
	margin: 0;
}

.hh-sb-box-draft__actions {
	margin-top: 10px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
}

.hh-sb-box-draft__go {
	appearance: none;
	border: 0;
	border-radius: 10px;
	background: var(--hh-sb-green);
	color: #fff;
	font-weight: 700;
	font-size: 0.95rem;
	padding: 9px 16px;
	cursor: pointer;
}

.hh-sb-box-draft__del {
	appearance: none;
	border: 0;
	background: none;
	padding: 0;
	color: var(--hh-sb-link);
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: underline;
	cursor: pointer;
}

/* web T-15: the question on the cart's «מעבר לתשלום». */
.hh-sb-box-prompt {
	position: fixed;
	inset: 0;
	z-index: 100060;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	color: var(--hh-sb-text);
}

.hh-sb-box-prompt__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 28, 20, 0.45);
}

.hh-sb-box-prompt__dialog {
	position: relative;
	background: #fff;
	border-radius: 16px;
	max-width: 440px;
	width: 100%;
	padding: 22px 22px 18px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
	direction: rtl;
	text-align: right;
}

.hh-sb-box-prompt__dialog h3 {
	margin: 0 0 8px;
	font-size: 1.2rem;
}

.hh-sb-box-prompt__dialog p {
	margin: 0 0 16px;
	line-height: 1.5;
	color: #374151;
}

.hh-sb-box-prompt__go {
	appearance: none;
	display: block;
	width: 100%;
	border: 0;
	border-radius: 10px;
	background: var(--hh-sb-green);
	color: #fff;
	font-weight: 700;
	font-size: 1.02rem;
	padding: 13px;
	margin-bottom: 10px;
	cursor: pointer;
}

.hh-sb-box-prompt__skip {
	display: block;
	text-align: center;
	padding: 10px;
	color: #1e3a5f;
	font-weight: 600;
	border: 1px solid var(--hh-sb-border);
	border-radius: 10px;
	text-decoration: none;
}

.hh-sb-box-prompt__go:focus-visible,
.hh-sb-box-prompt__skip:focus-visible,
.hh-sb-box-draft__go:focus-visible,
.hh-sb-box-draft__del:focus-visible {
	outline: 2px solid var(--hh-sb-green);
	outline-offset: 2px;
}

/* Chosen slot beside the date-step button: desktop only (web T-14). */
.hh-sb-box__picked {
	display: none;
}

.hh-sb-box__loading {
	padding: 40px 16px;
	text-align: center;
	color: var(--hh-sb-muted);
}

/* Cart line styling */
.hh-sb-box-cart-line .variation,
.hh-sb-box-cart-line .wc-block-components-product-details {
	font-size: 0.9rem;
	line-height: 1.45;
}

.hh-sb-box-edit-link {
	appearance: none;
	border: 0;
	background: none;
	padding: 0;
	margin: 6px 0 0;
	color: var(--hh-sb-link, #1a5fb4);
	font-weight: 600;
	font-size: 0.9rem;
	text-decoration: underline;
	cursor: pointer;
	display: inline;
}

@media (min-width: 768px) {
	.hh-sb-box {
		align-items: center;
		padding: 24px;
	}

	.hh-sb-box__panel {
		width: min(1040px, 94vw);
		max-width: min(1040px, 94vw);
		height: min(92vh, 860px);
		max-height: min(92vh, 860px);
		border-radius: 16px;
	}

	.hh-sb-box__grid {
		grid-template-columns: repeat(5, 1fr);
	}

	.hh-sb-box__body,
	.hh-sb-box__footer {
		padding-inline: 24px;
	}

	.hh-sb-box__footer.has-count .hh-sb-box__cta {
		min-width: 240px;
	}

	/* web T-14: compact date step, as tall as its content, a card per day. */
	.hh-sb-box__panel.is-step-1 {
		height: auto;
	}

	.is-step-1 .hh-sb-box__notice {
		padding: 8px 12px;
		margin-bottom: 12px;
		font-size: 0.88rem;
	}

	.hh-sb-box__dates {
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
		gap: 10px;
	}

	.hh-sb-box__dates .hh-sb-box__date-row {
		margin: 0;
		border: 1px solid var(--hh-sb-border);
		border-radius: 12px;
		padding: 10px;
	}

	.hh-sb-box__dates .hh-sb-box__date-label {
		text-align: center;
	}

	.hh-sb-box__dates .hh-sb-box__windows {
		flex-direction: column;
		flex-wrap: nowrap;
		gap: 6px;
	}

	.hh-sb-box__dates .hh-sb-box__win {
		flex: 0 0 auto;
		min-height: 0;
		padding: 6px 8px;
		font-size: 0.82rem;
	}

	.hh-sb-box__dates .hh-sb-box__win-sub {
		font-size: 0.72rem;
	}

	.hh-sb-box__footer.has-pick {
		display: flex;
		align-items: center;
		gap: 12px;
	}

	.hh-sb-box__footer.has-pick .hh-sb-box__cta {
		flex: 0 0 auto;
		width: auto;
		min-width: 240px;
		padding: 13px 18px;
	}

	.hh-sb-box__picked {
		display: block;
		flex: 1 1 auto;
		min-width: 0;
		font-weight: 700;
		font-size: 0.95rem;
	}

	.hh-sb-box__picked small {
		display: block;
		color: var(--hh-sb-muted);
		font-weight: 600;
		font-size: 0.8rem;
	}

	/* web T-14: bigger product images on the contents step (sources are 300×200). */
	.hh-sb-box__card {
		padding: 12px 8px;
	}

	.hh-sb-box__card img {
		width: 150px;
		max-width: 100%;
		height: 100px;
		margin-bottom: 8px;
	}

	.hh-sb-box__card-name {
		font-size: 0.9rem;
	}

	.hh-sb-box__card-weight {
		font-size: 0.78rem;
	}
}

/* web T-16: the whole vegetable card adds one, like its + */
.hh-sb-box__card { cursor: pointer; }
/* web T-16: a box line's quantity in the cart is a plain 1 */
.hh-sb-box-cart-qty { display: inline-block; min-width: 2em; text-align: center; font-weight: 700; }
