/*******************************************************************/
/********************* T E R M I N E  ******************************/
/*******************************************************************/       

 :root {
            --bg-body: #f0f2f5;
            --bg-panel: #ffffff;
            --primary: #2c3e50;
            --accent: #3498db;
            --text-main: #333;
            --text-light: #777;
            --border: #ddd;
        }
/*
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            background: var(--bg-body);
            margin: 0;
            padding: 20px;
            display: flex;
            justify-content: center;
        }
*/
/* Die "Wappen Box" - Flex Container */

.wrapper-box {
    display: flex;
    flex-direction: row; /* Sicherstellen: Nebeneinander */
    gap: 20px;
    
    /* HÖHEN-ANPASSUNG */
    height: calc(64vh - 4px); /* Exakt die Höhe des Informationsteils minus 4px Abstand */
    max-height: calc(70vh - 4px); /* Verhindert Wachstum über diese Grenze */
    
    /* Entfernen Sie hier die alte max-width: 1900px oder passen Sie sie an, 
       falls die Box nicht breiter als der Container werden soll */
    max-width: 100%; 
    width: 100%;
    
    margin-left: 10px;
    margin-top: 4px; /* Der gewünschte Abstand nach oben zum Rand des Informationsteils */
    
    background-color: white;
    padding: 25px;
    border-radius: 1px;
    box-shadow: 5px 5px 10px #0c32a5;
    box-sizing: border-box; /* Wichtig: Padding wird in die calc()-Höhe eingerechnet */
    overflow: hidden; /* Schneidet Inhalte ab, die trotzdem zu groß wären */
}

/* Linke Seite: Kalender */
.calendar-section {
    flex: 2;
    min-width: 300px;
    /* WICHTIG: Hier muss display: flex stehen, damit die Kinder (Grid) die Höhe füllen können */
    display: flex; 
    flex-direction: column; 
    height: 100%; /* Nimmt die volle Höhe des Wrappers ein */
    min-height: 0; /* Verhindert, dass Flex-Kinder den Container aufsprengen */
}


/* Rechte Seite: Details */
.details-section {
    flex: 1;
    min-width: 280px;
    max-width: 450px;
    /* height: 100%; Optional, damit sie so hoch wie der Kalender wird */
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    /* Kein flex-wrap hier, damit sie immer ein Block bleibt */
}
.controls, .weekdays {
    flex-shrink: 0; /* Verhindert, dass diese Elemente gequetscht werden */
}
.details-section h3{
	margin: 0 0 10px 0;
	color: black;
	font-size: 18px;
}


/* Steuerung: ComboBox und Jahr */
.controls {
	display: flex;
	gap: 10px;
	margin-bottom: 20px;
	align-items: center;
	flex-wrap: wrap;
}

select, input[type="number"] {
	padding: 8px 12px;
	border: 1px solid var(--border);
	border-radius: 4px;
	font-size: 1.1rem;
	font-weight: bolder;
	background: #fff;
}

button.btn-apply {
	padding: 8px 16px;
	background: var(--accent);
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 1rem;
}
button.btn-apply:hover { background: #2980b9; }

/* Kalender Grid */
.weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	text-align: center;
	font-weight: bold;
	color: black;
	margin-bottom: 10px;
	font-size: 0.9rem;
	background-color:#acdeff;
	
}


.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    flex: 1; /* Füllt den RESTLICHEN Platz im calendar-section Container */
    min-height: 0; /* Kritisch: Erlaubt dem Grid kleiner zu werden als sein Inhalt (scrolling) */
    overflow: hidden; /* oder auto, wenn das Grid selbst scrollen soll */
}



/* Die Tage (td) */
.day-cell {
    min-height: 0; /* Wichtig für Grid-Items in scrollbaren Containern */
    max-height: 120px;
    width: 100%;
    border: 1px solid var(--border);
    padding: 2px;
    background: #fff;
    overflow: auto; /* Scrollbalken IN der Zelle bei zu viel Inhalt */
    box-sizing: border-box;
}


.day-cell:hover {
	border-color: var(--accent);
	background: #f0f8ff;
	transform: translateY(-2px);
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.day-cell.selected {
	border: 2px solid var(--accent);
	background: #e3f2fd;
}

.day-number {
	font-weight: bold;
	font-size: 0.95rem;
	margin-bottom: 5px;
	text-align: right;
	padding-right: 2px;
	color: var(--primary);
}

/* Event Indikatoren in der Zelle */
.mini-event {
	font-size: 0.7rem;
	background: var(--accent);
	color: white;
	padding: 2px 4px;
	border-radius: 3px;
	margin-bottom: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.more-count {
	font-size: 0.75rem;
	color: var(--text-light);
	text-align: center;
	margin-top: auto;
	font-weight: bold;
}

.day-cell.empty {
	background: transparent;
	border: none;
	cursor: default;
	min-height: 0;
}
.day-cell.empty:hover { transform: none; box-shadow: none; }

/* Details Bereich */
.details-header {
	margin-top: 0;
	color: var(--primary);
	border-bottom: 2px solid var(--accent);
	padding-bottom: 10px;
	margin-bottom: 15px;
}

.event-card {
	background: #fff;
	border-left: 4px solid var(--accent);
	padding: 10px;
	margin-bottom: 10px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	border-radius: 4px;
}
.event-card h4 { margin: 0 0 5px 0; color: var(--primary); font-size: 1rem; }
.event-card p { margin: 0; font-size: 0.9rem; color: #555; line-height: 1.4; }
.no-data { color: var(--text-light); font-style: italic; }

