/* ==========================================================================
   T's Direct Order & Quote System — basket drawer

   Built to quote-cart-mockup.html. Mockup values are quoted above each block.
   One drawer serves both baskets; only the header, contents and footer change.
   ========================================================================== */

/* ==========================================================================
   1. THE SHELL

   mockup:
     .scrim  { position:fixed; inset:0; background:rgba(33,33,33,.5); z-index:200 }
     .drawer { position:fixed; top:0; right:0; bottom:0; width:min(420px,100%);
               background: var(--tsd-paper); z-index:210; display:flex; flex-direction:column;
               transform:translateX(100%);
               transition:transform .28s cubic-bezier(.4,0,.2,1);
               box-shadow:-8px 0 30px rgba(33,33,33,.14) }
   ========================================================================== */

.tsd .tsd-scrim {
	position: fixed;
	inset: 0;
	background: rgba(33, 33, 33, .5);
	z-index: 200;
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s;
}
.tsd .tsd-scrim.is-open { opacity: 1; pointer-events: auto; }

.tsd .tsd-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(420px, 100%);
	max-width: 100vw;
	background: var(--tsd-paper);
	z-index: 210;
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform .28s cubic-bezier(.4, 0, .2, 1);
	box-shadow: -8px 0 30px rgba(33, 33, 33, .14);
}
.tsd .tsd-drawer.is-open { transform: none; }

/* while it is open the page behind should not scroll */
body.tsd-drawer-open { overflow: hidden; }

/* ==========================================================================
   2. HEADER

   mockup:
     .dr-head { display:flex; align-items:center; gap:12px; padding:0 16px;
                height:62px; background:var(--dark); color:#fff }
     .dh-ic   { width:30px; height:30px; border-radius:7px; background:var(--green) }
     .dr-head h3 { font-d 700 18px uppercase }
     .dh-c    { background:rgba(255,255,255,.16); font-size:11.5px;
                padding:2px 9px; border-radius:10px }
     .dr-x    { margin-left:auto; width:34px; height:34px; color:var(--tsd-muted) }
   ========================================================================== */

.tsd .tsd-drawer__head {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 18px 20px;
	flex-shrink: 0;
	background: var(--tsd-paper);
	border-bottom: 1px solid var(--tsd-line);
	color: #fff;
}
.tsd .tsd-drawer__ic {
	width: 34px;
	height: 34px;
	border-radius: 9px;
	background: rgba(1, 115, 253, .16);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: var(--tsd-green-600);
}
.tsd .tsd-drawer__ic svg { width: 18px; height: 18px; }
.tsd .tsd-drawer__head h3 {
	margin: 0;
	font-family: var(--tsd-font-d);
	font-weight: 700;
	font-size: 18px;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #fff;
}
.tsd .tsd-drawer__count {
	background: var(--tsd-paper-2);
	border: 1px solid var(--tsd-line);
	font-family: var(--tsd-font-d);
	font-size: 13px;
	font-weight: 600;
	padding: 2px 10px;
	border-radius: 20px;
	color: var(--tsd-muted-2);
}
.tsd .tsd-drawer__x.tsd-drawer__x {
	margin-left: auto !important;
	padding: 0 !important;
	border: none !important;
	box-shadow: none !important;
	background: none !important;
	color: var(--tsd-muted) !important;
	width: 34px;
	height: 34px;
	border-radius: var(--tsd-radius-sm);
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	font-size: 22px !important;
	line-height: 1 !important;
	cursor: pointer;
}
.tsd .tsd-drawer__x.tsd-drawer__x:hover { background: rgba(255, 255, 255, .12) !important; color: #fff !important; }


/* ==========================================================================
   3. BODY

   mockup: .dr-body { flex:1; overflow-y:auto; min-height:0 }
   ========================================================================== */

.tsd .tsd-drawer__body {
	flex: 1;
	overflow-y: auto;
	min-height: 0;
	padding: 4px 0;
}
.tsd .tsd-drawer__body::-webkit-scrollbar { width: 8px; }
.tsd .tsd-drawer__body::-webkit-scrollbar-thumb {
	background: var(--tsd-paper-2);
	border-radius: 8px;
	border: 2px solid #fff;
}
.tsd .tsd-drawer__body.is-busy { opacity: .5; pointer-events: none; }

/* ---------- one item ---------- */
.tsd .tsd-di {
	padding: 13px 16px;
	border-bottom: 1px solid var(--tsd-line-2);
}
.tsd .tsd-di:last-child { border-bottom: none; }
.tsd .tsd-di.is-busy { opacity: .45; pointer-events: none; }

.tsd .tsd-di__top { display: flex; gap: 8px; align-items: flex-start; }

.tsd .tsd-di__img {
	width: 62px;
	height: 62px;
	flex-shrink: 0;
	border-radius: 6px;
	background: var(--tsd-bg);
	border: 1px solid var(--tsd-line);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 6px;
	overflow: hidden;
}
.tsd .tsd-di__img img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }

.tsd .tsd-di__main { flex: 1; min-width: 0; }
.tsd .tsd-di__name {
	font-family: var(--tsd-font-d);
	font-weight: 600;
	font-size: 14.5px;
	line-height: 1.25;
}
.tsd .tsd-di__name a { color: var(--tsd-ink); text-decoration: none; }
.tsd .tsd-di__name a:hover { color: var(--tsd-green-600); }

.tsd .tsd-di__x.tsd-di__x {
	flex-shrink: 0;
	padding: 4px !important;
	margin: 0 !important;
	border-radius: 6px !important;
	background: none !important;
	border: none !important;
	box-shadow: none !important;
	color: var(--tsd-muted-2) !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1 !important;
	cursor: pointer;
	transition: color .15s !important;
}
.tsd .tsd-di__x.tsd-di__x svg { width: 15px; height: 15px; }
.tsd .tsd-di__x.tsd-di__x:hover { background: none !important; color: var(--tsd-danger) !important; }

.tsd .tsd-di__attr { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.tsd .tsd-di__tag {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: var(--tsd-bg);
	border: 1px solid var(--tsd-line);
	border-radius: 20px;
	padding: 2px 8px;
	font-size: 11px;
	color: var(--tsd-ink);
}
.tsd .tsd-di__sw {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--swatch, #ccc);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .12);
	flex-shrink: 0;
}

.tsd .tsd-di__brand {
	margin-top: 7px;
	padding: 6px 8px;
	background: var(--tsd-green-tint);
	border: 1px solid var(--tsd-green-line);
	border-radius: 5px;
	font-size: 11.5px;
	color: var(--tsd-green-600);
	line-height: 1.45;
}
.tsd .tsd-di__bl { display: flex; gap: 6px; }
.tsd .tsd-di__bl b { font-weight: 600; }

.tsd .tsd-di__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: 9px;
}
.tsd .tsd-di__qty { font-size: 12.5px; color: var(--tsd-muted); }
.tsd .tsd-di__price { font-family: var(--tsd-font-d); font-weight: 700; font-size: 16px; color: #fff; }

/* Quantity stepper on a drawer item — the cart stepper at drawer scale. */
.tsd .tsd-di__stepper.tsd-di__stepper {
	display: inline-flex;
	align-items: center;
	height: 34px;
	background: var(--tsd-paper-2);
	border: 1px solid var(--tsd-line);
	border-radius: var(--tsd-radius-sm);
	overflow: hidden;
}
.tsd .tsd-di__stepper.tsd-di__stepper button {
	width: 32px;
	height: 100%;
	border: 0;
	background: var(--tsd-paper-2);
	color: var(--tsd-ink);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background .15s, color .15s;
}
.tsd .tsd-di__stepper.tsd-di__stepper button:hover { background: var(--tsd-green); color: #fff; }
.tsd .tsd-di__stepper.tsd-di__stepper input {
	width: 40px;
	height: 100%;
	border: 0;
	border-left: 1px solid var(--tsd-line);
	border-right: 1px solid var(--tsd-line);
	text-align: center;
	font-family: var(--tsd-font-d);
	font-weight: 600;
	font-size: 14px;
	color: #fff;
	background: var(--tsd-paper-2);
	-moz-appearance: textfield;
	padding: 0;
}
.tsd .tsd-di__stepper.tsd-di__stepper input::-webkit-outer-spin-button,
.tsd .tsd-di__stepper.tsd-di__stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- nothing in it ---------- */
.tsd .tsd-drawer__empty { padding: 52px 24px; text-align: center; }
.tsd .tsd-drawer__empty-ic {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: var(--tsd-bg);
	color: var(--tsd-muted-2);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 16px;
}
.tsd .tsd-drawer__empty h4 {
	margin: 0 0 6px;
	font-family: var(--tsd-font-d);
	font-weight: var(--tsd-h6-fw);
	font-size: var(--tsd-h6-size);
	letter-spacing: var(--tsd-h6-ls);
	line-height: var(--tsd-h6-lh);
	color: var(--tsd-ink);
}
.tsd .tsd-drawer__empty p { margin: 0 0 18px; font-size: var(--tsd-small-size); line-height: var(--tsd-small-lh); color: var(--tsd-muted); }

/* ==========================================================================
   4. FOOTER

   mockup:
     .dr-foot { border-top:1px solid var(--line); padding:14px 16px; background: var(--tsd-paper) }
     .dr-sum  { display:flex; justify-content:space-between; align-items:baseline }
     .dr-sum .v { font-d 700 21px }
     .dr-vat  { font-size:11.5px; color:var(--muted); margin-bottom:12px }
     .dr-btns { display:grid; gap:8px }
     .dr-btns.two { grid-template-columns:1fr 1fr }
   ========================================================================== */

.tsd .tsd-drawer__foot {
	border-top: 1px solid var(--tsd-line);
	padding: 14px 16px;
	flex-shrink: 0;
	background: var(--tsd-paper);
}
.tsd .tsd-drawer__foot:empty { display: none; }

.tsd .tsd-drawer__sum {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 14px;
}
.tsd .tsd-drawer__sum > span:first-child {
	font-family: var(--tsd-font-d);
	font-weight: 600;
	font-size: 15px;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: var(--tsd-muted);
}
.tsd .tsd-drawer__v {
	font-family: var(--tsd-font-d);
	font-weight: 700;
	font-size: 22px;
	color: #fff;
}
.tsd .tsd-drawer__vat { margin: 0 0 12px; font-size: var(--tsd-caption-size); line-height: var(--tsd-caption-lh); color: var(--tsd-muted); }

.tsd .tsd-drawer__btns { display: grid; gap: 8px; }
.tsd .tsd-drawer__btns--two { grid-template-columns: 1fr 1fr; }
.tsd .tsd-drawer__btns .tsd-btn { width: 100%; }

/* ==========================================================================
   5. THE BUTTONS THAT OPEN IT

   mockup .cart-mode:
     .cart-mode { display:inline-flex; background: var(--tsd-paper); border:1px solid var(--line);
                  border-radius:var(--radius-sm); padding:4px }
     .cart-mode button { padding:9px 18px; border-radius:6px; font-d 600 14px
                         uppercase; color:var(--muted) }
     .cart-mode button.on.cart  { background:var(--green); color:#fff }
     .cart-mode button.on.quote { background:var(--dark); color:#fff }
     .cm-badge { font-b 11px; background:rgba(0,0,0,.10); padding:1px 7px;
                 border-radius:9px }
   ========================================================================== */

.tsd.tsd-basket { display: inline-flex; vertical-align: middle; }

.tsd.tsd-basket--pair {
	background: none;
	border: none;
	border-radius: 0;
	padding: 0;
	gap: 14px;
}

/* These sit in the site header, which is exactly where a theme's button
   styling is most aggressive — "button { background:#eee !important }" is
   ordinary. The class is repeated to raise specificity and the properties a
   theme forces are forced back. Same approach as the checkout button. */

.tsd .tsd-basket-btn.tsd-basket-btn {
	display: inline-flex !important;
	align-items: center;
	gap: 9px;
	width: auto !important;
	height: 44px !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 18px !important;
	background: var(--tsd-paper) !important;
	border: 1px solid var(--tsd-line) !important;
	border-radius: var(--tsd-radius-sm) !important;
	box-shadow: none !important;
	font-family: var(--tsd-font-d) !important;
	font-weight: 600 !important;
	font-size: 14px !important;
	line-height: 1 !important;
	text-transform: uppercase !important;
	letter-spacing: .04em !important;
	text-decoration: none !important;
	color: var(--tsd-ink) !important;
	cursor: pointer;
	white-space: nowrap;
	float: none !important;
	transition: background .15s, border-color .15s, color .15s;
}
.tsd .tsd-basket-btn svg { flex-shrink: 0; transition: transform .15s; }

/* Icon-only account button: square, no label padding (theme padding can't
   crush the glyph), hovers to blue like the cart button. */
.tsd .tsd-basket-btn.tsd-basket-btn--icon {
	width: 44px !important;
	padding: 0 !important;
	justify-content: center;
}
.tsd .tsd-basket-btn.tsd-basket-btn--account:hover,
.tsd .tsd-basket-btn.tsd-basket-btn--account:focus-visible {
	background: var(--tsd-green) !important;
	border-color: var(--tsd-green) !important;
	color: #fff !important;
}
.tsd .tsd-basket-btn.tsd-basket-btn--account:hover svg,
.tsd .tsd-basket-btn.tsd-basket-btn--account:focus-visible svg {
	transform: translateY(-1px);
}

/* Consistent hovers: cart fills solid blue, quote takes a blue border.
   Both lift the icon, same timing. */
.tsd .tsd-basket-btn.tsd-basket-btn--cart:hover,
.tsd .tsd-basket-btn.tsd-basket-btn--cart:focus-visible {
	background: var(--tsd-green) !important;
	border-color: var(--tsd-green) !important;
	color: #fff !important;
}
.tsd .tsd-basket-btn.tsd-basket-btn--cart:hover .tsd-basket-btn__count,
.tsd .tsd-basket-btn.tsd-basket-btn--cart:focus-visible .tsd-basket-btn__count {
	background: rgba(255, 255, 255, .2) !important;
	border-color: transparent !important;
	color: #fff !important;
}
.tsd .tsd-basket-btn.tsd-basket-btn--quote:hover,
.tsd .tsd-basket-btn.tsd-basket-btn--quote:focus-visible {
	background: var(--tsd-paper-2) !important;
	border-color: var(--tsd-green) !important;
	color: #fff !important;
}
.tsd .tsd-basket-btn.tsd-basket-btn--quote:hover .tsd-basket-btn__count,
.tsd .tsd-basket-btn.tsd-basket-btn--quote:focus-visible .tsd-basket-btn__count {
	border-color: var(--tsd-green) !important;
	color: #fff !important;
}
.tsd .tsd-basket-btn.tsd-basket-btn:hover svg { transform: translateY(-1px); }

.tsd .tsd-basket-btn:focus-visible {
	outline: 2px solid var(--tsd-green);
	outline-offset: 2px;
}

/* ---------- the count ----------
   Coloured rather than grey, so a full basket reads at a glance. The cart
   takes the green, the quote the dark, matching each button's own colour. */

.tsd .tsd-basket-btn__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	font-family: var(--tsd-font-b);
	font-size: 12px;
	font-weight: 700;
	border-radius: 20px;
	background: var(--tsd-paper-2);
	border: 1px solid var(--tsd-line);
	color: var(--tsd-ink);
	transition: background .15s, border-color .15s, color .15s;
}

/* on its own, a button is solid — cart green, quote dark, as the mockup's
   selected states are */
.tsd.tsd-basket:not(.tsd-basket--pair) .tsd-basket-btn.tsd-basket-btn--cart {
	background: var(--tsd-green) !important;
	color: #fff !important;
}
.tsd.tsd-basket:not(.tsd-basket--pair) .tsd-basket-btn.tsd-basket-btn--cart:hover {
	background: var(--tsd-green-600) !important;
	color: #fff !important;
}
.tsd.tsd-basket:not(.tsd-basket--pair) .tsd-basket-btn.tsd-basket-btn--quote {
	background: var(--tsd-dark) !important;
	color: #fff !important;
}
.tsd.tsd-basket:not(.tsd-basket--pair) .tsd-basket-btn.tsd-basket-btn--quote:hover {
	background: #000 !important;
	color: #fff !important;
}
/* a solid button already carries the colour, so its badge is a light wash of
   the button rather than a second block of it */
.tsd.tsd-basket:not(.tsd-basket--pair) .tsd-basket-btn__count {
	background: rgba(255, 255, 255, .24);
	color: #fff;
}

/* a quieter variant, for a header that is already busy */
.tsd.tsd-basket .tsd-basket-btn.tsd-basket-btn--plain {
	background: none !important;
	color: var(--tsd-ink) !important;
	padding: 9px 10px !important;
}
.tsd.tsd-basket .tsd-basket-btn.tsd-basket-btn--plain:hover {
	background: var(--tsd-paper-2) !important;
	color: #fff !important;
}
.tsd.tsd-basket .tsd-basket-btn--plain .tsd-basket-btn__count {
	background: var(--tsd-paper-2);
	border: 1px solid var(--tsd-line);
	color: var(--tsd-ink);
}

/* ==========================================================================
   6. NARROW SCREENS — mockup: .drawer { width:100% }
   ========================================================================== */

@media screen and (max-width: 520px) {
	.tsd .tsd-drawer { width: 100%; }
	.tsd .tsd-basket-btn { padding: 9px 12px; font-size: 13px; }
	.tsd .tsd-basket-btn__label { display: none; }
	.tsd.tsd-basket--pair .tsd-basket-btn__label { display: none; }
}
