/**
 * Cart drawer – opens from RIGHT side (second-image style).
 * "Min kundvagn", payment icons, white product cards, Totalt, Fortsätt till kassan.
 */

/* Mini-cart trigger icon – black when empty, red when has products */
#autohjul-mini-cart {
	cursor: pointer;
	position: relative;
	display: inline-block;
}
#autohjul-mini-cart * {
	cursor: pointer;
}
/* Default + empty: icon black */
#autohjul-mini-cart .elementor-icon,
#autohjul-mini-cart .elementor-icon i,
#autohjul-mini-cart i,
#autohjul-mini-cart svg,
#autohjul-mini-cart .elementor-icon-wrapper {
	color: #1a1a1a !important;
	fill: #1a1a1a !important;
}
/* Has products only: icon red (so refresh with empty cart stays black) */
#autohjul-mini-cart.autohjul-cart-has-items .elementor-icon,
#autohjul-mini-cart.autohjul-cart-has-items .elementor-icon i,
#autohjul-mini-cart.autohjul-cart-has-items i,
#autohjul-mini-cart.autohjul-cart-has-items svg,
#autohjul-mini-cart.autohjul-cart-has-items .elementor-icon-wrapper {
	color: #b81c23 !important;
	fill: #b81c23 !important;
}
/* Product count badge – products count, not total qty */
.autohjul-cart-count-badge {
	position: absolute;
	top: -6px;
	right: -6px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	background: #b81c23;
	color: #fff !important;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
	border-radius: 999px;
	box-sizing: border-box;
}
.autohjul-cart-count-badge[data-count="0"] {
	display: none;
}

/* Full-screen overlay; panel on the RIGHT */
.blocksy-child-cart-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: stretch;
	justify-content: flex-end;
	padding: 0;
	pointer-events: none;
	visibility: hidden;
	opacity: 0;
	transition: visibility 0.3s, opacity 0.3s;
}

.blocksy-child-cart-modal:not(.is-closed) {
	pointer-events: auto;
	visibility: visible;
	opacity: 1;
}

.blocksy-child-cart-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
}

/* Panel: fixed to RIGHT, full height – width fixed (do not increase) */
.blocksy-child-cart-modal-box {
	position: relative;
	width: min(380px, 100vw);
	max-width: 380px;
	height: 100vh;
	background: #fff;
	border-radius: 0;
	box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	z-index: 1;
	box-sizing: border-box;
}

.blocksy-child-cart-modal:not(.is-closed) .blocksy-child-cart-modal-box {
	transform: translateX(0);
}

.blocksy-child-cart-modal-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 36px;
	height: 36px;
	border: none;
	background: transparent;
	font-size: 24px;
	line-height: 1;
	color: #333;
	cursor: pointer;
	z-index: 2;
}

.blocksy-child-cart-modal-close:hover {
	color: #000;
}

.blocksy-child-cart-modal-content {
	overflow-y: auto;
	padding: 12px 14px 14px;
	flex: 1;
	min-height: 0;
}

/* Header: blue icon + "Min kundvagn" – compact */
.bcc-modal-header {
	text-align: center;
	margin-bottom: 10px;
}

.bcc-modal-title-icon {
	display: inline-block;
	color: #0066cc;
	margin-bottom: 2px;
}

.bcc-modal-title-icon svg {
	display: block;
	width: 22px;
	height: 22px;
}

.bcc-modal-title {
	font-size: 1.1rem;
	font-weight: 700;
	color: #0066cc;
	margin: 0;
}

/* Payment row – compact */
.bcc-modal-payment-row {
	text-align: center;
	margin-bottom: 12px;
}

/* External warehouse notice – red text, only when cart has items from external */
.bcc-modal-external-lager-msg {
	color: #b81c23;
	font-size: 13px;
	line-height: 1.45;
	padding: 10px 14px;
	margin: 0 12px 14px;
	background: #fff;
	border: 1px solid rgba(184, 28, 35, 0.25);
	border-radius: 6px;
}

.bcc-payment-icons {
	max-width: 100%;
	height: auto;
	max-height: 26px;
	object-fit: contain;
}

/* Product cards – small, compact (second pic style) */
.bcc-modal-items {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.bcc-modal-item-card {
	display: grid;
	grid-template-columns: 72px 1fr;
	gap: 10px;
	align-items: flex-start;
	padding: 10px 12px;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.bcc-card-image {
	flex-shrink: 0;
}

.bcc-card-image a,
.bcc-card-image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
	max-height: 72px;
	object-fit: cover;
}

.bcc-card-body {
	min-width: 0;
}

/* Product name – compact */
.bcc-card-title {
	font-size: 12px;
	font-weight: 700;
	color: #000;
	margin: 0 0 4px;
	line-height: 1.25;
}

.bcc-card-title a {
	color: inherit;
	text-decoration: none;
}

.bcc-card-title a:hover {
	text-decoration: underline;
}

/* Unit price – blue */
.bcc-card-unit-price {
	font-size: 12px;
	color: #0066cc;
	margin: 0 0 2px;
}

/* Stock – compact */
.bcc-card-stock {
	font-size: 11px;
	color: #000;
	margin: 0 0 2px;
}

.bcc-stock-info-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 14px;
	height: 14px;
	margin-left: 2px;
	background: #28a745;
	color: #fff;
	border-radius: 50%;
	font-size: 10px;
	font-style: italic;
}

/* Line total – bold black, compact */
.bcc-card-line-total {
	font-size: 12px;
	font-weight: 700;
	color: #000;
	margin: 0 0 6px;
}

/* Quantity: small blue +/- only (no checkbox) */
.bcc-card-qty {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-bottom: 6px;
}

.bcc-qty-btn {
	width: 24px;
	height: 24px;
	border: none;
	border-radius: 50%;
	background: #0066cc;
	color: #fff;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.bcc-qty-btn:hover {
	background: #0052a3;
}

.bcc-qty-input {
    width: auto !important;
    padding: unset !important;
    height: 24px !important;
    text-align: center !important;
    font-size: 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    background: #f5f5f5;
}

.bcc-quick-view {
	font-size: 11px;
	color: #0066cc;
	text-decoration: underline;
	display: inline-block;
	margin-bottom: 6px;
}

/* Remove – red with trash icon */
.bcc-card-remove-wrap {
	border-top: 1px solid #eee;
	padding-top: 6px;
}

.bcc-remove-link {
	font-size: 11px;
	color: #dc3545 !important;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.bcc-remove-link:hover {
	text-decoration: underline;
}

.bcc-remove-icon {
	font-size: 12px;
}

/* Empty state */
.bcc-modal-empty {
	text-align: center;
	color: #666;
	font-size: 13px;
	padding: 16px 0;
	margin: 0;
}

/* Footer: Totalt + blue button – compact */
.bcc-modal-footer {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #e5e5e5;
}

.bcc-modal-total-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
	font-weight: 700;
	font-size: 14px;
	color: #000;
}

.bcc-total-amount .woocommerce-Price-amount {
	font-weight: 700;
}

/* Two buttons: stacked so both visible, panel width unchanged */
.bcc-modal-footer-buttons {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.bcc-cart-btn,
.bcc-checkout-btn {
	display: block;
	width: 100%;
	box-sizing: border-box;
	text-align: center;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none !important;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.bcc-cart-btn {
	padding: 10px 14px;
	background: #fff !important;
	color: #0066cc !important;
	border: 2px solid #0066cc;
}

.bcc-cart-btn:hover {
	background: #f0f7ff !important;
	color: #0052a3 !important;
	border-color: #0052a3;
}

.bcc-checkout-btn {
	padding: 12px 16px;
	background: #0066cc !important;
	color: #fff !important;
	border: 2px solid transparent;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bcc-checkout-btn:hover {
	background: #0052a3 !important;
	color: #fff !important;
}

body.blocksy-child-cart-modal-open {
	overflow: hidden;
}
