/**
 * Top Bar Notices – Premium Front-end Styles v3.0
 * Inspired by Starter Templates, OptinMonster, WPForms, and top-tier SaaS announcement bars.
 * Clean single-line layout. Every element earns its space.
 */


/* ==========================================================================
   Keyframe animations
   ========================================================================== */

@keyframes gt-tbn-gradient-shift {
	0%   { background-position: 0% 50%; }
	50%  { background-position: 100% 50%; }
	100% { background-position: 0% 50%; }
}

@keyframes gt-tbn-shine {
	0%   { transform: translateX(-200%) skewX(-20deg); }
	100% { transform: translateX(400%) skewX(-20deg); }
}

@keyframes gt-tbn-badge-glow {
	0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.2); }
	50%      { box-shadow: 0 0 12px 2px rgba(255,255,255,0.08); }
}

@keyframes gt-tbn-tick {
	0%   { transform: scale(1); }
	20%  { transform: scale(1.12); }
	40%  { transform: scale(1); }
}

@keyframes gt-tbn-blink {
	0%, 100% { opacity: 1; }
	50%      { opacity: 0.25; }
}

@keyframes gt-tbn-cta-glow {
	0%, 100% { box-shadow: 0 2px 8px rgba(0,0,0,0.1), 0 0 0 0 rgba(255,255,255,0); }
	50%      { box-shadow: 0 2px 16px rgba(0,0,0,0.15), 0 0 20px 2px rgba(255,255,255,0.06); }
}


/* ==========================================================================
   Body padding
   ========================================================================== */

body.gt-tbn-has-bar {
	--gt-tbn-bar-height: 50px;
	padding-top: var(--gt-tbn-bar-height);
}

body.gt-tbn-has-bar .gt-tbn-pushed {
	top: var(--gt-tbn-bar-height) !important;
}


/* ==========================================================================
   Bar container
   ========================================================================== */

.gt-tbn-bar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	height: var(--gt-tbn-bar-height);
	min-height: var(--gt-tbn-bar-height);
	max-height: var(--gt-tbn-bar-height);
	z-index: 99998;
	overflow: hidden;
	box-sizing: border-box;

	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 14px;
	line-height: 1 !important;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;

	background-size: 200% 200%;
	animation: gt-tbn-gradient-shift 12s ease infinite;

	box-shadow: 0 2px 12px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);

	transform: translateY(-100%);
	opacity: 0;
	transition: transform 0.5s cubic-bezier(0.34,1.56,0.64,1), opacity 0.4s ease;
}

.gt-tbn-bar *,
.gt-tbn-bar *::before,
.gt-tbn-bar *::after {
	box-sizing: border-box !important;
}

/* Shine sweep */
.gt-tbn-bar::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 30%;
	height: 100%;
	background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.06) 48%, rgba(255,255,255,0.10) 50%, rgba(255,255,255,0.06) 52%, transparent 70%);
	animation: gt-tbn-shine 8s ease-in-out infinite;
	pointer-events: none;
	z-index: 1;
}

/* Bottom highlight line */
.gt-tbn-bar::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06) 30%, rgba(255,255,255,0.10) 50%, rgba(255,255,255,0.06) 70%, transparent);
	pointer-events: none;
	z-index: 3;
}

.gt-tbn-bar.gt-tbn-bar--visible {
	transform: translateY(0);
	opacity: 1;
}

.gt-tbn-bar.gt-tbn-no-animation {
	transform: translateY(0);
	opacity: 1;
	transition: none;
	animation: gt-tbn-gradient-shift 12s ease infinite;
}
.gt-tbn-bar.gt-tbn-no-animation.gt-tbn-bar--hidden {
	transform: translateY(-100%);
	opacity: 0;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.gt-tbn-bar.gt-tbn-bar--hidden {
	transform: translateY(-100%);
	opacity: 0;
	pointer-events: none;
}

/* Admin bar offsets */
body.admin-bar .gt-tbn-bar { top: 32px !important; }
body.admin-bar.gt-tbn-has-bar { padding-top: var(--gt-tbn-bar-height); }
body.admin-bar.gt-tbn-has-bar .gt-tbn-pushed { top: calc(32px + var(--gt-tbn-bar-height)) !important; }
@media screen and (max-width: 782px) {
	body.admin-bar .gt-tbn-bar { top: 46px !important; }
	body.admin-bar.gt-tbn-has-bar { padding-top: var(--gt-tbn-bar-height); }
	body.admin-bar.gt-tbn-has-bar .gt-tbn-pushed { top: calc(46px + var(--gt-tbn-bar-height)) !important; }
}


/* ==========================================================================
   Inner layout — SINGLE LINE, items spread across full width
   ========================================================================== */

.gt-tbn-bar-inner {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 24px;
	flex-wrap: nowrap;
	padding: 0 56px !important;
	height: 100%;
	width: 100%;
	margin: 0 auto;
	overflow: hidden;
}


/* ==========================================================================
   Template icon
   ========================================================================== */

.gt-tbn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	opacity: 0.6;
}

.gt-tbn-icon svg {
	width: 16px;
	height: 16px;
}


/* ==========================================================================
   Discount badge — bold, contrasting, eye-catching
   ========================================================================== */

.gt-tbn-discount {
	display: inline-flex;
	align-items: center;
	gap: 0;
	padding: 6px 14px !important;
	border-radius: 4px;
	white-space: nowrap;
	flex-shrink: 0;

	font-size: 0.86em !important;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	line-height: 1 !important;

	background: rgba(255,255,255,0.20);
	border: none;

	animation: gt-tbn-badge-glow 3s ease-in-out infinite;
}

/* Remove the dot — cleaner look */
.gt-tbn-discount::before {
	display: none;
}


/* ==========================================================================
   Message — clean, readable
   ========================================================================== */

.gt-tbn-message {
	flex: 1 1 0%;
	min-width: 0;
	font-size: 0.93em !important;
	font-weight: 500;
	letter-spacing: 0.01em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}


/* ==========================================================================
   Countdown timer — compact pill style
   ========================================================================== */

.gt-tbn-countdown {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	background: none;
	padding: 0 !important;
	border-radius: 0;
	font-size: 0.93em !important;
	line-height: 1 !important;
}

.gt-tbn-cd-group {
	display: inline-flex;
	align-items: baseline;
	gap: 2px;
	background: rgba(0,0,0,0.22);
	padding: 5px 8px !important;
	border-radius: 4px;
}

.gt-tbn-cd-num {
	font-size: 1em !important;
	font-weight: 800;
	letter-spacing: -0.01em;
	min-width: 1.4em;
	text-align: center;
	line-height: 1 !important;
	background: none;
	border: none;
	padding: 0 !important;
	border-radius: 0;
	height: auto;
}

.gt-tbn-cd-label {
	font-size: 0.77em !important;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	opacity: 0.6;
	margin-left: 1px;
	margin-right: 0;
}

.gt-tbn-cd-sep {
	font-size: 0.92em !important;
	font-weight: 800;
	opacity: 0.4;
	margin: 0;
	animation: gt-tbn-blink 1s step-start infinite;
}


/* ==========================================================================
   Coupon code — sharp, code-like
   ========================================================================== */

.gt-tbn-coupon {
	display: none;
	align-items: center;
	gap: 6px;
	padding: 6px 14px !important;
	border-radius: 4px;
	white-space: nowrap;
	flex-shrink: 0;
	position: relative;

	font-family: "SF Mono", "Fira Code", "Cascadia Code", Consolas, "Liberation Mono", Menlo, monospace;
	font-size: 0.86em !important;
	font-weight: 700;
	letter-spacing: 0.12em;
	line-height: 1 !important;

	background: rgba(255,255,255,0.10);
	border: 1.5px dashed rgba(255,255,255,0.35);

	cursor: pointer;
	-webkit-user-select: none;
	user-select: none;
	transition: all 0.2s ease;
}

.gt-tbn-coupon:hover {
	background: rgba(255,255,255,0.18);
	border-color: rgba(255,255,255,0.55);
	transform: translateY(-1px);
}

.gt-tbn-coupon:active {
	transform: translateY(0) scale(0.97);
}

.gt-tbn-coupon svg {
	width: 12px;
	height: 12px;
	flex-shrink: 0;
	opacity: 0.5;
	transition: opacity 0.2s ease;
}

.gt-tbn-coupon:hover svg {
	opacity: 1;
}

.gt-tbn-coupon.copied {
	background: rgba(74,222,128,0.18);
	border-style: solid;
	border-color: rgba(74,222,128,0.5);
}


/* ==========================================================================
   CTA button — bold, high contrast, inviting
   ========================================================================== */

.gt-tbn-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
	flex-shrink: 0;
	text-decoration: none !important;
	position: relative;
	overflow: hidden;

	padding: 8px 22px !important;
	border-radius: 5px;
	border: none;

	font-weight: 700;
	font-size: 0.86em !important;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1 !important;

	box-shadow: 0 1px 4px rgba(0,0,0,0.12);
	animation: gt-tbn-cta-glow 3s ease-in-out infinite;
	transition: all 0.2s ease;
}

.gt-tbn-cta:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 16px rgba(0,0,0,0.2);
	filter: brightness(1.08);
	text-decoration: none !important;
}

.gt-tbn-cta:active {
	transform: translateY(0) scale(0.97);
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.gt-tbn-bar a.gt-tbn-cta,
.gt-tbn-bar a.gt-tbn-cta:hover,
.gt-tbn-bar a.gt-tbn-cta:focus,
.gt-tbn-bar a.gt-tbn-cta:visited {
	text-decoration: none !important;
}


/* ==========================================================================
   Dismiss button
   ========================================================================== */

.gt-tbn-dismiss {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	min-width: 24px;
	min-height: 24px;
	padding: 0;
	background: rgba(255,255,255,0.06);
	border: 1px solid rgba(255,255,255,0.10);
	color: inherit;
	opacity: 0.4;
	cursor: pointer;
	font-size: 0;
	line-height: 1;
	border-radius: 4px;
	flex-shrink: 0;
	transition: all 0.2s ease;
	z-index: 4;
}

.gt-tbn-dismiss svg {
	width: 12px;
	height: 12px;
	flex-shrink: 0;
}

.gt-tbn-dismiss:hover {
	opacity: 1;
	background: rgba(255,255,255,0.14);
	border-color: rgba(255,255,255,0.25);
}

.gt-tbn-dismiss:active {
	transform: translateY(-50%) scale(0.9);
}


/* ==========================================================================
   Hide on mobile
   ========================================================================== */

@media screen and (max-width: 767px) {
	.gt-tbn-bar.gt-tbn-hide-mobile {
		display: none !important;
	}
	body.gt-tbn-has-bar.gt-tbn-has-bar--hide-mobile {
		padding-top: 0 !important;
	}
}


/* ==========================================================================
   Responsive — tablets (≤ 1024px)
   ========================================================================== */

@media screen and (max-width: 1024px) {
	.gt-tbn-bar-inner {
		gap: 18px;
		padding: 0 44px !important;
	}
	.gt-tbn-icon {
		display: none;
	}
}


/* ==========================================================================
   Responsive — tablets (≤ 782px)
   ========================================================================== */

@media screen and (max-width: 782px) {
	body.gt-tbn-has-bar {
		--gt-tbn-bar-height: 46px;
	}
	.gt-tbn-bar {
		font-size: 13px;
	}
	.gt-tbn-bar-inner {
		padding: 0 40px !important;
		gap: 14px;
	}
	.gt-tbn-cta {
		padding: 7px 16px !important;
	}
	.gt-tbn-coupon {
		padding: 5px 10px !important;
	}
	.gt-tbn-countdown {
		gap: 4px;
	}
	.gt-tbn-cd-group {
		padding: 4px 6px !important;
	}
	.gt-tbn-bar::before {
		display: none;
	}
}


/* ==========================================================================
   Responsive — phones (≤ 600px)
   ========================================================================== */

@media screen and (max-width: 600px) {
	body.gt-tbn-has-bar {
		--gt-tbn-bar-height: 44px;
	}
	.gt-tbn-bar-inner {
		gap: 10px;
		padding: 0 36px !important;
	}
	.gt-tbn-bar {
		font-size: 12px;
	}
	.gt-tbn-discount {
		display: none;
	}
	.gt-tbn-countdown {
		display: none;
	}
	.gt-tbn-coupon {
		display: none;
	}
	.gt-tbn-cta {
		padding: 5px 12px !important;
	}
}
