/* ==========================================================================
   Turnīra Prognozes — "afišas" stils (Užavas kauss)
   ========================================================================== */

* { box-sizing: border-box; }

html, body.spt-fullscreen-body {
	margin: 0;
	padding: 0;
	background-color: #0a0a0a;
	background-size: cover;
	background-position: top center;
	background-repeat: no-repeat;
	background-attachment: fixed;
	min-height: 100vh;
	scrollbar-width: thin;
	scrollbar-color: rgba(242, 194, 0, 0.35) #0d0d0d;
}

html::-webkit-scrollbar,
body.spt-fullscreen-body::-webkit-scrollbar {
	width: 8px;
}
html::-webkit-scrollbar-track,
body.spt-fullscreen-body::-webkit-scrollbar-track { background: #0d0d0d; }
html::-webkit-scrollbar-thumb,
body.spt-fullscreen-body::-webkit-scrollbar-thumb {
	background: rgba(242, 194, 0, 0.35);
	border-radius: 4px;
}

.spt-wrap {
	--spt-bg: #0a0a0a;
	--spt-gold: #f2c200;
	--spt-gold-dim: #b89400;
	--spt-text: #f5f5f5;
	--spt-muted: #9a9a9a;
	--spt-card: #f4f4f0;
	--spt-border: #d8d6cf;
	font-family: 'Oswald', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	background: transparent;
	color: var(--spt-text);
	position: relative;
	min-height: 100vh;
	padding: 18px 16px 90px;
}

body.spt-fullscreen-body .spt-wrap {
	background: linear-gradient(180deg, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0.45) 30%, rgba(0,0,0,0.82) 65%, #000 100%);
	border-radius: 0;
}

/* ---- Afišas virsraksts virs bracketa ---- */
.spt-poster-header { text-align: center; margin-bottom: 6px; }
.spt-poster-sub { font-size: 12px; letter-spacing: 4px; color: #eee; font-weight: 500; }
.spt-poster-title {
	font-family: 'Yellowtail', cursive;
	font-size: 46px;
	color: var(--spt-gold);
	line-height: 1;
	text-shadow: 0 2px 16px rgba(242,194,0,0.45);
}

.spt-intro { text-align: center; margin-bottom: 16px; }
.spt-intro h2 { display: none; }
.spt-intro p {
	color: var(--spt-muted);
	max-width: 640px;
	margin: 0 auto;
	line-height: 1.4;
	font-size: 12.5px;
}

.spt-closed-notice {
	background: rgba(20,20,20,0.85);
	border: 1px solid var(--spt-border);
	color: var(--spt-muted);
	padding: 18px;
	border-radius: 8px;
	text-align: center;
}

/* ---- Kārtu navigācija ---- */
.spt-round-nav {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}
.spt-nav-btn {
	background: rgba(0,0,0,0.4);
	border: 1px solid var(--spt-gold);
	color: var(--spt-gold);
	width: 30px;
	height: 30px;
	border-radius: 50%;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	flex: 0 0 auto;
}
.spt-nav-btn:disabled { opacity: 0.3; cursor: default; }
.spt-round-indicator { color: #ddd; font-size: 12px; text-align: center; flex: 1 1 auto; }

.spt-progress {
	margin-top: 6px;
	padding: 7px 12px;
	background: rgba(242, 194, 0, 0.14);
	border: 1px solid var(--spt-gold-dim);
	border-radius: 6px;
	color: var(--spt-gold);
	font-size: 12px;
	text-align: center;
}

.spt-go-to-submit-btn {
	display: block;
	width: 100%;
	margin: 10px 0 0;
	background: var(--spt-gold);
	color: #101010;
	border: none;
	border-radius: 6px;
	padding: 10px 12px;
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 0.3px;
	cursor: pointer;
	font-family: inherit;
	text-transform: uppercase;
}
.spt-go-to-submit-btn:hover:not(:disabled) { background: #ffd633; }
.spt-go-to-submit-btn.is-disabled,
.spt-go-to-submit-btn:disabled {
	background: #3a3a3a;
	color: #888;
	cursor: not-allowed;
}

/* ---- Bracket kolonnas ---- */
.spt-bracket-root {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	padding-bottom: 10px;
}
.spt-round-col { min-width: 172px; flex: 0 0 auto; }
.spt-round-title {
	color: var(--spt-gold);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 1.2px;
	margin: 0 0 8px;
	text-align: center;
	font-weight: 600;
}
.spt-round-matches {
	display: flex;
	flex-direction: column;
	justify-content: space-around;
	height: 100%;
	gap: 28px;
}
.spt-match { background: transparent; border-radius: 4px; overflow: visible; }

.spt-slot,
.spt-slot-placeholder {
	display: block;
	width: 100%;
	text-align: center;
	padding: 9px 10px;
	font-size: 11px;
	background: var(--spt-card);
	color: #999;
	border: none;
	border-top-left-radius: 8px;
	border-bottom: 2px solid var(--spt-border);
	margin-bottom: 2px;
}

.spt-team-btn {
	display: flex;
	align-items: center;
	gap: 9px;
	width: 100%;
	text-align: left;
	min-height: 36px;
	padding: 7px 10px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	background: var(--spt-card);
	color: #111;
	border: none;
	border-top-left-radius: 8px;
	border-bottom: 2px solid var(--spt-border);
	margin-bottom: 2px;
	cursor: pointer;
	font-family: inherit;
	transition: background 0.15s ease, color 0.15s ease;
}
.spt-team-btn:hover:not(:disabled) { background: #ffffff; }
.spt-team-btn.is-selected {
	background: var(--spt-gold) !important;
	color: #101010 !important;
	box-shadow: inset 0 0 0 2px #101010;
}
.spt-team-btn.is-locked-btn,
.spt-team-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.spt-team-logo-full {
	width: 22px;
	height: 22px;
	object-fit: contain;
	flex: 0 0 auto;
}
.spt-team-name,
.spt-team-name-overlay {
	flex: 1 1 auto;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.spt-match-vs { text-align: center; font-size: 9px; color: var(--spt-gold); padding: 1px 0; letter-spacing: 1px; }

.spt-final-diff-inline {
	background: rgba(0,0,0,0.45);
	padding: 6px 8px;
	text-align: center;
	border-radius: 6px;
	margin: 3px 0;
}
.spt-final-diff-inline .spt-vs-label {
	display: block;
	font-size: 8px;
	color: var(--spt-muted);
	text-transform: uppercase;
	letter-spacing: 1.2px;
	margin-bottom: 4px;
}
.spt-final-diff-inline label { display: block; color: var(--spt-gold); font-size: 10px; margin-bottom: 4px; }
.spt-final-diff-inline input {
	width: 100%;
	max-width: 110px;
	padding: 5px 8px;
	background: #fff;
	border: 1px solid var(--spt-gold-dim);
	color: #101010;
	border-radius: 4px;
	box-sizing: border-box;
	text-align: center;
	font-size: 12.5px;
}

/* ---- Iesniegšanas panelis ---- */
.spt-submit-panel {
	margin-top: 18px;
	max-width: 400px;
	background: rgba(15,15,15,0.92);
	border: 1px solid var(--spt-gold-dim);
	border-radius: 10px;
	padding: 16px;
}
.spt-submit-panel h3 { color: var(--spt-gold); margin-top: 0; font-size: 15px; }
.spt-field { margin-bottom: 10px; }
.spt-field label { display: block; font-size: 12px; color: var(--spt-muted); margin-bottom: 4px; }
.spt-field input {
	width: 100%;
	padding: 8px 10px;
	background: #fff;
	border: 1px solid var(--spt-border);
	color: #101010;
	border-radius: 5px;
	box-sizing: border-box;
	font-size: 13px;
}
.spt-submit-btn {
	background: var(--spt-gold);
	color: #101010;
	border: none;
	padding: 10px 18px;
	border-radius: 6px;
	font-weight: 700;
	cursor: pointer;
	font-size: 13px;
	letter-spacing: 0.3px;
	width: 100%;
}
.spt-submit-btn:disabled { opacity: 0.6; cursor: default; }

.spt-message { min-height: 18px; font-size: 13px; margin-bottom: 10px; }
.spt-message-error { color: #ff6b6b; }
.spt-message-ok { color: #6bff95; }

.spt-success {
	background: rgba(15,15,15,0.92);
	border: 1px solid var(--spt-gold);
	border-radius: 10px;
	padding: 26px;
	text-align: center;
	max-width: 780px;
}
.spt-success h3 { color: var(--spt-gold); margin-top: 0; }
.spt-generating { color: var(--spt-muted); font-style: italic; }
.spt-result-image { max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--spt-gold-dim); margin-top: 12px; }
.spt-download-btn {
	display: inline-block;
	margin-top: 14px;
	background: var(--spt-gold);
	color: #101010;
	text-decoration: none;
	font-weight: 700;
	padding: 10px 20px;
	border-radius: 6px;
	font-size: 13.5px;
}
.spt-download-btn:hover { background: #ffd633; }
.spt-share-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.spt-share-actions .spt-download-btn { margin-top: 0; }
.spt-fb-share-btn {
	background: #1877f2; color: #fff; border: none; font-weight: 700;
	padding: 10px 20px; border-radius: 6px; font-size: 13.5px; cursor: pointer;
}
.spt-fb-share-btn:hover { background: #1568d8; }
.spt-fb-share-btn:disabled { opacity: 0.6; cursor: default; }

.spt-admin-warning { background: #fff3cd; border: 1px solid #ffe69c; padding: 12px; border-radius: 6px; }

/* ---- Emblēma apakšējā labajā stūrī ---- */
.spt-badge-corner {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 50;
	box-shadow: 0 4px 18px rgba(0,0,0,0.5);
	border-radius: 6px;
	overflow: hidden;
}
.spt-badge-corner .club-badge-img { width: 52px; height: auto; display: block; }

/* ==========================================================================
   Kopīgi elementi pilnekrāna ekrāniem (vecuma apstiprinājums, pēdējais solis, paldies)
   ========================================================================== */

.spt-age-gate,
.spt-success-screen {
	position: fixed;
	inset: 0;
	z-index: 100000;
	height: 100dvh;
	background-color: #0a0a0a;
	background-image:
		radial-gradient(circle at center, rgba(255,255,255,0.06) 0, rgba(255,255,255,0.06) 2px, transparent 2.5px);
	background-size: 26px 26px;
	color: #fff;
	font-family: 'Oswald', -apple-system, sans-serif;
	display: flex;
	flex-direction: column;
	padding: 14px 16px;
	overflow-y: auto;
}

/* "Pēdējais solis" ekrāns — apzināti VIENKĀRŠS, normāli ritināms izkārtojums
   (nevis "iespiest visu vienā ekrānā"), lai nekad nekas nepārklātos un poga
   vienmēr būtu sasniedzama, vienkārši paritinot uz leju, ja nepieciešams. */
.spt-submit-screen {
	position: fixed;
	inset: 0;
	z-index: 100000;
	min-height: 100dvh;
	background-color: #0a0a0a;
	background-image:
		radial-gradient(circle at center, rgba(255,255,255,0.06) 0, rgba(255,255,255,0.06) 2px, transparent 2.5px);
	background-size: 26px 26px;
	color: #fff;
	font-family: 'Oswald', -apple-system, sans-serif;
	overflow-y: auto;
	padding: 20px 16px 40px;
	box-sizing: border-box;
}
.spt-submit-screen .gate-header,
.spt-submit-screen .gate-title { max-width: 900px; margin-left: auto; margin-right: auto; }
.spt-submit-screen .gate-title { margin-top: 10px; margin-bottom: 6px; }

.gate-header { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; flex-shrink: 0; }
.club-badge-img { width: 40px; height: auto; display: block; border-radius: 4px; }
.sponsor-tag {
	text-align: center; font-size: 10px; color: #ccc; letter-spacing: 0.5px; line-height: 1.3;
	background: rgba(20,20,20,0.85);
	border: 1px solid #333;
	border-radius: 8px;
	padding: 8px 14px 10px;
	display: inline-block;
}
.samsung-logo-img { height: 28px; width: auto; display: block; margin: 4px auto 0; }

.gate-title { text-align: center; flex: 0 0 auto; flex-shrink: 0; margin: 4px 0 2px; }
.gate-title .kicker { font-size: 9px; letter-spacing: 3px; color: #f2c200; font-weight: 600; }
.gate-title h1 {
	font-family: 'Yellowtail', cursive;
	font-size: 32px; color: #f2c200; margin: 0; line-height: 1;
	text-shadow: 0 2px 12px rgba(242,194,0,0.4);
}
.gate-title .sub { font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: #ddd; margin-top: 1px; }

.progress-chip {
	display: inline-flex; align-self: center; align-items: center; gap: 5px;
	background: rgba(242,194,0,0.14); border: 1px solid #f2c200;
	border-radius: 20px; padding: 4px 12px; font-size: 10px; color: #f2c200; font-weight: 600;
	margin-top: 8px;
}

.gate-image {
	flex: 1 1 auto; min-height: 0;
	display: flex; align-items: center; justify-content: center;
	margin: 6px 0; border-radius: 0; overflow: hidden; position: relative;
	background: transparent;
}
.gate-image img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
.gate-image::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,0.55) 100%);
}
.prize-caption {
	position: absolute; left: 10px; bottom: 8px; z-index: 2;
	font-size: 10px; color: #f2c200; font-weight: 600; letter-spacing: 0.5px;
	background: rgba(0,0,0,0.55); padding: 4px 9px; border-radius: 5px;
}

.age-bar {
	flex: 0 0 auto;
	background: rgba(20,20,20,0.9);
	border: 1px solid #f2c200;
	border-radius: 10px;
	padding: 9px 12px;
	display: flex;
	align-items: center;
	gap: 10px;
}
.age-bar .q { flex: 1 1 auto; font-size: 11.5px; font-weight: 600; color: #fff; line-height: 1.25; }
.age-bar .q span { color: #f2c200; }
.age-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.age-btn {
	border: none; border-radius: 6px; padding: 9px 12px;
	font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 11px;
	text-transform: uppercase; cursor: pointer; white-space: nowrap;
}
.age-btn-yes { background: #f2c200; color: #101010; }
.age-btn-yes:hover { background: #ffd633; }
.age-btn-no { background: transparent; color: #ccc; border: 1px solid #444; }
.age-btn-no:hover { background: rgba(255,255,255,0.08); }

.rules-details {
	flex: 0 0 auto;
	margin-top: 8px;
	font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
.rules-details summary {
	color: #999;
	font-size: 10.5px;
	text-align: center;
	cursor: pointer;
	list-style: none;
	text-decoration: underline;
}
.rules-details summary::-webkit-details-marker { display: none; }
.rules-details[open] summary { color: #f2c200; margin-bottom: 8px; }
.rules-text {
	background: rgba(20,20,20,0.9);
	border: 1px solid #333;
	border-radius: 8px;
	padding: 12px 14px;
	font-size: 10.5px;
	line-height: 1.5;
	color: #ccc;
	max-height: 220px;
	overflow-y: auto;
}
.rules-text p { margin: 0 0 8px; }
.rules-text p:last-child { margin-bottom: 0; }
.rules-text strong { color: #f2c200; }

/* ==========================================================================
   "Pēdējais solis" ekrāns (vārds/e-pasts + telefona bilde)
   ========================================================================== */

.spt-submit-screen .phone-row {
	max-width: 900px;
	margin: 16px auto 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.spt-submit-screen .phone-image {
	width: 100%;
	height: 240px;
	max-height: 240px;
	border-radius: 0; overflow: hidden; position: relative;
	background: transparent;
	display: flex; align-items: center; justify-content: center;
}
.spt-submit-screen .phone-image img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.spt-submit-screen .phone-image img.phone-image-desktop { display: none; }
.spt-submit-screen .phone-image img.phone-image-mobile { display: block; }

.spt-submit-screen .form-col {
	width: 100%;
	box-sizing: border-box;
	background: rgba(15,15,15,0.9);
	border: 1px solid #f2c200;
	border-radius: 10px;
	padding: 20px 18px;
}
.spt-submit-screen .form-col h3 { margin: 0 0 14px; color: #f2c200; font-size: 17px; text-align: center; }
.spt-submit-screen .spt-field { margin-bottom: 14px; }
.spt-submit-screen .spt-field label { display: block; font-size: 12px; color: #ccc; margin-bottom: 5px; }
.spt-submit-screen .spt-field input {
	width: 100%; padding: 12px 12px; font-size: 16px;
	background: #fff; color: #101010; border: 1px solid #444; border-radius: 5px;
	box-sizing: border-box;
}
.spt-submit-screen .spt-submit-btn { margin-top: 6px; padding: 14px 12px; font-size: 14px; }
.privacy-note { text-align: center; font-size: 10.5px; color: #888; margin-top: 10px; line-height: 1.4; }
.edit-picks-btn {
	display: block; width: 100%; text-align: center; margin-top: 12px;
	background: transparent; border: none; color: #999; font-size: 12px;
	text-decoration: underline; cursor: pointer; font-family: 'Oswald', sans-serif;
}
.edit-picks-btn:hover { color: #f2c200; }

/* ==========================================================================
   "Paldies" / rezultāta ekrāns
   ========================================================================== */
.spt-success-screen .spt-success {
	flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center;
	text-align: center; max-width: 700px; margin: 0 auto; width: 100%;
}

/* ==========================================================================
   Mobilā versija
   ========================================================================== */
@media (max-width: 640px) {
	.spt-wrap { padding: 16px 12px 90px; }
	.spt-poster-title { font-size: 34px; }

	.spt-round-nav {
		position: sticky; top: 0; background: rgba(10,10,10,0.9);
		z-index: 10; padding: 6px 0; backdrop-filter: blur(2px);
	}
	.spt-round-col { min-width: 100%; width: 100%; flex: 0 0 100%; box-sizing: border-box; padding: 0 2px; }
	.spt-bracket-root { gap: 0; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scroll-behavior: smooth; }
	.spt-round-col { scroll-snap-align: start; }

	.spt-team-btn, .spt-slot { padding: 12px 10px; font-size: 13px; min-height: 44px; }
	.spt-team-logo-full { width: 26px; height: 26px; }

	.spt-final-diff-inline input, .spt-field input { font-size: 16px; padding: 12px; }
	.spt-submit-btn { padding: 13px 18px; font-size: 14px; }

	.spt-badge-corner .club-badge-img { width: 42px; }
	.spt-badge-corner { right: 12px; bottom: 12px; }
}

@media (min-width: 640px) {
	.club-badge-img { width: 56px; }
	.sponsor-tag { font-size: 13px; }
	.samsung-logo-img { height: 40px; margin-top: 6px; }
	.gate-title h1 { font-size: 56px; }
	.gate-title .kicker { font-size: 12px; }
	.gate-title .sub { font-size: 13px; }
	.progress-chip { font-size: 12px; padding: 6px 16px; margin-top: 10px; }
	.age-bar { padding: 14px 22px; max-width: 640px; margin: 0 auto; }
	.age-bar .q { font-size: 14px; }
	.age-btn { padding: 11px 20px; font-size: 13px; }
	.prize-caption { font-size: 13px; padding: 6px 12px; left: 16px; bottom: 14px; }
	.rules-details summary { font-size: 12px; }
	.rules-text { font-size: 12px; max-width: 640px; margin: 0 auto; }
	.spt-age-gate, .spt-submit-screen, .spt-success-screen { padding: 26px 40px; }

	.spt-submit-screen .phone-row { max-width: 900px; margin: 24px auto 0; gap: 28px; flex-direction: row; align-items: stretch; }
	.spt-submit-screen .phone-image { width: auto; height: auto; flex: 0 0 38%; min-width: 0; max-height: 420px; }
	.spt-submit-screen .phone-image img.phone-image-mobile { display: none; }
	.spt-submit-screen .phone-image img.phone-image-desktop { display: block; }
	.spt-submit-screen .form-col { flex: 1 1 62%; min-width: 0; padding: 30px 34px; display: flex; flex-direction: column; justify-content: center; }
	.spt-submit-screen .form-col h3 { font-size: 20px; margin-bottom: 18px; }
	.spt-submit-screen .spt-field label { font-size: 12px; margin-bottom: 5px; }
	.spt-submit-screen .spt-field { margin-bottom: 14px; }
	.spt-submit-screen .spt-field input { padding: 11px 12px; font-size: 14px; }
	.privacy-note { font-size: 10.5px; margin-top: 12px; }
	.edit-picks-btn { font-size: 12px; margin-top: 14px; }
}

@media (min-width: 1024px) {
	.gate-title h1 { font-size: 68px; }
	.spt-poster-title { font-size: 60px; }
}
