/**
 * LabelSwift custom mini cart.
 *
 * All selectors prefixed with .lscc-mc- so nothing collides with theme
 * or Elementor styles. Loaded globally on every front-end page.
 *
 * Brand: #499CC2 teal · #252531 dark · #E8833A orange · DM Sans.
 */

/* ============================================================
   Trigger group (header) — Instant Quote button + cart icon
   ============================================================ */

.lscc-mc-trigger-group {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
	min-width: 0; /* allow shrinking inside flex parents */
	max-width: 100%;
}

.lscc-mc-quoter-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	background: #499CC2;
	color: #ffffff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	border-radius: 6px;
	text-decoration: none;
	border: 2px solid #499CC2;
	transition: background 0.15s ease, border-color 0.15s ease;
	white-space: nowrap;
	min-width: 0;
	flex-shrink: 1; /* shrink first if space is tight */
}
.lscc-mc-quoter-btn:hover,
.lscc-mc-quoter-btn:focus {
	background: #1e5f80;
	border-color: #1e5f80;
	color: #ffffff;
	text-decoration: none;
}
.lscc-mc-quoter-btn-icon {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
}
.lscc-mc-quoter-btn-icon svg {
	display: block;
}
.lscc-mc-quoter-btn-label {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}

.lscc-mc-cart-fragment {
	display: inline-flex;
	flex-shrink: 0; /* never push the cart icon off-screen */
}

.lscc-mc-trigger {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: transparent;
	border: none;
	padding: 8px 12px;
	cursor: pointer;
	color: #252531;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	flex-shrink: 0;
	text-decoration: none; /* the mobile variant is an <a> */
}

/* v3.0.5 — Desktop/mobile trigger swap. The desktop variant is a
   <button> that opens the slide-out panel via JS. The mobile variant
   is an <a href="/cart/"> that's a plain link — no JS, no race
   conditions on iOS Safari. CSS media queries decide which is shown. */
.lscc-mc-trigger--desktop { display: inline-flex; }
.lscc-mc-trigger--mobile  { display: none; }

@media (max-width: 768px) {
	.lscc-mc-trigger--desktop { display: none; }
	.lscc-mc-trigger--mobile  { display: inline-flex; }
}

/* v3.1.9 — On the /cart page, only the direct-link variant is rendered
   (the desktop button isn't output at all). It needs to display on
   desktop too, not just mobile. The --always modifier overrides the
   default mobile-only rule. */
.lscc-mc-trigger--mobile.lscc-mc-trigger--always { display: inline-flex; }
/* v3.0.6 — Branded hover. The previous rule only set color, leaving the
   theme/Elementor button hover (dark gray rectangle) showing through.
   Now we override with an orange pill that matches the brand, and the
   total + icon flip to white for legibility. */
.lscc-mc-trigger {
	border-radius: 8px;
	transition: background 0.15s ease, color 0.15s ease;
}
.lscc-mc-trigger:hover,
.lscc-mc-trigger:focus {
	background: #E8833A !important;
	color: #ffffff !important;
	outline: none;
}
.lscc-mc-trigger:hover .lscc-mc-trigger-total,
.lscc-mc-trigger:focus .lscc-mc-trigger-total,
.lscc-mc-trigger:hover .lscc-mc-trigger-icon,
.lscc-mc-trigger:focus .lscc-mc-trigger-icon {
	color: #ffffff;
}
.lscc-mc-trigger:focus-visible {
	outline: 2px solid #E8833A;
	outline-offset: 2px;
}

.lscc-mc-trigger-total {
	font-weight: 600;
	font-size: 14px;
	color: inherit;
}

.lscc-mc-trigger-icon {
	position: relative;
	display: inline-flex;
	align-items: center;
}
.lscc-mc-trigger-icon svg {
	display: block;
	stroke: currentColor;
}

.lscc-mc-trigger-count {
	position: absolute;
	top: -8px;
	right: -8px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	background: #E8833A;
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
	border-radius: 9px;
	box-sizing: border-box;
}

/* Hide dollar amount on tablet/mobile per spec */
@media (max-width: 1024px) {
	.lscc-mc-trigger-total {
		display: none;
	}
}

/* v3.0.8 — Quoter button compacts a touch on smaller screens. Label is
   the same ("Quote") at every breakpoint, just lighter padding to keep
   the trigger group balanced next to the cart icon on phones. */
@media (max-width: 768px) {
	.lscc-mc-quoter-btn {
		padding: 8px 12px;
		gap: 6px;
		font-size: 13px;
	}
}

@media (max-width: 480px) {
	.lscc-mc-trigger-group {
		gap: 8px;
	}
	.lscc-mc-quoter-btn {
		padding: 8px 10px;
	}
}

/* ============================================================
   Slide-out panel
   ============================================================ */

.lscc-mc-overlay {
	position: fixed;
	inset: 0;
	background: rgba(37, 37, 49, 0.45);
	z-index: 99998;
	opacity: 0;
	transition: opacity 0.25s ease;
}
.lscc-mc-overlay[hidden] {
	display: none;
}
.lscc-mc-overlay.is-open {
	opacity: 1;
}

.lscc-mc-panel {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: 420px;
	max-width: 100vw;
	background: #f7f8fa;
	box-shadow: -8px 0 24px rgba(0, 0, 0, 0.15);
	z-index: 99999;
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
	color: #252531;
}
/* WP admin bar offset for logged-in users */
.admin-bar .lscc-mc-panel {
	top: 32px;
}
@media screen and (max-width: 782px) {
	.admin-bar .lscc-mc-panel {
		top: 46px;
	}
}
.lscc-mc-panel[hidden] {
	display: none;
}
.lscc-mc-panel.is-open {
	transform: translateX(0);
}

@media (max-width: 480px) {
	.lscc-mc-panel {
		width: 100vw;
	}
}

.lscc-mc-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px;
	background: #ffffff;
	border-bottom: 1px solid #e2e6ea;
	flex-shrink: 0;
}
.lscc-mc-panel-title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #252531;
	letter-spacing: -0.01em;
}
.lscc-mc-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: #f3f4f6;
	border: 1px solid #e2e6ea;
	border-radius: 50%;
	color: #252531;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
	padding: 0;
}
.lscc-mc-close:hover,
.lscc-mc-close:focus {
	background: #252531;
	color: #ffffff;
	border-color: #252531;
	outline: none;
}
.lscc-mc-close svg {
	display: block;
	stroke-width: 2.5;
}

/* The body scrolls — flex:1 so it takes remaining height between
   header and footer. Footer is rendered inside the body so we keep
   one scroll container; flex order lets the footer pin to the bottom. */
.lscc-mc-panel-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

/* ============================================================
   Cards list (scrollable area)
   ============================================================ */

.lscc-mc-cards {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	-webkit-overflow-scrolling: touch;
}

/* ============================================================
   Single cart card — matches Order Summary style
   ============================================================ */

.lscc-mc-card {
	background: #ffffff;
	border: 1px solid #e2e6ea;
	border-radius: 10px;
	overflow: hidden;
	font-size: 13px;
	line-height: 1.45;
	flex-shrink: 0;
}

.lscc-mc-card-header {
	background: #499CC2;
	color: #ffffff;
	padding: 8px 14px;
}
.lscc-mc-card-title {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0;
}

.lscc-mc-card-body {
	padding: 10px 14px 12px;
}

.lscc-mc-card-project {
	font-size: 13px;
	font-weight: 700;
	color: #252531;
	margin: 0 0 8px;
	padding-bottom: 6px;
	border-bottom: 1px solid #f1f3f5;
}

/* Spec rows — gray label left, dark value right, thin dividers.
   Tightened in v3.0.1: smaller padding, smaller font, less air. */
.lscc-mc-card-specs {
	display: flex;
	flex-direction: column;
}
.lscc-mc-card-spec {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 5px 0;
	font-size: 12.5px;
	border-bottom: 1px solid #f1f3f5;
	gap: 12px;
}
.lscc-mc-card-spec:last-child {
	border-bottom: none;
}
.lscc-mc-card-spec-label {
	color: #6b7280;
	font-weight: 400;
	white-space: nowrap;
}
.lscc-mc-card-spec-value {
	color: #252531;
	font-weight: 600;
	text-align: right;
	max-width: 65%;
}

/* Version rows — sit BELOW the specs. Each row: name on left, qty pill
   on right. Compact, with a top divider to separate from the specs block. */
.lscc-mc-card-versions {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid #f1f3f5;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.lscc-mc-card-version-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 13px;
	gap: 12px;
}
.lscc-mc-card-version-name {
	color: #374151;
	font-weight: 500;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.lscc-mc-card-version-qty {
	background: #e8f4fa;
	color: #499CC2;
	font-weight: 600;
	font-size: 12px;
	padding: 2px 10px;
	border-radius: 10px;
	line-height: 1.4;
	flex-shrink: 0;
}

/* Price row — sits BELOW the versions. Larger and teal so it stands out. */
.lscc-mc-card-price-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid #f1f3f5;
	font-size: 14px;
}
.lscc-mc-card-price-label {
	color: #6b7280;
	font-weight: 500;
}
.lscc-mc-card-price-value {
	color: #499CC2;
	font-weight: 700;
	font-size: 16px;
}

/* Card actions footer — × trash + ✏ pencil */
.lscc-mc-card-actions {
	display: flex;
	gap: 6px;
	padding: 8px 14px;
	background: #fafbfc;
	border-top: 1px solid #f1f3f5;
}
.lscc-mc-card-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: #f3f4f6;
	color: #6b7280;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
	border: none;
	cursor: pointer;
}
.lscc-mc-card-action svg {
	display: block;
}
.lscc-mc-card-edit:hover,
.lscc-mc-card-edit:focus {
	background: #e8f4fa;
	color: #499CC2;
	text-decoration: none;
	outline: none;
}
.lscc-mc-card-remove:hover,
.lscc-mc-card-remove:focus {
	background: #fee2e2;
	color: #dc2626;
	text-decoration: none;
	outline: none;
}

/* ============================================================
   Empty state
   ============================================================ */

.lscc-mc-empty {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 40px 24px;
	text-align: center;
	gap: 16px;
}
.lscc-mc-empty-msg {
	color: #6b7280;
	font-size: 15px;
	margin: 0;
}
.lscc-mc-empty-cta {
	display: inline-block;
	background: #499CC2;
	color: #ffffff;
	padding: 12px 22px;
	border-radius: 6px;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.15s ease;
}
.lscc-mc-empty-cta:hover,
.lscc-mc-empty-cta:focus {
	background: #1e5f80;
	color: #ffffff;
	text-decoration: none;
}

/* ============================================================
   Panel footer — subtotal + view cart + checkout
   ============================================================ */

.lscc-mc-panel-footer {
	flex-shrink: 0;
	padding: 16px 20px 20px;
	background: #ffffff;
	border-top: 1px solid #e2e6ea;
}
.lscc-mc-subtotal-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 14px;
	padding-bottom: 14px;
	border-bottom: 1px solid #f1f3f5;
}
.lscc-mc-subtotal-label {
	font-size: 16px;
	font-weight: 700;
	color: #252531;
}
.lscc-mc-subtotal-value {
	font-size: 18px;
	font-weight: 700;
	color: #499CC2;
}

.lscc-mc-footer-buttons {
	display: flex;
	gap: 10px;
}
.lscc-mc-btn {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 16px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
	border: 2px solid #499CC2;
	box-sizing: border-box;
	line-height: 1.3;
	font-family: inherit;
}
.lscc-mc-btn-secondary {
	background: #ffffff;
	color: #499CC2;
}
.lscc-mc-btn-secondary:hover,
.lscc-mc-btn-secondary:focus {
	background: #e8f4fa;
	color: #1e5f80;
	border-color: #1e5f80;
	text-decoration: none;
}
.lscc-mc-btn-primary {
	background: #499CC2;
	color: #ffffff;
}
.lscc-mc-btn-primary:hover,
.lscc-mc-btn-primary:focus {
	background: #1e5f80;
	border-color: #1e5f80;
	color: #ffffff;
	text-decoration: none;
}

/* ============================================================
   Body lock when panel open
   ============================================================ */

body.lscc-mc-open {
	overflow: hidden;
}
