/* ===== CSS VARIABLES ===== */
:root {
	--color-text: #000000;
	--color-text-light: #666666;
	--color-text-muted: #999999;
	--color-bg: #DADCDE;
	--color-white: #FFFFFF;

	--color-primary: #36BA98;
	--color-secondary: #E9C46A;
	--color-danger: #E76F51;
	--color-accent: #F84F93;

	--spacing-xs: 4px;
	--spacing-sm: 8px;
	--spacing-md: 10px;
	--spacing-lg: 20px;
	--spacing-xl: 30px;
	--spacing-xxl: 40px;

	--font-family: 'Montserrat', sans-serif;
	--font-size-xs: 9px;
	--font-size-sm: 10px;
	--font-size-md: 12px;
	--font-size-lg: 14px;
	--font-size-xl: 18px;

	--border-radius: 6px;
	--shadow-light: 0 2px 4px rgba(0,0,0,0.1);
	--shadow-medium: 0 12px 16px rgba(0,0,0,0.3);
}

* { box-sizing: border-box; font-family: var(--font-family); }

body { background: var(--color-bg); margin: 0; padding: 0; }

/* Header */
header {
	position: relative;
	top: 0;
	padding: 20px;
	margin: auto;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 8px;
	font-weight: 800;
	letter-spacing: 1px;
	text-transform: uppercase;
}
header i { font-size: 12px; }
.logout { font-size: 20px; }
header h1 {
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 4px;
	text-transform: uppercase;
	margin: auto;
}

/* Layout */
.card { padding: 0; }

.white-box {
	background: var(--color-white);
	margin: 0 20px 20px 20px;
	box-shadow: 0 10px 12px rgba(0,0,0,0.2);
}
.grey-box { background: var(--color-bg); padding: 0 20px; }

.grid { display: grid; gap: var(--spacing-md); }
.inner-grid { 
	display: grid; 
	padding-top: 20px;
}

/* Typo */
h1 {
	font-size: 20px;
	font-weight: 800;
	letter-spacing: 2px;
	text-transform: uppercase;
	margin: 0 auto 20px auto;
}
h2 {
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 2px;
	text-transform: uppercase;
	margin: auto;
}
h3 {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0;
	margin: auto;
	display: block;
}
.mono {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	letter-spacing: 0;
}

.date {
	font-size: 9px;
	letter-spacing: 0;
}

.add_item {
	margin: 0 20px 20px 20px;
	text-align: center;
}

.add_item .btn{
	font-size: 16px;
	letter-spacing: 0;
	text-transform: none;
	padding: 8px 16px;
	font-weight: 900;
	background: #36BA98;
	border-radius: 10px;
}

.muted { opacity: 0.4; }

/* Chips / Badges */
.highlight {
	font-size: 8px;
	font-weight: 800;
	letter-spacing: 0;
	text-transform: uppercase;
	margin-top: 4px;
	line-height: 1em;
	background: #333333;
	border-radius: 2px;
	color: #FFFFFF;
	padding: 3px 5px;
	display: inline;
}
.details {
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	margin-top: 8px;
	line-height: 1em;
}
.erstellt {
	font-size: 9px;
	font-weight: 800;
	letter-spacing: 1px;
	text-transform: uppercase;
	margin: -30px auto 20px auto;
	color: #666666;
}

/* List-Karten */
.list-box {
	background: var(--color-white);
	width: 100%;
	margin: 0;
	padding: 0;
	display: flex;
	box-shadow: 0 12px 16px rgba(0,0,0,0.2);
}
.history .list-box { cursor: pointer; }

.list-box .chev {
	display: inline-block;
	transition: transform .2s ease;
	margin: 6px auto 0 auto;
	font-size: 12px;
}
.list-box[aria-expanded="true"] .chev { transform: rotate(90deg); }

.list-box[tabindex="0"]:focus {
	outline: 2px solid rgba(0,0,0,.15);
	outline-offset: 2px;
}

.number {
	font-size: 20px;
	font-weight: 800;
	letter-spacing: 0;
	text-transform: uppercase;
	margin: 0;
	padding: 16px;
	text-align: center;
	line-height: 1em;
	background: linear-gradient(110deg, rgba(221,255,186,1) 0%, rgba(179,250,252,1) 100%);
	color: #000000;
	display: grid;
	place-items: center;
}

.number i { font-size: 20px; }

.stueck { font-size: 8px; font-weight: 600; text-transform: uppercase; line-height: 1.1em; }

.note { color: #000; font-size: 8px; }

/* Sub-Bookings (Collapsible, animiert per CSS) */
.list_sub{
	/* ZU (collapsed) */
	max-height: 0;
	overflow: hidden;
	padding: 0 20px;            /* keine vertikalen Paddings im ZU-Zustand */
	margin: 0 10px 20px 30px;      /* kein Bottom-Margin im ZU-Zustand */
	background-image: repeating-linear-gradient(
		45deg,
		#EEEEEE 0,
		#EEEEEE 1px,
		transparent 1px,
		transparent 14px
	);
	transition:
		max-height .28s ease,
		padding-top .28s ease,
		padding-bottom .28s ease,
		margin-bottom .28s ease;
}
.list_sub.is-open{
	/* AUF (expanded) */
	max-height: 1000px;         /* großzügig bemessen – reicht für viele Buchungen */
	padding: 2px 20px;          /* vertikale Padding erst im AUF-Zustand */
	margin: 0 10px 20px 30px;   /* Abstand unten nur wenn AUF */
}

/* Add-Box (letztes Ergebnis) */
.add-box {
	background: #36BA98;
	color: #FFFFFF;
	margin: 30px 20px;
	padding: 0;
	display: flex;
	border-radius: 20px;
}

/* Add-Box sanft ausblenden */
.add-box{
	opacity: 1;
	transition: opacity .35s ease, transform .35s ease;
}

.add-box.fade-out{
	opacity: 0;
	transform: translateY(-6px);
	pointer-events: none;
}

.booked {
	font-size: 24px;
	font-weight: 800;
	margin: 0;
	padding: 16px 0 16px 20px;
	display: grid;
	text-align: center;
	place-items: center;
}
.booked i { font-size: 20px; color: #FFFFFF; }

/* Reihen / Buttons */
.row { display: flex; text-align: center; align-items: center; }
.black {
	background: #000000;
	color: #FFFFFF;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 1px;
	margin: 0;
	padding: 6px 8px;
}
.btn {
	border: none;
	padding: 6px 12px;
	font-size: 10px;
	font-weight: 754;
	letter-spacing: 1px;
	text-transform: uppercase;
	cursor: pointer;
	color: #FFFFFF;
	background: #000000;
	margin-left: 10px;
}
.btn:active { transform: translateY(1px); }

.back {
	border: solid 2px #FFFFFF;
	padding: 8px 16px;
	margin: 0 10px 20px 10px;
	font-size: 8px;
	font-weight: 800;
	letter-spacing: 1px;
	text-transform: uppercase;
	cursor: pointer;
	color: #000000;
	background: transparent;
}

.finish {
	border: solid 2px #FFFFFF;
	padding: 8px 16px;
	margin: 0 10px 20px 10px;
	font-size: 8px;
	font-weight: 800;
	letter-spacing: 1px;
	text-transform: uppercase;
	cursor: pointer;
	color: #FF549E;
	background: transparent;
}

/* Form */
label {
	font-size: 9px;
	font-weight: 800;
	letter-spacing: 1px;
	text-transform: uppercase;
	display: block;
	margin-left: 20px;
	margin-right: 10px;
	min-width: 70px;
}
input,
select {
	width: 100%;
	font-size: 12px;
	font-weight: 600;
	padding: 6px;
	border-radius: 0;
	border: 0;
	border-bottom: solid 1px #DDDDDD;
	margin: 10px 20px 10px 0;
	background: #FFFFFF;
	color: #000000;
}
input[type=number] { text-align: center; }

/* History-Liste */
.history { display: grid; }
ul.history { list-style: none; padding: 0; margin: 0; }
ul.history li { display: block; margin: 0; padding: 0; }

/* Tools */
.tools .edit {
	padding: 10px;
	background: #EEEEEE;
	color: #000000;
	font-size: 16px;
	text-align: center;
	border-bottom: 1px solid #FFFFFF;
}
.tools .delete {
	padding: 10px;
	background: #EEEEEE;
	color: #FF549E;
	font-size: 16px;
	text-align: center;
	border-top: 1px solid #FFFFFF;
}

/* Statusfarben für highlight-Badge */
.highlight.status-aktiv {
	background: #e6ffe8;
	color: #36BA98;
	border: 1px solid #36BA98;
}
.highlight.status-unknown {
	background: #eef2f7;
	color: #3b4b5a;
	border: 1px solid #cfd8e3;
}
.highlight.status-pausiert {
	background: #fff8e5;
	color: #8a5a00;
	border: 1px solid #ffe2a6;
}
.highlight.status-archiviert {
	background: #f4f4f5;
	color: #6b7280;
	border: 1px solid #e5e7eb;
}
.highlight.status-abgeschlossen {
	background: #fef2f2;
	color: #FF549E;
	border: 1px solid #FF549E;
}

/* nicht-aktive Erfassungen in der Liste visuell deaktivieren */
.erfassung-item.is-disabled { opacity: 1; cursor: not-allowed; }
.erfassung-item.is-disabled .list-box { pointer-events: none; }

/* Overlay fürs Schloss bei abgeschlossenen Erfassungen */
.erfassung-item {
	position: relative;
}

.erfassung-item .lock-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.55); /* halbtransparent */
	border-radius: 16px; /* an dein Card-Design anpassen */
	pointer-events: none; /* klicks gehen an das darunterliegende Element */
}

.erfassung-item .lock-overlay i {
	font-size: 36px; /* Größe des Schloss-Icons */
	opacity: 0.4;
}

/* ===== Modal (untere Hälfte, 50% Höhe) ===== */

.modal {
	position: fixed;
	inset: 0;
	display: none;
	z-index: 9999
}
		
.modal.is-open { 
	display: block
}

.modal__backdrop {
	position: absolute;
	inset:0;
	background:rgba(54, 186, 152, 0.2);
	backdrop-filter:blur(2px)
}
		
.modal__panel {
	position:absolute;
	left: 0;
	right: 0; 
	bottom: 0;
	top: auto;
	height: auto;
	background: #fff;
	border-top-left-radius: 30px;
	border-top-right-radius: 30px;
	box-shadow: 0 -8px 30px rgba(0,0,0,.25);
	display: flex;
	flex-direction: column;
	transform:translateY(100%);
	animation:modal-slide-up .22s ease-out forwards
}
		
@keyframes modal-slide-up {
from{transform:translateY(100%)}to{transform:translateY(0%)}
}
@keyframes modal-slide-down {
from{transform:translateY(0%)}to{transform:translateY(100%)}
}

.pin-grid .btn {
	height: 50px;
	width: 50px;
	padding: auto;
	border-radius: 30px;
	color: #000000;
	background: #FFFFFF;
	border: solid 1px #CCCCCC;
	font-size: 20px;
	font-weight: 700;
}

.pin-grid .btn i{
	font-size: 14px;
}

.modal__footer {
	padding: 12px;
	display: flex;
}

.modal__footer .btn {
	width: 100%;
	padding: 10px;
	border-radius: 8px;
}

.modal__header {
	display: flex;
	padding-top: 20px;
}

.modal__header h2 { 
	font-size: 24px;
	letter-spacing: 0;
	font-weight: 800;
	text-transform: none;
}
		
.modal__content { 
	padding: 0 20px;
}

.modal .row {
	display: flex;
	align-items: center;
}
		
.modal label {
	font-weight: 800;
	text-align: left;
	padding: 0;
	margin: 0;
}

.modal .qty-tools {
	display: flex;
	align-items: center;
}

@media (max-height:640px) {
	.modal__panel{height:auto}
}
		
.is-disabled {
		opacity: .5;
		pointer-events: none }
		
.lock-overlay {
	position: absolute; 
	inset: 0; 
	display: grid;
	place-items: center;
	background: rgba(255,255,255,.6);
	border-radius: 12px;
}
		
.lock-overlay i {
	font-size: 2rem;
	color:#444;
}

