/* CyCommerce Promos: storefront. Neutral by design so it sits naturally on light or
   dark themes; themes can re-tune through the custom properties on :root. */

:root {
	--cyc-promo-accent: #1f8a4c;
	--cyc-promo-radius: 10px;
}

/* ------------------------------------------------------------------ bars */

.cyc-promo-bar {
	position: relative;
	margin: 0 0 18px;
	padding: 13px 16px;
	border: 1px solid rgba(127, 127, 127, .3);
	border-radius: var(--cyc-promo-radius);
	background: rgba(127, 127, 127, .08);
	font-size: .92em;
	line-height: 1.5;
	color: inherit;
}

.cyc-promo-bar--compact { padding: 10px 14px; margin: 0 0 14px; font-size: .88em; }

.cyc-promo-bar--done { border-color: var(--cyc-promo-accent); }
.cyc-promo-bar--done .cyc-promo-bar__title,
.cyc-promo-bar--done .cyc-promo-bar__text { color: var(--cyc-promo-accent); }

.cyc-promo-bar__body { display: block; padding-right: 26px; }
.cyc-promo-bar__title { font-weight: 700; }
.cyc-promo-bar__text { opacity: .95; }

.cyc-promo-bar__action {
	display: inline-block;
	margin-left: 10px;
	padding: 4px 14px;
	border: 1px solid var(--cyc-promo-accent);
	border-radius: 999px;
	background: var(--cyc-promo-accent);
	color: #fff !important;
	font-weight: 600;
	text-decoration: none !important;
	white-space: nowrap;
}
.cyc-promo-bar__action:hover { filter: brightness(1.1); }

.cyc-promo-bar__dismiss {
	position: absolute;
	top: 8px;
	right: 12px;
	color: inherit !important;
	opacity: .5;
	font-size: 18px;
	line-height: 1;
	text-decoration: none !important;
}
.cyc-promo-bar__dismiss:hover { opacity: 1; }

.cyc-promo-bar__track {
	height: 6px;
	margin-top: 10px;
	border-radius: 3px;
	background: rgba(127, 127, 127, .22);
	overflow: hidden;
}
.cyc-promo-bar__fill {
	height: 100%;
	border-radius: 3px;
	background: var(--cyc-promo-accent);
	transition: width .35s ease;
}
.cyc-promo-bar--done .cyc-promo-bar__fill { width: 100% !important; }

/* ------------------------------------------------------- free line marks */

.cyc-promo-free { font-weight: 700; color: var(--cyc-promo-accent); text-transform: uppercase; font-size: .9em; letter-spacing: .04em; }
.cyc-promo-qty { display: inline-block; min-width: 2em; text-align: center; opacity: .85; }

/* ------------------------------------------------------------ tier table */

.cyc-promo-tiers {
	margin: 0 0 18px;
	padding: 14px 16px;
	border: 1px solid rgba(127, 127, 127, .3);
	border-radius: var(--cyc-promo-radius);
	background: rgba(127, 127, 127, .07);
}
.cyc-promo-tiers__title {
	margin: 0 0 8px !important;
	font-size: .82em;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	opacity: .85;
}
.cyc-promo-tiers__table { width: 100%; margin: 0 !important; border: 0 !important; border-collapse: collapse; font-size: .92em; }
.cyc-promo-tiers__table td {
	padding: 6px 2px !important;
	border: 0 !important;
	border-bottom: 1px solid rgba(127, 127, 127, .18) !important;
	background: none !important;
}
.cyc-promo-tiers__table tr:last-child td { border-bottom: 0 !important; }
.cyc-promo-tiers__table td:last-child { text-align: right; font-weight: 700; color: var(--cyc-promo-accent); }
.cyc-promo-tiers__note { margin: 8px 0 0 !important; font-size: .8em; opacity: .7; }

/* ------------------------------------------------------------- dropdowns */

.cyc-promo-choices { margin: 0 0 22px; }
.cyc-promo-choice { margin: 0 0 14px; }
.cyc-promo-choice label { display: block; margin: 0 0 6px; font-weight: 700; color: var(--ink, #fff); }
.cyc-promo-choice .required { color: var(--orange, #ff9a52); text-decoration: none; border: 0; }
.cyc-promo-choices .cyc-promo-choice select {
	width: 100%;
	box-sizing: border-box;
	background-color: rgba(255, 255, 255, 0.06) !important;
	color: var(--ink, #fff) !important;
	border: 1px solid var(--hair, rgba(255, 255, 255, 0.18)) !important;
	border-radius: 8px;
	padding: 0.9rem 2.6rem 0.9rem 1rem;
	font: inherit;
	line-height: 1.3;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8' fill='none' stroke='%23ff9a52' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
	cursor: pointer;
	transition: border-color 0.18s;
}
.cyc-promo-choices .cyc-promo-choice select:hover { border-color: var(--orange, #ff9a52); }
.cyc-promo-choices .cyc-promo-choice select:focus { outline: none; border-color: var(--orange, #ff9a52); box-shadow: 0 0 0 2px rgba(255, 154, 82, 0.2); }
.cyc-promo-choices .cyc-promo-choice select option { background: #14101a; color: #fff; }
.cyc-promo-no-choices { opacity: .8; }

/* ----------------------------------------------------------------- popup */

.cyc-promo-popup {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 0, 0, .65);
}
.cyc-promo-popup__panel {
	position: relative;
	max-width: 440px;
	width: 100%;
	padding: 30px 28px 26px;
	border-radius: 14px;
	background: var(--cyc-promo-popup-bg, #fff);
	color: var(--cyc-promo-popup-ink, #15181b);
	text-align: center;
	box-shadow: 0 18px 60px rgba(0, 0, 0, .35);
	animation: cycPromoPopIn .25s ease;
}
@keyframes cycPromoPopIn {
	from { transform: scale(.92); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}
.cyc-promo-popup__close {
	position: absolute;
	top: 10px;
	right: 14px;
	border: 0;
	background: none;
	font-size: 22px;
	line-height: 1;
	color: inherit;
	opacity: .5;
	cursor: pointer;
}
.cyc-promo-popup__close:hover { opacity: 1; }
.cyc-promo-popup__title { margin: 0 0 10px; font-size: 1.3em; }
.cyc-promo-popup__text { margin: 0 0 20px; opacity: .85; line-height: 1.6; }
.cyc-promo-popup__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.cyc-promo-popup__actions button {
	padding: 11px 22px;
	border-radius: 999px;
	border: 1px solid transparent;
	font-weight: 700;
	cursor: pointer;
}
.cyc-promo-popup__accept { background: var(--cyc-promo-accent); border-color: var(--cyc-promo-accent); color: #fff; }
.cyc-promo-popup__accept:hover { filter: brightness(1.1); }
.cyc-promo-popup__decline { background: none; border-color: rgba(127, 127, 127, .5); color: inherit; }
.cyc-promo-popup__decline:hover { border-color: currentColor; }
