body {
	margin: 0;
	font-family: system-ui, -apple-system, sans-serif;
	background: #f2f2f2;
	color: #111;
}


/* HEADER */
.header {
	padding: 20px;
	border-bottom: 1px solid #e5e5e5;
}

.header h1 {
	margin: 0;
	font-size: 26px;
}

.header p {
	margin: 6px 0 0;
	color: #666;
}


.toolbar button {
	padding: 8px 16px;
	border: 1px solid #ccc;
	background: #fff;
	border-radius: 6px;
	cursor: pointer;
	font-weight: 600;
}

.toolbar button:hover {
	background: #eee;
}


.app {
	display: flex;
	flex-direction: column;
	height: 100dvh; 
	background: #fff;
}

.legend {
	padding: 10px 14px;
	display: flex;
	gap: 14px;
	border-bottom: 1px solid #eee;
}

.toolbar {
	display: flex;
	gap: 8px;
	padding: 10px 14px;
	border-bottom: 1px solid #eee;
}

.viewer {
	flex: 1;                
	min-height: 0;          
	position: relative;
	background: #f7f7f7;
}

#svg-wrapper {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

#svg-wrapper svg {
	width: 100% !important;
	height: 100% !important;
	display: block;
}

#svg-wrapper svg {
    touch-action: none; 
    user-select: none;
    -webkit-user-drag: none;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

/* ŽIDLE */
#svg-wrapper svg g[data-key] {
	cursor: pointer;
}

.selected path,
.selected rect,
.selected circle {
	fill: #2ecc71 !important;
	stroke: #1e8449 !important;
	stroke-width: 1.5px;
}

#svg-wrapper svg g[data-key]:not(.selected):hover path {
	fill: #ffcccc !important;
}

/* DEBUG */
.debug {
	padding: 12px 20px;
	border-top: 1px solid #e5e5e5;
	background: #fafafa;
	font-weight: 500;
}


/* BOTTOM BAR */
.bottom-bar {
	position: sticky;
	bottom: 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px 20px;
	background: #ffffff;
	border-top: 1px solid #e5e5e5;
	box-shadow: 0 -6px 20px rgba(0,0,0,.08);
	opacity: 0;
	transform: translateY(100%);
	transition: all .25s ease;
	pointer-events: none;
	z-index: 10;
}

.bottom-bar.visible {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.bottom-bar__info {
	font-weight: 600;
	color: #333;
}

.bottom-bar__btn {
	padding: 10px 22px;
	border-radius: 10px;
	border: none;
	background: #2ecc71;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: background .2s ease, opacity .2s ease;
}

.bottom-bar__btn:hover {
	background: #27ae60;
}

.bottom-bar__btn:disabled {
	opacity: .4;
	cursor: not-allowed;
}

#svg-wrapper g.occupied path,
#svg-wrapper g.occupied rect,
#svg-wrapper g.occupied circle,
#svg-wrapper g.occupied polygon,
#svg-wrapper g.occupied ellipse {
	fill: #d32f2f !important;
	stroke: #b71c1c !important;
	stroke-width: 1.5px;
}


.legend-item {
	display: flex;
	align-items: center;
	gap: 6px;
}

.legend-dot {
	width: 14px;
	height: 14px;
	border-radius: 4px;
	display: inline-block;
	border: 1px solid #bbb;
}

.legend-dot.free {
	background: #fff;
}

.legend-dot.selected {
	background: #2ecc71;
	border-color: #1e8449;
}

.legend-dot.occupied {
	background: #d32f2f;
	border-color: #b71c1c;
}
.seat-tooltip {
	position: fixed;
	z-index: 9999;
	padding: 6px 10px;
	background: rgba(30, 30, 30, 0.95);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	border-radius: 6px;
	white-space: nowrap;
	pointer-events: none;
	box-shadow: 0 6px 18px rgba(0,0,0,.25);
	transform: translate(-50%, -120%);
	opacity: 0;
	transition: opacity .15s ease, transform .15s ease;
}

.seat-tooltip.visible {
	opacity: 1;
	transform: translate(-50%, -140%);
}

/* malá šipka */
.seat-tooltip::after {
	content: '';
	position: absolute;
	left: 50%;
	bottom: -6px;
	transform: translateX(-50%);
	border-width: 6px 6px 0 6px;
	border-style: solid;
	border-color: rgba(30, 30, 30, 0.95) transparent transparent transparent;
}

.confirm-card {
	max-width: 560px;
	margin: 40px auto;
	background: #ffffff;
	border-radius: 14px;
	box-shadow: 0 12px 30px rgba(0,0,0,.12);
	padding: 30px 34px 36px;
}

.confirm-card h1 {
	margin: 0 0 26px;
	font-size: 26px;
	font-weight: 800;
	text-align: center;
}

/* === SECTIONS === */

.confirm-section {
	margin-bottom: 30px;
}

.confirm-section h3 {
	margin: 0 0 12px;
	font-size: 15px;
	font-weight: 700;
	color: #444;
}

/* === SEATS TABLE === */

.seats-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	background: #fafafa;
	border-radius: 10px;
	overflow: hidden;
}

.seats-table th {
	text-align: left;
	padding: 12px 14px;
	background: #f0f0f0;
	border-bottom: 1px solid #ddd;
	font-weight: 700;
	color: #333;
}

.seats-table td {
	padding: 12px 14px;
	border-bottom: 1px solid #e5e5e5;
	font-weight: 600;
}

.seats-table tr:last-child td {
	border-bottom: none;
}

/* === FORM CONTAINER === */

.form-container {
	max-width: 420px;
	margin: 0 auto;
}

/* === FORM === */

.confirm-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.form-row {
	display: grid;
	grid-template-columns: 160px 1fr;
	align-items: center;
	gap: 14px;
}

.form-row label {
	font-size: 13px;
	font-weight: 700;
	color: #333;
}

.form-row input {
	padding: 11px 12px;
	border-radius: 10px;
	border: 1px solid #ccc;
	font-size: 14px;
	background: #fafafa;
	transition: border .15s, box-shadow .15s, background .15s;
}

.form-row input:focus {
	outline: none;
	border-color: #2ecc71;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.15);
}


.confirm-btn {
	margin-top: 24px;
	padding: 14px;
	border-radius: 12px;
	border: none;
	background: #2ecc71;
	color: #fff;
	font-size: 16px;
	font-weight: 800;
	letter-spacing: .2px;
	cursor: pointer;
	transition: transform .15s, box-shadow .15s;
}



@media (max-width: 520px) {
	.confirm-card {
		margin: 20px;
		padding: 24px;
	}

	.form-row {
		grid-template-columns: 1fr;
		gap: 6px;
	}
}


.header {
	background: #ffffff;
	border-bottom: 1px solid #e5e5e5;
	padding: 12px 20px;
}

.header-inner {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 16px;
}

.header-logo {
	height: 56px;
	width: auto;
	object-fit: contain;
}

.header-text h1 {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	color: #111;
}

.header-text p {
	margin: 2px 0 0;
	font-size: 14px;
	color: #666;
}
.flash {
	max-width: 1200px;
	margin: 16px auto;
	padding: 14px 18px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}

/* SUCCESS */
.flash.success {
	background: #eafaf1;
	color: #1e7f4f;
	border: 1px solid #bfe9d3;
}


.flash.info {
	background: #eef4ff;
	color: #1f4fd8;
	border: 1px solid #c7d7ff;
}

.flash.warning {
	background: #fff6e5;
	color: #9a6a00;
	border: 1px solid #ffe1a8;
}

.flash.error {
	background: #fdecea;
	color: #b3261e;
	border: 1px solid #f5c2bd;
}


.spinner-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.7);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.spinner-overlay.show {
	opacity: 1;
	visibility: visible;
}

.spinner-wrapper {
	text-align: center;
}

.spinner {
	width: 60px;
	height: 60px;
	border: 6px solid rgba(255, 255, 255, 0.2);
	border-top-color: #fff;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}