/*!
 * WP Interactive Cart Drawer — styles
 * Colours, radius, fonts and width come from CSS variables set in the plugin settings.
 */

.wicd-root {
	--wicd-ease: cubic-bezier(.2, .7, .2, 1);
	--wicd-focus: rgba(var(--wicd-primary-rgb), .18);
	--wicd-soft: rgba(var(--wicd-primary-rgb), .08);
	font-family: var(--wicd-font);
	font-size: var(--wicd-font-size);
	line-height: 1.5;
	color: var(--wicd-text);
}
.wicd-root *, .wicd-root *::before, .wicd-root *::after { box-sizing: border-box; }
.wicd-root button, .wicd-root input, .wicd-root a { font-family: inherit; }
.wicd-root a { color: inherit; text-decoration: none; }
.wicd-root .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wicd-icon { flex: 0 0 auto; display: inline-block; vertical-align: middle; }

html.wicd-lock, html.wicd-lock body { overflow: hidden !important; }

/* ------------------------------------------------------------------
 * Overlay + panel
 * ---------------------------------------------------------------- */
.wicd-overlay {
	position: fixed; inset: 0; z-index: 999990;
	background: rgba(10, 16, 28, var(--wicd-overlay));
	-webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
	opacity: 0; visibility: hidden;
	transition: opacity .3s ease, visibility 0s linear .3s;
}
.wicd-drawer {
	position: fixed; top: 0; bottom: 0; right: 0; z-index: 999991;
	display: flex; flex-direction: column;
	width: min(var(--wicd-width), 100vw); max-width: 100vw; outline: 0;
	background: var(--wicd-bg); color: var(--wicd-text);
	box-shadow: -24px 0 60px rgba(16, 24, 40, .22);
	transform: translateX(105%); visibility: hidden;
	transition: transform .4s var(--wicd-ease), visibility 0s linear .4s;
}
.wicd-pos-left .wicd-drawer { right: auto; left: 0; box-shadow: 24px 0 60px rgba(16, 24, 40, .22); transform: translateX(-105%); }
.wicd-root.is-open .wicd-overlay { opacity: 1; visibility: visible; transition: opacity .3s ease; }
.wicd-root.is-open .wicd-drawer { transform: none; visibility: visible; transition: transform .4s var(--wicd-ease); }

/* ------------------------------------------------------------------
 * Header
 * ---------------------------------------------------------------- */
.wicd-head {
	flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 18px 22px; background: var(--wicd-card); border-bottom: 1px solid var(--wicd-border);
}
.wicd-head__title { display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; font-size: 1.25em; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; color: var(--wicd-dark); }
.wicd-count {
	display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px;
	border-radius: 999px; background: var(--wicd-primary); color: var(--wicd-primary-text);
	font-size: 12px; font-weight: 700; line-height: 1; letter-spacing: 0;
}
.wicd-count[data-count="0"] { display: none; }
.wicd-head .wicd-count { background: var(--wicd-soft); color: var(--wicd-primary); }
.wicd-close {
	display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 0; padding: 0;
	border: 0; border-radius: 50%; background: var(--wicd-soft); color: var(--wicd-dark); cursor: pointer;
	transition: background .15s, color .15s, transform .2s var(--wicd-ease);
}
.wicd-close:hover { background: var(--wicd-primary); color: var(--wicd-primary-text); transform: rotate(90deg); }
.wicd-close:focus-visible, .wicd-btn:focus-visible, .wicd-qty__btn:focus-visible, .wicd-item__remove:focus-visible { outline: 3px solid var(--wicd-focus); outline-offset: 2px; }

/* toast */
.wicd-toast {
	position: absolute; left: 18px; right: 18px; top: 76px; z-index: 5; padding: 11px 14px;
	border-radius: calc(var(--wicd-radius) - 2px); background: var(--wicd-dark); color: var(--wicd-card);
	font-size: .9em; font-weight: 600; box-shadow: 0 10px 30px rgba(16, 24, 40, .25);
	animation: wicd-drop .25s var(--wicd-ease);
}
.wicd-toast[hidden] { display: none; }
.wicd-toast.is-error { background: var(--wicd-error); color: #fff; }

/* ------------------------------------------------------------------
 * Scroll area
 * ---------------------------------------------------------------- */
.wicd-fragment { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; transition: opacity .2s; }
.wicd-fragment.is-loading { opacity: .6; pointer-events: none; }
.wicd-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px; display: grid; gap: 18px; align-content: start; scrollbar-width: thin; }

/* free shipping progress */
.wicd-ship { padding: 14px 16px; background: var(--wicd-card); border: 1px solid var(--wicd-border); border-radius: var(--wicd-radius); box-shadow: var(--wicd-shadow); }
.wicd-ship__text { display: flex; align-items: center; gap: 10px; font-size: .9em; color: var(--wicd-text); }
.wicd-ship__text .wicd-icon { color: var(--wicd-primary); }
.wicd-ship__text strong { color: var(--wicd-dark); }
.wicd-ship__bar { height: 8px; margin-top: 10px; overflow: hidden; border-radius: 999px; background: var(--wicd-soft); }
.wicd-ship__bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--wicd-primary), color-mix(in srgb, var(--wicd-primary) 70%, #fff)); transition: width .6s var(--wicd-ease); }
.wicd-ship.is-done .wicd-ship__text .wicd-icon { color: var(--wicd-success); }
.wicd-ship.is-done .wicd-ship__bar span { background: var(--wicd-success); }

/* groups */
.wicd-group { display: grid; gap: 10px; }
.wicd-group__title {
	display: flex; align-items: center; gap: 8px; margin: 2px 2px 0; padding: 0;
	font-size: .72em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--wicd-muted);
}
.wicd-group__title .wicd-icon { width: 15px; height: 15px; color: var(--wicd-primary); }
.wicd-items { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }

/* item card */
.wicd-item {
	display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; margin: 0; padding: 14px;
	background: var(--wicd-card); border: 1px solid var(--wicd-border); border-radius: var(--wicd-radius); box-shadow: var(--wicd-shadow);
	transition: opacity .2s, transform .2s;
	animation: wicd-rise .4s var(--wicd-ease) both;
}
.wicd-item.is-loading { opacity: .5; pointer-events: none; }
.wicd-item__thumb img { display: block; width: 76px; height: 76px; max-width: none; object-fit: cover; border: 1px solid var(--wicd-border); border-radius: calc(var(--wicd-radius) - 2px); background: var(--wicd-input); }
.wicd-item__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wicd-item__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.wicd-item__name { min-width: 0; font-weight: 600; line-height: 1.35; color: var(--wicd-dark); overflow-wrap: anywhere; }
.wicd-item__name a:hover { color: var(--wicd-primary); }
.wicd-item__remove {
	flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin: -4px -4px 0 0; padding: 0;
	border: 0; border-radius: 50%; background: transparent; color: var(--wicd-muted); cursor: pointer; transition: background .15s, color .15s;
}
.wicd-item__remove .wicd-icon { width: 17px; height: 17px; }
.wicd-item__remove:hover { background: color-mix(in srgb, var(--wicd-error) 12%, transparent); color: var(--wicd-error); }
.wicd-item__meta { font-size: .82em; color: var(--wicd-muted); }
.wicd-item__meta dl, .wicd-item__meta dt, .wicd-item__meta dd, .wicd-item__meta p { display: inline; margin: 0; padding: 0; font-weight: 400; }
.wicd-item__meta dt { margin-right: 3px; }
.wicd-item__meta dd { margin-right: 8px; }
.wicd-item__price { font-size: .88em; color: var(--wicd-muted); }
.wicd-item__price small, .wicd-item__subtotal small { font-size: .85em; font-weight: 500; }
.wicd-item__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 8px; }
.wicd-item__subtotal { font-weight: 700; color: var(--wicd-dark); text-align: right; }
.wicd-item__qtyfixed { font-size: .85em; color: var(--wicd-muted); }

.wicd-badge {
	align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 7px;
	border-radius: 999px; background: var(--wicd-soft); color: var(--wicd-primary);
	font-size: .72em; font-weight: 700; letter-spacing: .02em;
}
.wicd-badge .wicd-icon { width: 12px; height: 12px; }

/* quantity stepper */
.wicd-qty { display: inline-flex; align-items: center; overflow: hidden; background: var(--wicd-input); border: 1px solid var(--wicd-border); border-radius: calc(var(--wicd-radius) - 2px); }
.wicd-qty__btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 36px; margin: 0; padding: 0; border: 0; background: transparent; color: var(--wicd-dark); cursor: pointer; transition: background .15s, color .15s; }
.wicd-qty__btn .wicd-icon { width: 15px; height: 15px; }
.wicd-qty__btn:hover:not(:disabled) { background: var(--wicd-soft); color: var(--wicd-primary); }
.wicd-qty__btn:disabled { opacity: .35; cursor: not-allowed; }
.wicd-qty__val { min-width: 30px; padding: 0 2px; text-align: center; font-weight: 700; color: var(--wicd-dark); }

/* coupon */
.wicd-coupon { display: grid; gap: 10px; }
.wicd-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.wicd-chip { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 5px 6px 5px 10px; border-radius: 999px; background: color-mix(in srgb, var(--wicd-success) 12%, transparent); color: var(--wicd-success); font-size: .82em; font-weight: 700; }
.wicd-chip .wicd-icon { width: 14px; height: 14px; }
.wicd-chip button { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.wicd-chip button:hover { background: var(--wicd-success); color: #fff; }
.wicd-chip button .wicd-icon { width: 12px; height: 12px; }
.wicd-coupon__box { padding: 0; background: var(--wicd-card); border: 1px dashed var(--wicd-border); border-radius: var(--wicd-radius); }
.wicd-coupon__box summary { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; font-size: .92em; font-weight: 600; color: var(--wicd-primary); cursor: pointer; list-style: none; }
.wicd-coupon__box summary::-webkit-details-marker { display: none; }
.wicd-coupon__box summary::after { content: "+"; font-size: 1.3em; line-height: 1; }
.wicd-coupon__box[open] summary::after { content: "\2212"; }
.wicd-coupon__form { display: flex; gap: 10px; padding: 0 14px 14px; }
.wicd-coupon__form input {
	flex: 1; min-width: 0; height: 44px; padding: 0 14px; background: var(--wicd-input); color: var(--wicd-dark);
	border: 1px solid var(--wicd-border); border-radius: calc(var(--wicd-radius) - 2px); outline: 0; font-size: 1em;
	transition: border-color .18s, box-shadow .18s;
}
.wicd-coupon__form input:focus { border-color: var(--wicd-primary); box-shadow: 0 0 0 4px var(--wicd-focus); }

/* cross-sells */
.wicd-xs { display: grid; gap: 10px; }
.wicd-xs__list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.wicd-xs__item { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 0; padding: 10px 12px; background: var(--wicd-card); border: 1px solid var(--wicd-border); border-radius: var(--wicd-radius); }
.wicd-xs__thumb img { display: block; width: 52px; height: 52px; max-width: none; object-fit: cover; border-radius: calc(var(--wicd-radius) - 4px); }
.wicd-xs__info { display: flex; flex-direction: column; min-width: 0; }
.wicd-xs__name { font-size: .92em; font-weight: 600; line-height: 1.3; color: var(--wicd-dark); }
.wicd-xs__price { font-size: .85em; color: var(--wicd-muted); }

/* empty */
.wicd-scroll--empty { align-content: center; height: 100%; }
.wicd-empty { display: grid; justify-items: center; gap: 14px; padding: 40px 20px; text-align: center; }
.wicd-empty__icon { display: inline-flex; align-items: center; justify-content: center; width: 84px; height: 84px; border-radius: 50%; background: var(--wicd-soft); color: var(--wicd-primary); }
.wicd-empty__icon .wicd-icon { width: 38px; height: 38px; }
.wicd-empty__title { margin: 0; font-size: 1.15em; font-weight: 700; color: var(--wicd-dark); }

/* ------------------------------------------------------------------
 * Footer
 * ---------------------------------------------------------------- */
.wicd-foot {
	flex: 0 0 auto; display: grid; gap: 12px; padding: 18px 20px calc(18px + env(safe-area-inset-bottom));
	background: var(--wicd-card); border-top: 1px solid var(--wicd-border); box-shadow: 0 -12px 30px rgba(16, 24, 40, .06);
}
.wicd-totals { display: grid; gap: 8px; margin: 0; padding: 0; }
.wicd-totals__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0; }
.wicd-totals dt { margin: 0; font-weight: 600; color: var(--wicd-text); }
.wicd-totals dd { margin: 0; text-align: right; color: var(--wicd-dark); font-weight: 600; }
.wicd-totals__row.is-discount dd, .wicd-totals__row.is-discount dt { color: var(--wicd-success); }
.wicd-totals__row.is-total { padding-top: 10px; border-top: 1px solid var(--wicd-border); }
.wicd-totals__row.is-total dt { font-size: 1.1em; font-weight: 700; color: var(--wicd-dark); }
.wicd-totals__row.is-total dd { font-size: 1.3em; font-weight: 800; }
.wicd-note { margin: 0; font-size: .8em; color: var(--wicd-muted); }

/* subscription: recurring payments */
.wicd-rec { padding: 12px 14px; background: var(--wicd-soft); border-radius: calc(var(--wicd-radius) - 2px); }
.wicd-rec__title { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: .75em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--wicd-primary); }
.wicd-rec__title .wicd-icon { width: 15px; height: 15px; }
.wicd-rec ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.wicd-rec li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; margin: 0; }
.wicd-rec__amt { font-weight: 700; color: var(--wicd-dark); }
.wicd-rec__amt small { font-weight: 500; color: var(--wicd-text); }
.wicd-rec__next { font-size: .82em; color: var(--wicd-muted); }

/* buttons */
.wicd-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; margin: 0; padding: 0 24px;
	border: 0; border-radius: calc(var(--wicd-radius) - 2px); background: var(--wicd-primary); color: var(--wicd-primary-text) !important;
	font-size: 1.05em; font-weight: 700; letter-spacing: .01em; line-height: 1.2; text-decoration: none !important; cursor: pointer;
	box-shadow: 0 6px 18px rgba(var(--wicd-primary-rgb), .35);
	transition: transform .18s var(--wicd-ease), box-shadow .18s, filter .18s, background .18s, color .18s, border-color .18s;
}
.wicd-btn:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 10px 26px rgba(var(--wicd-primary-rgb), .42); }
.wicd-btn:active { transform: none; }
.wicd-btn-gradient .wicd-btn:not(.wicd-btn--ghost) { background: linear-gradient(135deg, var(--wicd-primary), color-mix(in srgb, var(--wicd-primary) 62%, #000)); }
.wicd-btn--block { display: flex; width: 100%; }
.wicd-btn--sm { min-height: 40px; padding: 0 16px; font-size: .9em; box-shadow: none; }
.wicd-btn--sm:hover { box-shadow: none; }
.wicd-btn--ghost { background: transparent; color: var(--wicd-dark) !important; border: 1px solid var(--wicd-border); box-shadow: none; min-height: 48px; font-weight: 600; }
.wicd-btn--sm.wicd-btn--ghost { min-height: 38px; }
.wicd-btn--ghost:hover { background: var(--wicd-soft); border-color: var(--wicd-primary); color: var(--wicd-primary) !important; box-shadow: none; filter: none; }

.wicd-trust { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; font-size: .8em; font-weight: 600; color: var(--wicd-muted); }
.wicd-trust .wicd-icon { width: 15px; height: 15px; color: var(--wicd-success); }

/* ------------------------------------------------------------------
 * Floating button + shortcode trigger
 * ---------------------------------------------------------------- */
.wicd-fab {
	position: fixed; bottom: 22px; z-index: 999980; display: inline-flex; align-items: center; justify-content: center;
	width: 58px; height: 58px; margin: 0; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
	background: var(--wicd-primary); color: var(--wicd-primary-text);
	box-shadow: 0 10px 28px rgba(var(--wicd-primary-rgb), .45); transition: transform .2s var(--wicd-ease);
}
.wicd-fab.is-right { right: 22px; }
.wicd-fab.is-left { left: 22px; }
.wicd-fab:hover { transform: scale(1.07); }
.wicd-fab .wicd-icon { width: 26px; height: 26px; }
.wicd-fab .wicd-count { position: absolute; top: -4px; right: -4px; background: var(--wicd-dark); color: var(--wicd-card); border: 2px solid var(--wicd-card); }
.wicd-trigger { position: relative; display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px; border: 0; background: transparent; color: inherit; cursor: pointer; }
.wicd-trigger .wicd-count { position: absolute; top: -4px; right: -6px; }

/* ------------------------------------------------------------------
 * Responsive
 * ---------------------------------------------------------------- */
@media (max-width: 600px) {
	.wicd-drawer { width: 100vw; }
	.wicd-head { padding: 14px 16px; }
	.wicd-toast { top: 66px; left: 12px; right: 12px; }
	.wicd-scroll { padding: 14px 12px; gap: 14px; }
	.wicd-item { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 12px; }
	.wicd-item__thumb img { width: 64px; height: 64px; }
	.wicd-foot { padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
	.wicd-coupon__form input { font-size: 16px; }
	.wicd-fab { bottom: 16px; width: 54px; height: 54px; }
	.wicd-fab.is-right { right: 16px; }
	.wicd-fab.is-left { left: 16px; }
}

/* ------------------------------------------------------------------
 * Motion
 * ---------------------------------------------------------------- */
@keyframes wicd-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes wicd-drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.wicd-no-anim *, .wicd-no-anim *::before, .wicd-no-anim *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
	.wicd-root *, .wicd-root *::before, .wicd-root *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* Compact footer on short / small screens so the item list keeps room */
@media (max-height: 780px), (max-width: 600px) {
	.wicd-foot { gap: 10px; }
	.wicd-note { display: none; }
	.wicd-btn { min-height: 50px; }
	.wicd-btn--ghost { min-height: 44px; }
}
@media (max-height: 640px) {
	.wicd-trust { display: none; }
}
