/* =========================================================
   KVK Attractive Ticker & Blink Links — front-end styles
   ========================================================= */

.kat-blink-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin: 20px 0;
	padding-top: 12px; /* room for badges that poke above the button */
}
.kat-links-stack {
	flex-direction: column;
	gap: 26px; /* extra vertical room so one button's badge never sits on top of the next button */
}

.kat-blink-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 22px 14px 18px;
	border-radius: 50px;
	font-size: 16px;
	font-weight: 700;
	text-decoration: none !important;
	color: #fff !important;
	overflow: visible;
	isolation: isolate;
	box-shadow: 0 4px 14px rgba(0,0,0,0.18);
	transition: transform .15s ease, box-shadow .15s ease;
	animation: kat-pulse-scale 1.8s ease-in-out infinite;
}
.kat-blink-btn:hover,
.kat-blink-btn:focus-visible {
	transform: translateY(-3px) scale(1.03);
	box-shadow: 0 8px 22px rgba(0,0,0,0.28);
	outline: none;
}
.kat-blink-btn:active { transform: translateY(0) scale(0.98); }

/* Glow ring that blinks outward behind the button */
.kat-blink-glow {
	position: absolute;
	inset: -6px;
	border-radius: 50px;
	z-index: -1;
	animation: kat-glow-ring 1.8s ease-out infinite;
}

.kat-blink-icon svg { width: 20px; height: 20px; display: block; }
.kat-blink-icon { display: inline-flex; }
.kat-blink-arrow svg { width: 16px; height: 16px; display: block; }
.kat-blink-arrow {
	display: inline-flex;
	margin-left: 2px;
	animation: kat-arrow-nudge 1.2s ease-in-out infinite;
}
.kat-blink-label { white-space: nowrap; }

.kat-blink-badge {
	position: absolute;
	top: -10px;
	right: -8px;
	z-index: 5;
	background: #fff;
	color: #d1240a;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.4px;
	padding: 3px 8px;
	border-radius: 20px;
	box-shadow: 0 2px 6px rgba(0,0,0,0.25);
	animation: kat-badge-blink 1s steps(1) infinite;
	text-transform: uppercase;
}

/* Color themes */
.kat-color-orange { background: linear-gradient(135deg,#ff9a3c,#ff5f1f); }
.kat-color-orange .kat-blink-glow { box-shadow: 0 0 0 0 rgba(255,95,31,0.55); }

.kat-color-green { background: linear-gradient(135deg,#4caf50,#2e7d32); }
.kat-color-green .kat-blink-glow { box-shadow: 0 0 0 0 rgba(46,125,50,0.55); }

.kat-color-red { background: linear-gradient(135deg,#ff5252,#c62828); }
.kat-color-red .kat-blink-glow { box-shadow: 0 0 0 0 rgba(198,40,40,0.55); }

.kat-color-blue { background: linear-gradient(135deg,#42a5f5,#1565c0); }
.kat-color-blue .kat-blink-glow { box-shadow: 0 0 0 0 rgba(21,101,192,0.55); }

.kat-color-purple { background: linear-gradient(135deg,#ab47bc,#6a1b9a); }
.kat-color-purple .kat-blink-glow { box-shadow: 0 0 0 0 rgba(106,27,154,0.55); }

@keyframes kat-glow-ring {
	0%   { box-shadow: 0 0 0 0 currentColor; opacity: 0.55; }
	70%  { box-shadow: 0 0 0 16px transparent; opacity: 0; }
	100% { box-shadow: 0 0 0 0 transparent; opacity: 0; }
}
/* re-declare using each theme's own color via box-shadow above (kept for browsers ignoring currentColor trick) */
.kat-color-orange .kat-blink-glow { animation-name: kat-glow-orange; }
.kat-color-green  .kat-blink-glow { animation-name: kat-glow-green; }
.kat-color-red    .kat-blink-glow { animation-name: kat-glow-red; }
.kat-color-blue   .kat-blink-glow { animation-name: kat-glow-blue; }
.kat-color-purple .kat-blink-glow { animation-name: kat-glow-purple; }

@keyframes kat-glow-orange { 0%{box-shadow:0 0 0 0 rgba(255,95,31,.55);} 70%{box-shadow:0 0 0 16px rgba(255,95,31,0);} 100%{box-shadow:0 0 0 0 rgba(255,95,31,0);} }
@keyframes kat-glow-green  { 0%{box-shadow:0 0 0 0 rgba(46,125,50,.55);} 70%{box-shadow:0 0 0 16px rgba(46,125,50,0);} 100%{box-shadow:0 0 0 0 rgba(46,125,50,0);} }
@keyframes kat-glow-red    { 0%{box-shadow:0 0 0 0 rgba(198,40,40,.55);} 70%{box-shadow:0 0 0 16px rgba(198,40,40,0);} 100%{box-shadow:0 0 0 0 rgba(198,40,40,0);} }
@keyframes kat-glow-blue   { 0%{box-shadow:0 0 0 0 rgba(21,101,192,.55);} 70%{box-shadow:0 0 0 16px rgba(21,101,192,0);} 100%{box-shadow:0 0 0 0 rgba(21,101,192,0);} }
@keyframes kat-glow-purple { 0%{box-shadow:0 0 0 0 rgba(106,27,154,.55);} 70%{box-shadow:0 0 0 16px rgba(106,27,154,0);} 100%{box-shadow:0 0 0 0 rgba(106,27,154,0);} }

@keyframes kat-pulse-scale {
	0%, 100% { transform: scale(1); }
	50%      { transform: scale(1.035); }
}
@keyframes kat-arrow-nudge {
	0%, 100% { transform: translateX(0); }
	50%      { transform: translateX(4px); }
}
@keyframes kat-badge-blink {
	0%, 49%  { opacity: 1; }
	50%, 100%{ opacity: 0.35; }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
	.kat-blink-btn, .kat-blink-glow, .kat-blink-arrow, .kat-blink-badge {
		animation: none !important;
	}
}

/* =========================================================
   Vertical News & Events Ticker
   ========================================================= */

.kat-ticker-card {
	background: #fff;
	border: 1px solid #eee;
	border-radius: 14px;
	box-shadow: 0 6px 24px rgba(0,0,0,0.08);
	overflow: hidden;
	font-family: inherit;
	margin: 20px 0;
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: var(--kat-ticker-width, 100%);
}

.kat-ticker-header {
	display: flex;
	align-items: center;
	gap: 8px;
	background: linear-gradient(135deg,#2e7d32,#1b5e20);
	color: #fff;
	padding: 12px 16px;
	font-weight: 700;
	font-size: 15px;
	letter-spacing: 0.3px;
}
.kat-ticker-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #ffd54f;
	box-shadow: 0 0 0 0 rgba(255,213,79,0.7);
	animation: kat-dot-pulse 1.4s ease-out infinite;
	flex-shrink: 0;
}
@keyframes kat-dot-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(255,213,79,0.7); }
	70%  { box-shadow: 0 0 0 8px rgba(255,213,79,0); }
	100% { box-shadow: 0 0 0 0 rgba(255,213,79,0); }
}

.kat-ticker-viewport {
	position: relative;
	height: var(--kat-ticker-height, 260px);
	overflow: hidden;
	mask-image: linear-gradient(to bottom, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
	-webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}

.kat-ticker-track {
	list-style: none;
	margin: 0;
	padding: 0;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	animation: kat-scroll-up var(--kat-ticker-speed, 18s) linear infinite;
}

/* Because the list content is duplicated (rendered twice), translating by
   -50% moves exactly one full copy up, producing a seamless infinite loop. */
@keyframes kat-scroll-up {
	0%   { transform: translateY(0); }
	100% { transform: translateY(-50%); }
}

.kat-ticker-track:hover,
.kat-ticker-track.kat-paused {
	animation-play-state: paused;
}

.kat-ticker-item {
	border-bottom: 1px solid #f1f1f1;
}
.kat-ticker-item a {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 16px;
	text-decoration: none;
	color: #263238;
	transition: background .15s ease, padding-left .15s ease;
}
.kat-ticker-item a:hover {
	background: #f5faf5;
	padding-left: 20px;
	color: #1b5e20;
}
.kat-ticker-bullet {
	color: #ff7043;
	font-weight: 900;
	font-size: 18px;
	flex-shrink: 0;
}
.kat-ticker-text {
	flex: 1;
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.4;
}
.kat-ticker-date {
	font-size: 11px;
	color: #90a4ae;
	white-space: nowrap;
	flex-shrink: 0;
}

.kat-ticker-empty {
	padding: 20px;
	text-align: center;
	color: #999;
	font-style: italic;
}

@media (prefers-reduced-motion: reduce) {
	.kat-ticker-track { animation: none !important; }
}

@media (max-width: 480px) {
	.kat-blink-btn { font-size: 14px; padding: 12px 16px; }
	.kat-ticker-date { display: none; }
}

/* =========================================================
   Admin page styles
   ========================================================= */
.kat-admin-wrap .kat-links-table input[type="text"] { width: 100%; }
.kat-admin-wrap .kat-links-table td { vertical-align: middle; }
.kat-remove-row { color: #b32d2e; font-size: 16px; }
.kat-preview-box {
	background: #f6f7f7;
	border: 1px dashed #ccd0d4;
	padding: 24px;
	border-radius: 8px;
	margin-top: 12px;
}

/* Usage Guide page */
.kat-guide { max-width: 900px; }
.kat-guide-section {
	background: #fff;
	border: 1px solid #e2e4e7;
	border-radius: 8px;
	padding: 18px 22px;
	margin-bottom: 18px;
}
.kat-guide-section h2 { margin-top: 0; }
.kat-guide-list, .kat-guide-steps { line-height: 1.7; }
.kat-guide-table td { vertical-align: middle; padding: 10px 12px; }
.kat-code-box {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #f0f0f1;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 6px 8px 6px 12px;
}
.kat-code-box code {
	background: none;
	padding: 0;
	font-size: 13px;
	white-space: nowrap;
	overflow-x: auto;
}
.kat-copy-btn { flex-shrink: 0; }
