/**
* Nextury — slapukų sutikimas
 *
 * Paletė paimta iš gyvos nextury.news:
 *   fonas    #04070B   (body)
 *   tekstas  #E8EEF2   (antraštės)
 *   akcentas #0BB3C6   (mygtukai)
 *   šriftas  Nextury Neris Font
 *   radius   4px
 *
 * Šriftas paveldimas iš temos — nefiksuojam, kad pasikeitus temai
 * juosta neatrodytų svetima.
 */

/*
 * VISKAS APGAUBTA #nxc-banner / #nxc-toggle SĄMONINGAI.
 *
 * nextury.news tema priverstinai dažo visus <button> elementus spalva
 * #CC3366 ir krauna savo CSS po mūsų. Klasių selektoriai (0,1,0) tokiai
 * taisyklei pralaimi. ID selektorius (1,0,0) ją nugali be `!important`,
 * kuris vėliau pats taptų problema.
 */

#nxc-banner {
	--nxc-bg:      #0a0e14;
	--nxc-bg-soft: #10151d;
	--nxc-line:    #1e2530;
	--nxc-text:    #e8eef2;
	--nxc-muted:   #9aa7b4;
	--nxc-accent:  #0bb3c6;
	--nxc-radius:  4px;

	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999999;
	padding: 0 16px calc( 16px + env( safe-area-inset-bottom, 0px ) );
	font-family: inherit;
	font-size: 15px;
	line-height: 1.55;
	animation: nxc-up .24s ease-out;
}

#nxc-banner { display: none; }
#nxc-banner.is-open { display: block; }

@keyframes nxc-up {
	from { transform: translateY( 12px ); opacity: 0; }
	to   { transform: translateY( 0 );    opacity: 1; }
}

@media ( prefers-reduced-motion: reduce ) {
#nxc-banner { animation: none; }
}

#nxc-banner .nxc-panel {
	max-width: 860px;
	margin: 0 auto;
	background: var( --nxc-bg );
	color: var( --nxc-text );
	border: 1px solid var( --nxc-line );
	border-bottom: 0;
	border-radius: 10px 10px 0 0;
	box-shadow: 0 -8px 40px rgba( 0, 0, 0, .55 );
	padding: 26px 28px 22px;
	max-height: 88vh;
	overflow-y: auto;
}

/* ---------- Uždarymo mygtukas ---------- */

#nxc-banner .nxc-panel { position: relative; }

#nxc-banner .nxc-close {
	position: absolute;
	top: 14px;
	right: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	background: transparent;
	color: var( --nxc-muted );
	border: 1px solid transparent;
	border-radius: 50%;
	cursor: pointer;
	transition: color .15s, background .15s, border-color .15s;
}

#nxc-banner .nxc-close:hover {
	color: var( --nxc-text );
	background: var( --nxc-bg-soft );
	border-color: var( --nxc-line );
}

#nxc-banner .nxc-close:focus-visible {
	outline: 2px solid var( --nxc-accent );
	outline-offset: 2px;
}

#nxc-banner .nxc-close svg { display: block; }

/* ---------- Antraštė ---------- */

#nxc-banner .nxc-logo {
	display: block;
	height: 34px;
	width: auto;
	margin: 0 0 16px;
}

#nxc-banner .nxc-title {
	margin: 0 0 10px;
	padding-right: 44px;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.3;
	color: var( --nxc-text );
}

#nxc-banner .nxc-text {
	margin: 0 0 10px;
	color: var( --nxc-muted );
	font-size: 14.5px;
}

#nxc-banner .nxc-policy {
	display: inline-block;
	color: var( --nxc-accent );
	text-decoration: underline;
	text-underline-offset: 2px;
	font-size: 14.5px;
}

#nxc-banner .nxc-policy:hover { color: var( --nxc-text ); }

/* ---------- Mygtukai ---------- */

#nxc-banner .nxc-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 20px;
}

#nxc-banner .nxc-btn {
	appearance: none;
	border: 1px solid transparent;
	border-radius: var( --nxc-radius );
	padding: 12px 26px;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: background .15s, border-color .15s, color .15s;
}

#nxc-banner .nxc-btn:focus-visible {
	outline: 2px solid var( --nxc-accent );
	outline-offset: 2px;
}

#nxc-banner .nxc-btn-primary {
	background: var( --nxc-accent );
	color: #04070b;
}

#nxc-banner .nxc-btn-primary:hover { filter: brightness( 1.12 ); }

#nxc-banner .nxc-btn-ghost {
	background: transparent;
	color: var( --nxc-text );
	border-color: #2c3542;
}

#nxc-banner .nxc-btn-ghost:hover { border-color: var( --nxc-accent ); color: var( --nxc-accent ); }

#nxc-banner .nxc-btn-quiet {
	background: transparent;
	color: var( --nxc-muted );
	border-color: transparent;
	padding-left: 12px;
	padding-right: 12px;
	font-weight: 500;
}

#nxc-banner .nxc-btn-quiet:hover { color: var( --nxc-text ); }

/* ---------- Nuostatos ---------- */

/*
 * Matomumas valdomas KLASE, ne vien `hidden` atributu.
 *
 * `[hidden]` tėra naršyklės numatytoji `display:none` taisyklė ir bet kokia
 * tema, nustatanti .nxc-prefs { display:block }, ją nugalėtų — nuostatos
 * atsivertų iš karto. Klasė tokio scenarijaus neturi.
 * `hidden` atributas paliekamas ekrano skaitytuvams.
 */
#nxc-banner .nxc-prefs {
	display: none;
	margin-top: 22px;
	border-top: 1px solid var( --nxc-line );
	padding-top: 6px;
}

#nxc-banner .nxc-prefs.is-open { display: block; }

#nxc-banner .nxc-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 22px;
	padding: 15px 0;
	border-bottom: 1px solid var( --nxc-line );
}

#nxc-banner .nxc-row:last-of-type { border-bottom: 0; }

#nxc-banner .nxc-row-copy { min-width: 0; }

#nxc-banner .nxc-row-title {
	display: block;
	font-weight: 700;
	font-size: 15px;
	color: var( --nxc-text );
}

#nxc-banner .nxc-row-desc {
	display: block;
	margin-top: 3px;
	color: var( --nxc-muted );
	font-size: 13.5px;
	line-height: 1.5;
}

#nxc-banner .nxc-badge {
	flex-shrink: 0;
	align-self: center;
	background: var( --nxc-bg-soft );
	color: var( --nxc-muted );
	border: 1px solid var( --nxc-line );
	border-radius: 999px;
	padding: 5px 13px;
	font-size: 12.5px;
	white-space: nowrap;
}

/* ---------- Jungiklis ---------- */

#nxc-banner .nxc-switch {
	position: relative;
	flex-shrink: 0;
	align-self: center;
	width: 46px;
	height: 26px;
	cursor: pointer;
}

#nxc-banner .nxc-switch input {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
}

#nxc-banner .nxc-slider {
	position: absolute;
	inset: 0;
	background: #2a323d;
	border-radius: 999px;
	transition: background .18s;
	pointer-events: none;
}

#nxc-banner .nxc-slider::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	background: #fff;
	border-radius: 50%;
	transition: transform .18s;
}

#nxc-banner .nxc-switch input:checked + .nxc-slider { background: var( --nxc-accent ); }
#nxc-banner .nxc-switch input:checked + .nxc-slider::before { transform: translateX( 20px ); }
#nxc-banner .nxc-switch input:focus-visible + .nxc-slider { outline: 2px solid var( --nxc-accent ); outline-offset: 2px; }

#nxc-banner .nxc-prefs-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	padding-top: 18px;
}

/* ---------- Atšaukimo mygtukas ---------- */

#nxc-toggle {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 999998;
	display: none;
	width: 42px;
	height: 42px;
	padding: 0;
	background: #0a0e14;
	color: #9aa7b4;
	border: 1px solid #1e2530;
	border-radius: 50%;
	cursor: pointer;
	box-shadow: 0 2px 14px rgba( 0, 0, 0, .45 );
	opacity: .72;
	transition: opacity .16s, color .16s, border-color .16s, transform .16s;
}

#nxc-toggle:hover {
	opacity: 1;
	color: #0bb3c6;
	border-color: #0bb3c6;
	transform: translateY( -1px );
}

#nxc-toggle:focus-visible {
	outline: 2px solid #0bb3c6;
	outline-offset: 2px;
	opacity: 1;
}

#nxc-toggle.is-open {
	display: flex;
	align-items: center;
	justify-content: center;
}

#nxc-toggle svg { display: block; }

.nxc-reopen { cursor: pointer; }

/* ---------- Mobilus ---------- */

@media ( max-width: 640px ) {
#nxc-banner { padding: 0 0 env( safe-area-inset-bottom, 0px ); font-size: 14px; }

#nxc-banner .nxc-panel {
		border-radius: 10px 10px 0 0;
		border-left: 0;
		border-right: 0;
		padding: 20px 18px 18px;
		max-height: 84vh;
	}

#nxc-banner .nxc-logo { height: 28px; margin-bottom: 12px; }
#nxc-banner .nxc-title { font-size: 17px; }

#nxc-banner .nxc-actions { flex-direction: column; }
#nxc-banner .nxc-actions .nxc-btn { width: 100%; padding: 13px 16px; }

#nxc-banner .nxc-row { gap: 14px; }
#nxc-banner .nxc-prefs-actions { flex-direction: column; align-items: stretch; }
#nxc-banner .nxc-prefs-actions .nxc-btn { width: 100%; }

#nxc-toggle { left: 12px; bottom: 12px; width: 38px; height: 38px; }
}

/* ---------- Šviesi tema, jei tema kada pasikeistų ---------- */

@media ( prefers-color-scheme: light ) {
#nxc-banner.nxc-auto-light {
		--nxc-bg:      #ffffff;
		--nxc-bg-soft: #f6f7f9;
		--nxc-line:    #e3e6ea;
		--nxc-text:    #14181d;
		--nxc-muted:   #5c6672;
	}
#nxc-banner.nxc-auto-light .nxc-btn-primary { color: #fff; }
#nxc-banner.nxc-auto-light .nxc-slider { background: #ccd2d9; }
}
