/**
 * SoftXAsia Woo Wishlist — frontend styles.
 */

:root {
	--sxwl-color: #e74c3c;
	--sxwl-color-added: #e74c3c;
}

.sxwl-btn {
	align-items: center;
	background: transparent;
	border: 1px solid var(--sxwl-color);
	border-radius: 4px;
	color: var(--sxwl-color);
	cursor: pointer;
	display: inline-flex;
	gap: 0.35em;
	line-height: 1.2;
	padding: 0.45em 0.75em;
	transition: background 0.2s, color 0.2s;
}

.sxwl-btn--added {
	background: var(--sxwl-color-added);
	border-color: var(--sxwl-color-added);
	color: #fff;
}

.sxwl-btn--small { font-size: 0.85em; padding: 0.3em 0.55em; }
.sxwl-btn--large { font-size: 1.05em; padding: 0.6em 1em; }

.sxwl-btn__icon svg { display: block; height: 1.1em; width: 1.1em; }

.sxwl-counter {
	align-items: center;
	color: inherit;
	display: inline-flex;
	gap: 0.35em;
	position: relative;
	text-decoration: none;
}

li.sxwl-menu-item {
	align-items: center;
	display: inline-flex;
	list-style: none;
	margin: 0;
}

li.sxwl-menu-item > .sxwl-counter {
	align-items: center;
	display: inline-flex;
	white-space: nowrap;
}

.sxwl-counter__badge {
	background: var(--sxwl-color);
	border-radius: 999px;
	color: #fff;
	font-size: 0.75em;
	line-height: 1;
	min-width: 1.4em;
	padding: 0.15em 0.4em;
	text-align: center;
}

.sxwl-counter--floating {
	background: #fff;
	border-radius: 999px;
	bottom: 1.5rem;
	box-shadow: 0 4px 16px rgba(0,0,0,.15);
	padding: 0.75rem;
	position: fixed;
	right: 1.5rem;
	z-index: 999;
}

.sxwl-page {
	margin: 0 auto;
	width: 100%;
}

.sxwl-page__inner--full {
	max-width: none;
	padding-left: 1rem;
	padding-right: 1rem;
	width: 100%;
}

.sxwl-page .container {
	margin-left: auto;
	margin-right: auto;
}

.sxwl-page__title {
	font-size: 1.75em;
	margin: 0 0 1em;
}

.sxwl-page__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin-bottom: 1.5em;
}

.sxwl-page__actions button, .sxwl-page__actions a.button {
    margin: 0;
    height: 40px;
    line-height: 19px;
}

.sxwl-table img { max-width: 80px; height: auto; }

.sxwl-grid {
	display: grid;
	gap: 1.25em;
	grid-template-columns: repeat(var(--sxwl-cols, 4), minmax(0, 1fr));
}

.sxwl-grid__item {
	border: 1px solid #eee;
	border-radius: 6px;
	padding: 1em;
	position: relative;
}

.sxwl-grid__image img { display: block; height: auto; width: 100%; }

.sxwl-remove {
	background: transparent;
	border: 0;
	cursor: pointer;
	font-size: 1.25em;
	line-height: 1;
	position: absolute;
	right: 0.5em;
	top: 0.5em;
}

.sxwl-share {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin-bottom: 1.25em;
}

.sxwl-share__btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: inherit;
    cursor: pointer;
    padding: 0.35em 0.75em;
    text-decoration: none;
    margin: 0;
    height: 40px;
    line-height: 28px;
}

.sxwl-toast {
	opacity: 0;
	pointer-events: none;
	position: fixed;
	transition: opacity 0.25s;
	z-index: 10000;
}

.sxwl-toast.is-visible { opacity: 1; }

.sxwl-toast--top-left { left: 1rem; top: 1rem; }
.sxwl-toast--top-right { right: 1rem; top: 1rem; }
.sxwl-toast--bottom-left { bottom: 1rem; left: 1rem; }
.sxwl-toast--bottom-right { bottom: 1rem; right: 1rem; }

.sxwl-toast__inner {
	background: #222;
	border-radius: 6px;
	color: #fff;
	padding: 0.75em 1em;
}

.sxwl-popup[hidden] { display: none; }

.sxwl-popup {
	inset: 0;
	position: fixed;
	z-index: 10001;
}

.sxwl-popup__backdrop {
	background: rgba(0,0,0,.45);
	inset: 0;
	position: absolute;
}

.sxwl-popup__dialog {
	background: #fff;
	border-radius: 8px;
	left: 50%;
	max-width: 420px;
	padding: 1.5em;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	width: calc(100% - 2rem);
}

.sxwl-popup__close {
	background: transparent;
	border: 0;
	cursor: pointer;
	font-size: 1.5em;
	position: absolute;
	right: 0.5em;
	top: 0.25em;
}

.sxwl-popup__image img { display: block; height: auto; margin: 0 auto 1em; max-width: 160px; }

.sxwl-popup__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin-top: 1em;
}

.sxwl-empty { margin-bottom: 1em; }

@media (max-width: 767px) {
	.sxwl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
