/* =========================================================
   EventPrime – Selling Fast Widget  |  assets/css/widget.css
   ========================================================= */

:root {
	--ep-sf-red:    #e8192c;
	--ep-sf-purple: #5b3fcf;
	--ep-sf-gold:   #f5c842;
	--ep-sf-white:  #ffffff;
	--ep-sf-width:  320px;
}

/* ── Wrapper ─────────────────────────────────────────────── */
.ep-sf-stub {
	position: fixed;
	bottom: 28px;
	right: 28px;
	z-index: 99999;
	width: var(--ep-sf-width);
	border-radius: 16px;
	overflow: visible;
	pointer-events: auto;
	font-family: 'Nunito', sans-serif;

	/* entrance — hidden by default */
	opacity: 0;
	transform: translateY(22px);
	transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
	            transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
	max-width: 250px;
}

.ep-sf-stub.ep-sf-visible {
	opacity: 1;
	transform: translateY(0);
}

.ep-sf-stub.ep-sf-left {
	right: auto;
	left: 28px;
}

/* ── Top: red "Selling Fast" bar ─────────────────────────── */
.ep-sf-top {
	background: var(--ep-sf-red);
	border-radius: 16px 16px 0 0;
	padding: 22px 30px 22px 30px;
	position: relative;
	min-height: 50px;
	display: flex;
	align-items: center;
}

.ep-sf-selling {
	font-family: 'Nunito', sans-serif;
	font-size: 24px;
	font-weight: 900;
	color: var(--ep-sf-white);
	letter-spacing: 1.5px;
	text-transform: uppercase;
	line-height: 1;
}

/* ── Dismiss button ──────────────────────────────────────── */
.ep-sf-close {
	position: absolute;
	top: 0px;
	right: 4px;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	background: none;
	border: none;
	padding: 0;
}

.ep-sf-close::before,
.ep-sf-close::after {
	content: '';
	position: absolute;
	width: 14px;
	height: 2px;
	background: rgba(255, 255, 255, 0.75);
	border-radius: 2px;
}

.ep-sf-close::before { transform: rotate(45deg); }
.ep-sf-close::after  { transform: rotate(-45deg); }

.ep-sf-close:hover::before,
.ep-sf-close:hover::after { background: #fff; }

/* ── Tear / perforated edge ──────────────────────────────── */
.ep-sf-tear {
    position: relative;
    height: 16px;
    background: var(--ep-sf-purple);
    
    /* Creates transparent half-circle cutouts on the left and right edges */
    mask: 
        radial-gradient(circle at left, transparent 8px, #000 0) left,
        radial-gradient(circle at right, transparent 8px, #000 0) right;
    mask-size: 51% 100%;
    mask-repeat: no-repeat;
}

/* The horizontal dashed line */
.ep-sf-tear::after {
    content: '';
    position: absolute;
    left: 16px; /* Starts right after the transparent cutout */
    right: 16px; /* Ends right before the transparent cutout */
    top: 50%;
    transform: translateY(-50%);
    border-top: 2px dashed rgba(255, 255, 255, 0.3);
}


/* Base styling for the half-circles */
.ep-sf-notch { 
    display: block; 
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;   /* Half of the height to make a perfect semi-circle */
    height: 16px; /* Matches the parent div height */
    background: #ffffff; 
}

/* Left Notch: Rounded on the right side */
.ep-sf-notch-l {
    left: 0;
    border-radius: 0 8px 8px 0;
}

/* Right Notch: Rounded on the left side */
.ep-sf-notch-r {
    right: 0;
    border-radius: 8px 0 0 8px;
}



/* ── Bottom: purple count ────────────────────────────────── */
.ep-sf-foot {
	background: var(--ep-sf-purple);
	border-radius: 0 0 16px 16px;
	padding: 20px 24px 22px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ep-sf-count-line {
	font-family: 'Nunito', sans-serif;
	font-size: 16px;
	font-weight: 800;
	color: var(--ep-sf-white);
	letter-spacing: 0.3px;
	line-height: 1;
}

.ep-sf-count-line em {
	font-style: normal;
	color: var(--ep-sf-gold);
}

/* ── Critical pulse (≤ CRITICAL_BELOW tickets) ───────────── */
.ep-sf-stub.ep-sf-critical .ep-sf-top {
	animation: ep-sf-pulse 1.6s ease-in-out infinite;
}

@keyframes ep-sf-pulse {
	0%, 100% { background: var(--ep-sf-red); }
	50%       { background: #c0142a; }
}

/* ── Responsive: smaller on narrow screens ───────────────── */
@media (max-width: 1300px) {
	.ep-sf-stub {
		width: calc(100vw - 160px);
		bottom: 60px;
		right: 20px;
	}

	.ep-sf-stub.ep-sf-left {
		left: 16px;
		right: auto;
	}

	.ep-sf-top {
		padding: 16px 0 16px 0;
		justify-content: center;
	}
}
