/* =========================================================
   CART DRAWER
   =========================================================
   Right-hand drawer shown after something is added to the cart. Colours and
   radii come from the site tokens, so it reads as part of the same shop rather
   than a bolted-on overlay.
   ========================================================= */
.bt-drawer-scrim {
	position: fixed;
	inset: 0;
	z-index: 10045;
	background: rgba(8, 12, 17, .5);
}

.bt-drawer-scrim[hidden],
.bt-drawer[hidden] {
	display: none;
}

.bt-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 10046;
	display: flex;
	flex-direction: column;
	width: min(400px, 100%);
	border-left: 1px solid var(--bt-border, #e5e7eb);
	background: var(--bt-white, #fff);
	box-shadow: -18px 0 46px -28px rgba(0, 0, 0, .7);
}

.bt-drawer__inner {
	display: flex;
	flex-direction: column;
	min-height: 0;
	height: 100%;
}

/* ---- header ---- */
.bt-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex: none;
	padding: 14px 16px;
	border-bottom: 1px solid var(--bt-border, #e5e7eb);
	font-size: 15px;
	font-weight: 700;
}

/* A 40 px square: Flatsome's button defaults stretched it into a tall sliver, which showed whenever
   it had focus (the drawer focuses it on opening). */
.bt-drawer__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 5px;
	background: none;
	font-size: 24px;
	line-height: 1;
	color: var(--bt-muted, #6b7280);
	cursor: pointer;
}

.bt-drawer__close:hover {
	background: var(--bt-surface-2, #f5f7fa);
	color: var(--bt-ink, #0f3d5e);
}

/* ---- cart lines ---- */
.bt-drawer__lines {
	flex: none;
	max-height: 40%;
	overflow-y: auto;
}

.bt-drawer__line {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	border-bottom: 1px solid var(--bt-border, #e5e7eb);
}

.bt-drawer__line img {
	flex: none;
	width: 56px;
	height: 56px;
	border: 1px solid var(--bt-border, #e5e7eb);
	border-radius: 4px;
	background: var(--bt-surface-2, #f5f7fa);
	object-fit: contain;
}

.bt-drawer__line-text {
	flex: 1;
	min-width: 0;
}

.bt-drawer__line-name {
	display: block;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
}

.bt-drawer__line-qty {
	display: block;
	margin-top: 3px;
	font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 12px;
	color: var(--bt-muted, #6b7280);
}

.bt-drawer__line-price {
	flex: none;
	font-size: 15px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* ---- upsells: the one part that scrolls ---- */
.bt-drawer__up {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: 14px 16px;
}

.bt-drawer__up-title {
	margin: 0 0 10px;
	font-size: 14.5px;
	font-weight: 600;
}

.bt-drawer__add {
	display: flex;
	align-items: center;
	gap: 11px;
	margin-bottom: 9px;
	padding: 10px 12px;
	border: 1px solid var(--bt-border, #e5e7eb);
	border-radius: 5px;
}

.bt-drawer__add img {
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: 4px;
	background: var(--bt-surface-2, #f5f7fa);
	object-fit: contain;
}

.bt-drawer__add-text {
	flex: 1;
	min-width: 0;
}

.bt-drawer__add-name {
	display: block;
	font-size: 13.8px;
	font-weight: 600;
	line-height: 1.3;
}

.bt-drawer__add-price {
	display: block;
	margin-top: 2px;
	font-size: 12.5px;
	font-variant-numeric: tabular-nums;
	color: var(--bt-muted, #6b7280);
}

.bt-drawer__add-btn {
	flex: none;
	padding: 7px 12px;
	border: 1px solid var(--bt-navy, #0f3d5e);
	border-radius: 5px;
	background: var(--bt-white, #fff);
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	color: var(--bt-navy, #0f3d5e);
	cursor: pointer;
}

.bt-drawer__add-btn:hover:not(:disabled) {
	background: var(--bt-navy, #0f3d5e);
	color: #fff;
}

.bt-drawer__add-btn:disabled {
	border-color: var(--bt-navy, #0f3d5e);
	color: var(--bt-navy, #0f3d5e);
	cursor: default;
}

.bt-drawer__empty {
	flex: 1;
	padding: 22px 16px;
	font-size: 14px;
	color: var(--bt-muted, #6b7280);
}

.bt-drawer__empty p {
	margin: 0 0 14px;
}

/* An empty cart opened from the header shouldn't be a dead end. */
.bt-drawer__shop {
	display: block;
	padding: 12px 16px;
	border: 1.5px solid var(--bt-navy, #0f3d5e);
	border-radius: 5px;
	background: var(--bt-navy, #0f3d5e);
	color: #fff;
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
}

.bt-drawer__shop:hover {
	border-color: var(--bt-navy-dark, #0a2a40);
	background: var(--bt-navy-dark, #0a2a40);
	color: #fff;
}

/* ---- footer ---- */
.bt-drawer__foot {
	display: flex;
	flex-direction: column;
	gap: 9px;
	flex: none;
	padding: 14px 16px;
	border-top: 1px solid var(--bt-border, #e5e7eb);
}

.bt-drawer__sum {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	font-size: 14px;
	color: var(--bt-muted, #6b7280);
}

.bt-drawer__sum strong {
	font-size: 21px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--bt-ink, #0f3d5e);
}

.bt-drawer__checkout,
.bt-drawer__continue {
	display: block;
	width: 100%;
	padding: 12px 16px;
	border-radius: 5px;
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	cursor: pointer;
}

.bt-drawer__checkout {
	border: 1.5px solid var(--bt-navy, #0f3d5e);
	background: var(--bt-navy, #0f3d5e);
	color: #fff;
	text-decoration: none;
}

/* Hover makes it stronger, not fainter: the darker navy every other primary button uses. */
.bt-drawer__checkout:hover {
	border-color: var(--bt-navy-dark, #0a2a40);
	background: var(--bt-navy-dark, #0a2a40);
	color: #fff;
}

.bt-drawer__continue {
	border: 1px solid var(--bt-border, #e5e7eb);
	background: var(--bt-white, #fff);
	color: var(--bt-ink, #0f3d5e);
}

@media (max-width: 849px) {
	.bt-drawer {
		width: 100%;
		border-left: 0;
	}
}

/* ---- remove a line ---- */
.bt-drawer__remove {
	/* min-height as well as height: the theme's button rules set a minimum that
	   stretched this to 50px inside the flex row. */
	flex: none;
	width: 28px;
	height: 28px;
	min-height: 0;
	align-self: center;
	margin-left: 2px;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: none;
	font-size: 20px;
	line-height: 1;
	color: var(--bt-muted, #6b7280);
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}

.bt-drawer__remove:hover:not(:disabled) {
	background: var(--bt-surface-2, #f2f5f8);
	color: var(--bt-red, #e43a36);
}

.bt-drawer__remove:disabled {
	opacity: .45;
	cursor: default;
}

/* ---- undo ----
   Sits above the footer so it is read without scrolling, and states what was
   removed rather than a bare "Angre" the customer has to interpret. */
.bt-drawer__undo {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex: none;
	padding: 11px 16px;
	border-top: 1px solid var(--bt-border, #e5e7eb);
	background: var(--bt-surface-2, #f2f5f8);
	font-size: 13.5px;
	color: var(--bt-ink, #0f3d5e);
}

.bt-drawer__undo[hidden] {
	display: none;
}

.bt-drawer__undo button {
	flex: none;
	margin: 0;
	padding: 6px 12px;
	border: 1px solid var(--bt-navy, #0f3d5e);
	border-radius: 5px;
	background: var(--bt-white, #fff);
	font-size: 13px;
	font-weight: 600;
	color: var(--bt-navy, #0f3d5e);
	cursor: pointer;
}

.bt-drawer__undo button:hover:not(:disabled) {
	background: var(--bt-navy, #0f3d5e);
	color: #fff;
}
