/* Dimension — Cart Sidebar Styles */
/* Matches Dimension's dark glass aesthetic: #1b1f22 bg, white hairline borders, 4px radius */

/* ========================================
   CART SIDEBAR
   ======================================== */

.cart-sidebar {
	position: fixed;
	top: 0;
	right: -400px;
	width: 400px;
	max-width: 100%;
	height: 100vh;
	background: #1b1f22;
	border-left: solid 1px rgba(255, 255, 255, 0.2);
	z-index: 1000;
	transition: right 0.325s ease-in-out;
	display: flex;
	flex-direction: column;
}

.cart-sidebar.open {
	right: 0;
}

/* ── Header bar ── */

.cart-header {
	padding: 1.75rem 2rem;
	border-bottom: solid 1px rgba(255, 255, 255, 0.2);
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-shrink: 0;
}

.cart-header h3 {
	margin: 0;
	font-size: 0.75rem;
	letter-spacing: 0.2rem;
	text-transform: uppercase;
	font-weight: 600;
	color: #ffffff;
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.cart-header h3 i {
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.6);
}

/* ── Close button — circular ghost ── */

.cart-close {
	background: transparent;
	border: none;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.85rem;
	cursor: pointer;
	width: 2.25rem;
	height: 2.25rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
	flex-shrink: 0;
}

.cart-close:hover {
	background-color: rgba(255, 255, 255, 0.1);
	box-shadow: inset 0 0 0 1px #ffffff;
	color: #ffffff;
}

/* ── Items list ── */

.cart-items {
	flex: 1;
	overflow-y: auto;
	padding: 1.25rem 1.5rem;
	overscroll-behavior: contain;
}

.cart-item {
	display: flex;
	gap: 0.9rem;
	padding: 1rem 0;
	border-bottom: solid 1px rgba(255, 255, 255, 0.1);
}

.cart-item:last-child {
	border-bottom: none;
}

.cart-item-image {
	width: 56px;
	height: 56px;
	background: rgba(255, 255, 255, 0.06);
	border: solid 1px rgba(255, 255, 255, 0.12);
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	overflow: hidden;
}

.cart-item-image i {
	font-size: 1.4rem;
	color: rgba(255, 255, 255, 0.3);
}

.cart-item-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cart-item-details {
	flex: 1;
	min-width: 0;
}

.cart-item-name {
	font-size: 0.72rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1rem;
	color: #ffffff;
	margin-bottom: 0.2rem;
	overflow-wrap: break-word;
	word-break: break-word;
}

.cart-item-price {
	font-size: 0.72rem;
	color: rgba(255, 255, 255, 0.55);
	margin-top: 0.15rem;
}

/* ── Remove button — subtle at rest, visible on hover ── */

.cart-item-remove {
	background: transparent;
	border: none;
	box-shadow: none;
	border-radius: 4px;
	color: rgba(255, 255, 255, 0.3);
	cursor: pointer;
	padding: 0.2rem 0.45rem;
	font-size: 0.62rem;
	letter-spacing: 0.1rem;
	text-transform: uppercase;
	font-weight: 600;
	font-family: "Source Sans Pro", sans-serif;
	align-self: flex-start;
	transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
	height: auto;
	line-height: 1.4;
}

.cart-item-remove:hover {
	color: #ffffff;
	background-color: rgba(255, 255, 255, 0.08);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

/* ── Empty state ── */

.cart-empty {
	text-align: center;
	padding: 3rem 1rem;
	color: rgba(255, 255, 255, 0.35);
	font-size: 0.85rem;
}

.cart-empty i {
	font-size: 2.5rem;
	display: block;
	margin-bottom: 1rem;
	color: rgba(255, 255, 255, 0.2);
}

/* ── Footer panel — intentional chrome, not generic gray ── */

.cart-footer {
	padding: 1.5rem 2rem;
	border-top: solid 1px rgba(255, 255, 255, 0.2);
	background: rgba(255, 255, 255, 0.03);
	flex-shrink: 0;
}

.cart-subtotal {
	font-size: 0.75rem;
	letter-spacing: 0.1rem;
	text-transform: uppercase;
	font-weight: 600;
	margin-bottom: 0.75rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: #ffffff;
}

.cart-subtotal span {
	font-size: 1rem;
	letter-spacing: 0;
	text-transform: none;
	font-weight: 300;
}

.cart-disclaimer {
	color: rgba(255, 255, 255, 0.35);
	font-size: 0.68rem;
	line-height: 1.5;
	margin-bottom: 1.25rem;
}

/* Checkout button — standard Dimension primary */
#cart-checkout {
	width: 100%;
}

/* ── Overlay ── */

.cart-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.65);
	z-index: 999;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.325s ease-in-out, visibility 0.325s ease-in-out;
}

.cart-overlay.open {
	opacity: 1;
	visibility: visible;
}

/* ── Quantity buttons (shared cart inline controls) ── */

[data-rxspot-qty-inc],
[data-rxspot-qty-dec] {
	width: 1.75rem !important;
	height: 1.75rem !important;
	min-width: auto !important;
	padding: 0 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	font-size: 1.5rem !important;
	font-weight: 300 !important;
	line-height: 1 !important;
	letter-spacing: 0 !important;
	border-radius: 50% !important;
	background: transparent !important;
	border: none !important;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35) !important;
	color: #ffffff !important;
	cursor: pointer;
	transition: background-color 0.2s ease-in-out !important;
}

[data-rxspot-qty-inc]:hover,
[data-rxspot-qty-dec]:hover {
	background: rgba(255, 255, 255, 0.1) !important;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6) !important;
}
