/* --- Ogólny styl strony --- */
body {
	background-color: white;
	margin: 0;
	padding-top: 180px;
	font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
	text-align: center;
}

body::before {
	content: "";
	background-image: url("https://www.fzcj.pl/img/logoFZCJczarne.png");
	background-repeat: no-repeat;
	background-position: center top;
	background-size: contain;
	opacity: 1;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 150px;
	z-index: -1;
}

.kursy-wrapper {
	position: relative;
	display: inline-block;
	padding: 2em;
	background-color: rgba(255, 255, 255, 0);
	overflow: hidden;
	z-index: 1;
}

.kursy-wrapper::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-image: url("NBP_2_Raks_fzcj800x150-kj.png");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 100% 40%;
	transform: scale(0.5);
	opacity: 0.92;
	animation: zoomFade 5s ease-in-out forwards;
	z-index: -1;
}

@keyframes zoomFade {
	0% {
		transform: scale(0.3);
		filter: blur(20px);
		opacity: 0.99;
	}
	100% {
		transform: scale(0.8);
		filter: blur(0px);
		opacity: 0.3;
	}
}

.fade-in {
	animation: fadeInContent 5s ease-in-out forwards;
}

@keyframes fadeInContent {
	0% {
		opacity: 0;
		transform: scale(0.2);
	}
	100% {
		opacity: 1;
		transform: scale(1);
	}
}

h1 {
	color: #004278;
}

label {
	display: inline-block;
	margin: 1em;
}

input[type="date"],
input[type="number"],
select {
	padding: 0.5em;
	font-size: 1em;
	border: 1px solid #004278;
	border-radius: 5px;
}

/* Styl inputów tekstowych */
input[type="text"] {
	padding: 0.5em;
	font-size: 1em;
	border: 1px solid #004278;
	border-radius: 5px;
	width: 150px;
	text-align: right;
}

/* Styl komunikatu ostrzegawczego */
#ponowne_obliczenie_info.alert-info {
	display: none;
	background-color: red;
	color: white;
	padding: 15px;
	font-weight: bold;
	border: 2px solid darkred;
	border-radius: 6px;
	margin-top: 10px;
}

button {
	padding: 0.6em 1.2em;
	font-size: 1em;
	background-color: #0078d7;
	color: white;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	margin-top: 1em;
}

button:hover {
	background-color: #03651e;
}

a.download-link {
	display: block;
	margin-top: 1.5em;
	color: #0078d7;
	font-weight: bold;
}

/* --- Styl do druku --- */

#print-footer {
	display: none;
}

table {
	margin-top: 25px;
	border-collapse: collapse;
	width: 100%;
	max-width: 600px;
	background-color: white;
	box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

table th,
table td {
	padding: 8px 11px;
	border: 1px solid #ddd;
	text-align: left;
	font-size: 11px;
}

table th {
	background-color: #3a86ff;
	color: white;
}

#wynikiTabela td:nth-child(2) {
	text-align: right;
	padding-right: 10px;
	padding-left: 10px; /* dla symetrii */
}

#export-section {
	max-width: 600px;
	margin: 0 auto;
}

#export-section.fade-in {
	animation: fadeInAnim 0.5s ease forwards;
}

@keyframes fadeInAnim {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

#print-footer {
	text-align: center;
	margin-top: 40px;
	font-size: 13px;
	color: #888;
}

/* Tabela początkowo ukryta */
#wynikiTabela {
	display: none;
}

/* --- Styl do druku z pomniejszeniem i ukryciem zbędnych elementów --- */

@media print {
	@page {
		size: A4 portrait;
		margin: 5mm;
	}

	body {
		margin: 0;
		padding: 0;
		font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
		font-size: 10pt;
		color: black !important;
		background: white !important;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}

	body::before {
		content: none !important;
	}

	/* Logo do druku - bez position: fixed! */
	#print-logo {
		display: block;
		width: 50%;
		height: 60px;
		background-image: url("https://www.fzcj.pl/img/logoFZCJczarne.png");
		background-repeat: no-repeat;
		background-position: center top;
		background-size: contain;
		opacity: 1;
		margin: 0 auto 10px auto;
	}

	button {
		display: none !important;
	}

	#print-footer {
		display: block;
		text-align: center;
		font-size: 9pt;
		color: #666;
		margin-top: 15px;
		padding-bottom: 5px;
	}

	#export-section {
		max-width: 17cm;
		margin: 0 auto;
		padding: 20px 10px 10px 10px; /* zmniejszony padding-top */
		box-sizing: border-box;
		overflow: visible;
		text-align: justify;
		font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
		visibility: visible !important;
		display: block !important;
		page-break-inside: avoid;
	}

	table {
		width: 100% !important;
		border-collapse: collapse !important;
		margin-top: 5px !important;
		box-shadow: none !important;
		page-break-inside: avoid;
	}

	table th,
	table td {
		padding: 4px 8px !important;
		border: 1px solid #ddd !important;
		font-size: 9pt !important;
		text-align: rigth !important;
	}

	table th {
		background-color: #3a86ff !important;
		color: white !important;
		text-align: center !important;
	}

	/* Usuwamy animacje i dekoracje */
	.kursy-wrapper::before,
	.fade-in {
		display: none !important;
	}

	html,
	body {
		margin: 0;
		padding: 0;
		height: auto;
		overflow: visible;
		display: block !important;
	}
}

.btn-return {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px;
	background-color: #f2a9a9;
	color: white;
	text-decoration: none;
	border: none;
	border-radius: 6px;
	font-weight: bold;
	font-size: 1em;
	transition: background-color 0.3s ease, color 0.3s ease, transform 0.1s ease;
	margin-top: 10px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
	cursor: pointer;
}

.btn-return:hover {
	background-color: darkred;
	color: rgb(245, 222, 165);
}

.btn-return:active {
	transform: scale(0.97);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.btn-return .icon-left,
.btn-return .icon-right {
	width: 1.1em;
	height: 1.1em;
	fill: currentColor;
	flex-shrink: 0;
	vertical-align: middle;
}


#print-footer {
	all: unset; /* resetuje wszystkie style */
	color: rgb(111, 112, 111) !important; /* nadpisuje inne kolory */
	display: block; /* przywraca potrzebne cechy blokowe */
}
