/**
 * DeVsN Addons — Sidebar Cart widget styles.
 */

.devsn-cart-widget {
	display: flex;
	align-items: center;
}

.devsn-cart__toggle {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: transparent;
	border: 0;
	cursor: pointer;
	line-height: 1;
	color: inherit;
	padding: 6px;
	transition: background-color .2s ease, color .2s ease;
}

.devsn-cart__toggle-icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	color: inherit;
}

.devsn-cart__toggle-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.devsn-cart__toggle-texts {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	text-align: left;
}

.devsn-cart__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	border-radius: 50px;
	background: #e02b20;
	color: #fff;
	box-sizing: border-box;
}

.devsn-cart--badge .devsn-cart__count {
	position: absolute;
	top: -8px;
	right: -10px;
}

.devsn-cart--inline .devsn-cart__count {
	position: static;
	margin-left: 6px;
}

.devsn-cart__count[hidden] {
	display: none;
}

/* Panel ---------------------------------------------------------------- */

.devsn-cart__panel-wrap {
	position: fixed;
	inset: 0;
	z-index: 99999;
}

.devsn-cart__panel-wrap[hidden] {
	display: none;
}

.devsn-cart__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .5);
	opacity: 0;
	transition: opacity .25s ease;
}

.devsn-cart__panel {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 400px;
	max-width: 100%;
	display: flex;
	flex-direction: column;
	background: #fff;
	color: #1f2430;
	padding: 18px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .18);
	transition: transform .3s ease;
	box-sizing: border-box;
}

.devsn-cart--side-right .devsn-cart__panel {
	right: 0;
	transform: translateX(100%);
}

.devsn-cart--side-left .devsn-cart__panel {
	left: 0;
	transform: translateX(-100%);
}

.devsn-cart-widget.is-open .devsn-cart__panel {
	transform: translateX(0);
}

.devsn-cart-widget.is-open .devsn-cart__overlay {
	opacity: 1;
}

.devsn-cart__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.devsn-cart__heading {
	font-size: 17px;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.devsn-cart__close {
	background: transparent;
	border: 0;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	color: inherit;
	padding: 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.devsn-cart__close svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* Items ---------------------------------------------------------------- */

.devsn-cart__items {
	flex: 1 1 auto;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 14px 0;
}

.devsn-cart__item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding-bottom: 14px;
	border-bottom: 1px solid rgba(0, 0, 0, .07);
}

.devsn-cart__item:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.devsn-cart__item.is-busy {
	opacity: .5;
	pointer-events: none;
}

.devsn-cart__thumb {
	flex: 0 0 auto;
	width: 70px;
}

.devsn-cart__thumb img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 6px;
}

.devsn-cart__info {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.devsn-cart__name {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
}

.devsn-cart__name a {
	color: inherit;
	text-decoration: none;
}

.devsn-cart__cat,
.devsn-cart__desc,
.devsn-cart__meta {
	font-size: 12px;
	opacity: .75;
	line-height: 1.4;
}

.devsn-cart__meta p {
	margin: 0;
}

.devsn-cart__prices {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 600;
}

.devsn-cart__regular {
	font-weight: 400;
	opacity: .6;
	text-decoration: line-through;
}

.devsn-cart__qty {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	border: 1px solid rgba(0, 0, 0, .15);
	border-radius: 6px;
	overflow: hidden;
	margin-top: 4px;
}

.devsn-cart__minus,
.devsn-cart__plus {
	width: 26px;
	height: 26px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 0;
	cursor: pointer;
	color: inherit;
	font-size: 11px;
	padding: 0;
}

.devsn-cart__qty .devsn-ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
}

.devsn-cart__qty .devsn-ico svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.devsn-cart__qty-input {
	width: 38px;
	height: 26px;
	border: 0;
	background: transparent;
	text-align: center;
	font-size: 13px;
	color: inherit;
	padding: 0;
	-moz-appearance: textfield;
	appearance: textfield;
}

.devsn-cart__qty-input::-webkit-outer-spin-button,
.devsn-cart__qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.devsn-cart__line-total {
	font-size: 13px;
	font-weight: 600;
}

.devsn-cart__remove {
	flex: 0 0 auto;
	background: transparent;
	border: 0;
	cursor: pointer;
	color: inherit;
	opacity: .65;
	font-size: 14px;
	line-height: 1;
	padding: 4px;
	transition: opacity .2s ease, color .2s ease;
}

.devsn-cart__remove:hover {
	opacity: 1;
}

.devsn-cart__remove svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.devsn-cart__empty {
	padding: 24px 0;
	text-align: center;
	font-size: 14px;
	opacity: .7;
}

/* Footer --------------------------------------------------------------- */

.devsn-cart__footer {
	flex: 0 0 auto;
	border-top: 1px solid rgba(0, 0, 0, .08);
	padding-top: 14px;
}

.devsn-cart__total-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 10px;
}

.devsn-cart__actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.devsn-cart--btns-row .devsn-cart__actions {
	flex-direction: row;
}

.devsn-cart--btns-row .devsn-cart__btn {
	flex: 1 1 0;
}

.devsn-cart__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 16px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	line-height: 1.2;
	transition: background-color .2s ease, color .2s ease;
	box-sizing: border-box;
}

.devsn-cart__btn svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.devsn-cart__btn--cart {
	background: #f1f3f6;
	color: #1f2430;
}

.devsn-cart__btn--checkout {
	background: #1f2430;
	color: #fff;
}

body.devsn-cart-open {
	overflow: hidden;
}

@media (max-width: 480px) {
	.devsn-cart__panel {
		width: 88vw;
	}
}
