/* ==========================================================================
   GR Live Blog — "broadcast console" theme
   ========================================================================== */

:root{
	--lb-bg:        #1B1F2A;
	--lb-surface:   #232837;
	--lb-border:    #333952;
	--lb-text:      #E8EAF0;
	--lb-muted:     #8B92A8;
	--lb-live:      #FF4B5C;
	--lb-live-dim:  rgba(255, 75, 92, 0.18);
	--lb-success:   #4ADE80;
	--lb-mono:      'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
	--lb-sans:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	--lb-radius:    10px;
	--lb-button-bg: rgba(0,0,0,.4);
	--lb-button-padding: 8px 16px;
}

/* Trigger link in the post toolbar --------------------------------------- */

.liveblog-button{
	background: var(--lb-button-bg);
	bottom: 10px;
	color: var(--lb-text);
	font-family: var(--lb-sans);
	left: 10px;
	padding: var(--lb-button-padding);
	position: fixed;
	text-decoration: none;
	z-index: 999;
}
.liveblog-button.is-hidden {
	display: none;
}
.liveblog-button::before{
	content: "";
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-right: 6px;
	border-radius: 50%;
	background: var(--lb-live);
	vertical-align: middle;
}

/* Console shell ------------------------------------------------------------ */

.liveblog-console{
	display: none;
	max-width: 640px;
	margin: 0;
	background: var(--lb-bg);
	border: 1px solid var(--lb-border);
	border-radius: var(--lb-radius);
	bottom: 16px;
	left: 16px;
	min-width: 30rem;
	overflow: hidden;
	font-family: var(--lb-sans);
	box-shadow: 0 12px 32px rgba(6, 8, 15, 0.35);
	position: fixed;
	z-index: 9999;
}
.liveblog-console.is-open{
	display: block;
}


/* Header bar with the live signal ----------------------------------------- */

.liveblog-console__bar{
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	background: var(--lb-surface);
	border-bottom: 1px solid var(--lb-border);
}

.liveblog-console__signal{
	position: relative;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--lb-live);
	box-shadow: 0 0 0 0 var(--lb-live-dim);
	animation: lb-pulse 1.8s ease-out infinite;
	flex-shrink: 0;
}
@keyframes lb-pulse{
	0%   { box-shadow: 0 0 0 0 var(--lb-live-dim); }
	70%  { box-shadow: 0 0 0 8px rgba(255, 75, 92, 0); }
	100% { box-shadow: 0 0 0 0 rgba(255, 75, 92, 0); }
}
@media (prefers-reduced-motion: reduce){
	.liveblog-console__signal{ animation: none; }
}

.liveblog-console__label{
	font-family: var(--lb-mono);
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--lb-live);
	font-weight: 600;
}

.liveblog-console__close{
	margin-left: auto;
	background: none;
	border: 0;
	color: var(--lb-muted);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 6px;
}
.liveblog-console__close:hover,
.liveblog-console__close:focus-visible{
	color: var(--lb-text);
}

/* Form -------------------------------------------------------------------- */

.liveblog-console__form{
	padding: 16px;
}

.liveblog-console__input{
	width: 100%;
	box-sizing: border-box;
	resize: vertical;
	min-height: 96px;
	background: var(--lb-surface);
	border: 1px solid var(--lb-border);
	border-radius: 6px;
	color: var(--lb-text);
	font-family: var(--lb-sans);
	font-size: 15px;
	line-height: 1.5;
	padding: 12px;
}
.liveblog-console__input::placeholder{
	color: var(--lb-muted);
}
.liveblog-console__input:focus-visible{
	outline: 2px solid var(--lb-live);
	outline-offset: 1px;
}

.liveblog-console__footer{
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 10px;
}

.liveblog-console__count{
	font-family: var(--lb-mono);
	font-size: 12px;
	color: var(--lb-muted);
}

.liveblog-console__submit{
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--lb-live);
	color: #ffffff;
	border: 0;
	border-radius: 999px;
	padding: 10px 20px;
	font-family: var(--lb-sans);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.1s ease;
}
.liveblog-console__submit:hover{
	background: #e63f4f;
}
.liveblog-console__submit:active{
	transform: scale(0.97);
}
.liveblog-console__submit:disabled{
	opacity: 0.6;
	cursor: default;
}
.liveblog-console__submit:focus-visible{
	outline: 2px solid var(--lb-text);
	outline-offset: 2px;
}

.liveblog-console__status{
	min-height: 18px;
	margin: 8px 0 0;
	font-family: var(--lb-mono);
	font-size: 12px;
	color: var(--lb-success);
}
.liveblog-console__status.is-error{
	color: var(--lb-live);
}

/* Feed of posted entries ---------------------------------------------------- */

.liveblog-feed{
	border-top: 1px solid var(--lb-border);
}

.live-blog-entry{
	display: flex;
	gap: 14px;
	padding: 14px 16px;
	border-bottom: 1px solid var(--lb-border);
	background: var(--lb-bg);
}
.live-blog-entry:first-child{
	background: linear-gradient(180deg, rgba(255,75,92,0.06), transparent 60%);
}

.live-blog-entry .story__meta{
	flex-shrink: 0;
}
.live-blog-entry .story_date{
	font-family: var(--lb-mono);
	font-size: 11px;
	color: var(--lb-muted);
	background: var(--lb-surface);
	border: 1px solid var(--lb-border);
	border-radius: 4px;
	padding: 3px 6px;
	display: inline-block;
	white-space: nowrap;
}

.live-blog-entry .entry-content{
	color: var(--lb-text);
	font-size: 15px;
	line-height: 1.55;
}
.live-blog-entry .entry-content p{
	margin: 0 0 8px;
}
.live-blog-entry .entry-content p:last-child{
	margin-bottom: 0;
}

/* Small screens -------------------------------------------------------------- */

@media (max-width: 480px){
	.liveblog-console {
		min-width: none;
	}
	.live-blog-entry{
		flex-direction: column;
		gap: 6px;
	}
	.live-blog-entry .story__meta{
		width: auto;
	}
}

.screen-reader-text{
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
