:root {
	--black: #000;
	--white: rgb(255,255,255);
	--app-background-color: #fafafa;
	--info-background-color: #f0f0f0;
	--content-width: 500px;
	--border-radius: 3px;
	
	
	

}

/* Reset dla tego pliku - używamy border-box */
#page,
#page *,
#page *::before,
#page *::after {
	box-sizing: border-box;
}

html {
	margin: 0;
	padding: 0;
	border: 0;
	height: 100%;
	width: 100%;
	line-height: 1.5;
	font-weight: 400;
	color: #111;
}

body {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	letter-spacing: 0px;
	background: var(--app-background-color);
}

b, strong {
	font-weight: 700;
}

sub, sup {
	font-size: 0.7em;
}

h1 {
	font-size: 2rem;
	margin: 0.67rem 0;
	font-weight: 600;
}

h2 {
	font-size: 1.5rem;
	font-weight: 600;
}

h3 {
	font-size: 1.2rem;
	font-weight: 500;
	line-height: 1.3;
}

h4 {
	font-weight: 600;
}

h5 {
	font-size: 0.75rem;
	font-weight: 400;
	margin: 0.5rem 0;
} 

h6 {
	font-size: 0.75rem;
	font-weight: 400;
	margin: 0.5rem 0;
	line-height: 1.15;
	color: #444;
}

p {
	display: block;
	margin-block-start: 0rem;
	margin-block-end: 0rem;
	margin-inline-start: 0px;
	margin-inline-end: 0px;
	margin-bottom: 30px;
}

table, th, td {
	border: 0px solid black;
	border-collapse: collapse;
	text-align: left; 
	font-size: 0.76rem;
	padding: 0;
	border-spacing: 0;
	margin: 0 0 6px 0;
}

table { 
	page-break-inside: auto;
	padding: 0;
	border-spacing: 0;
	cursor: default;
}

label {
	font-size: 0.95rem;
}

tr {
	page-break-inside: avoid;
	page-break-after: auto;
}
    
thead {
	display: table-header-group;
}
    
tfoot {
	display: table-footer-group;
}

textarea {
	resize: vertical;
	font: inherit;
	font-size: 0.75rem;
	height: auto;
	cursor: text;
}

textarea,
input[type=text], 
input[type=number] {
	font-family: monospace;
}

textarea,
input[type=text], 
input[type=submit], 
input[type=button],
input[type=number] {
	-webkit-appearance: none !important;
}

input[type=checkbox] {
	cursor: pointer;
}

/* App ma własny wygląd i nie powinien przejmować akcentów systemu */
#page input[type=checkbox],
#page input[type=radio] {
	accent-color: auto;
}

#page sup {
	color: inherit;
	padding-left: 0;
}

select,
option {
	-webkit-box-shadow: none !important;
	max-width: 100% !important;
	width: 100% !important;
	box-shadow: none !important;
	background-color: var(--white) !important;
	cursor: pointer;
}

.info-icon,
.demo-info-icon {
	font-size: 0.9rem;
	font-weight: 600;
	cursor: help;
	margin-right: 4px;
}

.info-icon:hover {
	color: #555;
}
	
/* baner demo*/
.demo-banner {
	color: red;
	font-size: 1rem;
	font-weight: 600;
	text-align: center;
	margin-bottom: 35px;
	background: #ffffff;
    border: 1px solid red;
    border-radius: 3px;
	padding: 3px;
	cursor: default;
}

/* menu nawigacji */
.link {
	display: inline-block;
	border: none;
	padding-bottom: 4px;
	font-weight: 700;
	color: var(--black);
}

.link:active, .link:focus, .link:hover {
	outline: 0;
}

.link:hover:before {
	width: 100%
}

/* === MAIN GRID LAYOUT === */
#page {
	margin: 0px;
	padding: 0px;
	border: none;
	height: 100vh;
	width: 100%;
	position: relative;
}

/* === HEADER === */
#header {
	padding: 15px 20px;
}

.header-box {
	margin: 0;
	width: 100%;
	height: 100%;
	color: var(--black);
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0;
}

#logo {
	height: 36px;
	width: 150px;
}

#logo a {
	display: flex;
	align-items: center;
	text-decoration: none;
	color: #222222;
	font-weight: 700;
	font-size: 1.5rem;
}

/* === MOBILE FIRST LAYOUT === */

.main-pic {
}

#main-svg {
	display: none;
}

#form-svg-box {
	display: block;
	margin: 0;
}

#main-svg-option-box {
	display: none;
}

/* main-content - mobile */
#main-content {
	width: 100%;
	font-size: 1rem;
	height: auto;
}

.main-content {
	padding: 20px 20px;
	width: 100%;
}

.main-svg {
	width: 100%;
	height: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
}

.main-svg svg {
	max-width: 100%;
	height: auto;
}

/* === TYPOGRAPHY === */
.main-title {
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.3;
	padding-bottom: 30px;
}

.main-title sup {
	cursor: pointer;
}

/* === BUTTONS === */
.button-file {
	padding: 4px;
	font-size: 0.95rem;
	color: var(--white);
	text-align: center;
	border: 1px solid var(--black);
	background-color: var(--black);
	cursor: pointer;
	border-radius: var(--border-radius);
}

.button-file:hover {
	color: var(--black);
	background-color: var(--white);
	outline: none;
	font-weight: 600;
}

/* Container dla przycisków DXF */
.button-DXF-container {
	display: flex;
	gap: 5px;
	margin-top: -10px;
	margin-bottom: 6px;
}

.button-DXF {
	padding: 0;
	font-size: 0.85rem;
	color: var(--white);
	border: 1px solid var(--black);
	background-color: var(--black);
	cursor: pointer;
	width: 100px;
	text-align: center;
	margin: 0;
	border-radius: var(--border-radius);
}

.button-DXF:hover {
	color: var(--black);
	background-color: var(--white);
	outline: none;
	font-weight: 600;
}

.loaded-file {
	color: var(--black);
	font-size: 0.81rem;
	font-weight: 600;
	padding-top: 4px;
}

/* === FORM ELEMENTS === */
.form-box {
	width: 100%;
}

.form-input-box {
	width: 100%;
}

.form-info {
	margin: 15px 0 10px 0;
	background-color: var(--info-background-color);
	font-size: 0.8rem;
	padding: 13px;
	color: var(--black);
	width: 100%;
	display: none;
	font-weight: 400;
	border-radius: var(--border-radius);
	cursor: default;
}

.form-info p {
	padding: 3px 0;
	margin: 0;
	font-size: 0.85rem;
}

.form-info-result{
	margin: 40px 0 25px 0;
	background-color: #ffffff;
	font-size: 0.86rem;
	padding: 13px;
	color: var(--black);
	width: 100%;
	font-weight: 400;
	border: 2px solid #333;
	border-radius: var(--border-radius);
	cursor: default;
}

.form-info-result p{
	padding: 3px 0;
	font-size: 0.86rem;
	margin: 0;
}

/* alert nadpisuje .form-info-result */
.form-info-result.form-info-result_alert{
  border-color: red;
  color: red;
}


.form-info-table {
	width: 100%;
}

.form-info-table table,
.form-info-table th,
.form-info-table tr,
.form-info-table td {
	border: 1px solid #555;
	border-collapse: collapse;
	text-align: center; 
	font-size: 0.7rem;
	padding: 2px 2.5px;
	margin: 6px 0;
}

.form-info-table table {
	width: 100%;
}

.form-info-table th {
	font-size: 0.68rem;
	width: auto;
}

.form-demo-info {
	margin: 15px 0;
	font-size: 0.9rem;
	padding: 11px;
	color: red;
	width: 100%;
	display: none;
	border-radius: var(--border-radius);
	border: 1px solid red;
	cursor: default;
	background: #fff;
}

.form-demo-info a {
	text-decoration: none;
}

.form-demo-info a:hover {
	text-decoration: underline;
}

.form-demo-txt,
.form-error,
.form-error-txt {
	margin: 0;
	font-size: 0.9rem;
	padding: 0 0 0 0;
	color: red;
	font-weight: 600;
	cursor: default;
}

.form-demo-txt {
	margin: -5px 0 8px 0;
}

.form-demo-txt a {
	display: inline-block;
	padding: 1px 10px;
	text-decoration: none;
	background-color: #fff;
	border-radius: 4px;
	margin-left: 2px;
	border: 1px solid red;
	margin-top: 5px;
}

.form-demo-txt a:hover {
	background-color: red;
	color: white !important;
}

.form-error-svg {
	color: red;
	text-align: center;
	font-weight: 600;
	padding: 40px 0 20px 0;
}
	
.form-label,
.form-label label,
.form-checkbox,
.form-checkbox-textarea,
.form-checkbox-r,
.form-checkbox label,
.form-checkbox-textarea label,
.form-checkbox-r label {
	padding: 30px 0 12px 0;
	font-size: 0.96rem;
	line-height: 1.6;
	font-weight: 600;
	width: 100%;
}

.form-label label,
.form-checkbox label,
.form-checkbox-textarea label,
.form-checkbox-r label {
}

.form-checkbox,
.form-checkbox-r {
	padding: 5px 0 10px 0;
}

.form-checkbox-r {
	margin-top: -16px;
}

.form-checkbox-r label,
.form-checkbox label,
.form-checkbox-textarea label {
	font-size: 0.86rem;
	padding: 0;
}

.form-checkbox-r label {
	font-weight: 400;
}

.form-checkbox-textarea {
	padding: 0;
	margin-top: -16px;
}

.form-input {
	margin-bottom: 15px;
	font-size: 0.86rem;
}

.form-input input,
.form-input textarea,
.form-input select {
	margin: 0 0 3px 0;	
	padding: 3px 5px;
	width: 100%;
	font-size: 0.85rem;
	font-weight: 400;
	line-height: 1.2;
	border: 1px solid var(--black);
	background-color: white;
	outline: 0px solid var(--black);
	border-radius: var(--border-radius);
}

.form-input select {
	margin: 0 0 8px 0;
}

.form-input input:focus,
.form-input textarea:focus,
.form-input select:focus { 
	border-color: var(--black);
	background-color: var(--white);
	outline: 0.1px solid var(--black); 
	border-radius: var(--border-radius);
}

.form-checkbox input[type=checkbox] {
	margin: 3px 3px 0 0;
	width: auto;
}

.form-table {
	border: 0px solid black;
	border-collapse: collapse;
	text-align: left;
	width: 100%;
}

.form-table td {
	width: 50%;
	border: 0px solid black;
	border-collapse: collapse;
	text-align: left;
	font-size: 0.8rem;
	padding: 2px 0;
	margin: 6px 0;
}

.input-number {
	border: 1px solid black;
	border-radius: var(--border-radius);
}

/* === PRZYCISKI FORMULARZA === */
.form-input-button-box {
	padding: 30px 0 35px 0;
	width: 100%;
	display: flex;
	gap: 15px;
}

.button-black,
.button-white {
	flex: 1; /* Divy wypełniają przestrzeń */
}

.button-black input[type=submit],
.button-black input[type=button],
.button-white input[type=button] {
	font-weight: 500;
	border: 1px solid var(--black);
	border-radius: var(--border-radius);
	padding: 6px 0;
	font-size: 0.9rem;
	text-align: center;
	cursor: pointer;
	height: 30px;
	width: 100%;
}

.button-black input[type=submit],
.button-black input[type=button] {
	background-color: var(--black);
	color: var(--white);
}

.button-black input[type=submit]:hover,
.button-black input[type=button]:hover {
	background-color: var(--white);
	color: var(--black);
	outline: 0px solid var(--black);
	font-weight: 600;
}

.button-white input[type=button] {
	background-color: var(--white);
	color: var(--black);
}

.button-white input[type=button]:hover {
	background-color: var(--black);
	color: var(--white);
	outline: 0px solid var(--black);
	font-weight: 600;
}

.button-example {
	font-weight: 400;
	border: 1px solid var(--black);
	border-radius: var(--border-radius);
	padding: 6px;
	font-size: 0.80rem;
	text-align: left;
	cursor: pointer;
	height: auto;	
	margin: 5px 0 15px 0;
	background-color: var(--white);
	color: var(--black);
}

.button-example b {
	font-weight: 500;
	font-size: 0.86rem;
}

.button-example:hover {
	background-color: var(--black);
	color: var(--white);
	outline: 0px solid var(--black);
}

/* Stylizacja input pobieranie pliku */
.inputfile {
	width: 0.1px;
	height: 0.1px;
	opacity: 0;
	overflow: hidden;
	position: absolute;
	z-index: -1;
}

.inputfile + label {
	cursor: pointer;
	overflow: hidden;
}

/* === MENU MOBILE === */
.header-box ul {
	margin: 0;
	padding: 0;
	list-style: none;
	overflow: hidden;
}

.header-box li a {
	display: block;
	padding: 10px 0;
	text-decoration: none;
	border-bottom: 1px solid #ddd;
	font-weight: 500;
}

.header-box .logo {
	color: var(--black);
	display: block;
	font-size: 2rem;
	padding: 2px 0px;
	text-decoration: none;
}

.menu {
	position: absolute;
	top: 60px;
	width: calc(100% - 20px);
	max-height: 0;
	font-size: 1.15rem;
	background-color: var(--app-background-color);
	overflow: hidden;
	/* transition: max-height 0.2s ease-out; płynne rozwijanie */
}

/* menu icon */
.header-box .menu-icon {
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	width: 25px;
	height: 44px;
	padding: 0;
	flex: 0 0 25px;
	user-select: none;
}

.header-box .menu-icon .navicon {
	background: var(--black);
	display: block;
	height: 2px;
	width: 25px;
	position: relative;
	transition: background .2s ease-out;
	pointer-events: none;
}

.header-box .menu-icon .navicon:before,
.header-box .menu-icon .navicon:after {
	background: var(--black);
	content: '';
	display: block;
	height: 100%;
	position: absolute;
	transition: all .2s ease-out;
	width: 100%;
	pointer-events: none;
}

.header-box .menu-icon .navicon:before {
	top: 7px;
}

.header-box .menu-icon .navicon:after {
	top: -7px;
}

/* menu desktop */
.header-box .menu-btn {
	display: none;
}

.header-box .menu-btn:checked ~ .menu {
	max-height: 100%;
}

.header-box .menu-btn:checked ~ .menu-icon .navicon {
	background: transparent;
}

.header-box .menu-btn:checked ~ .menu-icon .navicon:before {
	transform: rotate(-45deg);
}

.header-box .menu-btn:checked ~ .menu-icon .navicon:after {
	transform: rotate(45deg);
}

.header-box .menu-btn:checked ~ .menu-icon:not(.steps) .navicon:before,
.header-box .menu-btn:checked ~ .menu-icon:not(.steps) .navicon:after {
	top: 0;
}

ul.menu li {
	margin: 0;
	width: 100%;
}

ul.menu li a {
	padding: .75rem 0;
	display: block;
	text-decoration: none;
	color: #222222;
	font-weight: 400;
}

ul.menu li a:hover {
	font-weight: 500;
}

/* === DESKTOP STYLES === */
@media (min-width: 1000px) {
	#page {
		display: flex;
		height: 100vh;
	}
	
	#header {
		padding: 0 0;
	}
	
	/* Lewa strona - rysunek */
	#main-pic {
		display: block;
		flex: 1;
		min-width: 0;
		position: relative;
	}
	
	.main-pic {
		padding: 16px 20px 60px 20px;
		width: 100%;
		height: 100%;
	}
	
	#main-svg {
		display: flex;
		width: 100%;
		max-width: 900px;
		height: 100%;
		margin: auto;
		justify-content: center;
		align-items: center;
		padding: 10px;
	}
	
	#form-svg-box {
		display: none;
	}
	
	#main-svg-option-box {
		display: block;
		position: absolute;
		bottom: 35px;
		left: 20px;
		right: 20px;
	}

	/* main-content - desktop */
	#main-content {
		width: var(--content-width);
		flex-shrink: 0;
		height: 100vh;
		overflow-y: auto;
	}

	.main-content {
	}

	.menu {
		width: calc(100% - 20px - 10px);
	}

	.form-error-svg {
		padding: 0;
	}

	#form-svg input[type=button] {
		width: 100%;
		margin: 20px 0 60px 0;
	}


}


@media (min-width: 1400px) {
	:root {
		--content-width: 600px;
	}
}

/* === PRINT STYLES === */
@media print {
	* {
		box-shadow: none;
	}

	tr {
		page-break-inside: avoid;
	}

	h1, h2, h3, h4, h5, h6, p, p * {
		color: black;
		background: none;
		text-shadow: none;
	}
}
