/* ==========================================================================
   Materialpool – gemeinsame Styles für Frontend und Admin
   ========================================================================== */

.mp-frontend {
	max-width: 1100px;
	margin: 0 auto;
}

.mp-toolbar {
	display: flex;
	gap: 12px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.mp-input {
	padding: 8px 10px;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
	font-size: 14px;
}

#mp-search {
	flex: 1;
	min-width: 200px;
}

.mp-section {
	margin-bottom: 28px;
}

.mp-section-title {
	font-size: 16px;
	margin: 0 0 12px;
	padding-bottom: 6px;
	border-bottom: 2px solid #e2e4e7;
}

.mp-no-results {
	color: #555;
	font-size: 13px;
}

.mp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 20px;
}

.mp-grid:empty {
	display: none;
}

.mp-card {
	border: 1px solid #e2e4e7;
	border-radius: 8px;
	padding: 16px;
	background: #fff;
	display: flex;
	flex-direction: column;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.mp-card-image img {
	width: 100%;
	height: 160px;
	object-fit: cover;
	border-radius: 6px;
	margin-bottom: 10px;
}

.mp-card-title {
	margin: 0 0 4px;
	font-size: 18px;
}

.mp-card-cat {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #6b7280;
	margin-bottom: 8px;
}

.mp-card-bestand {
	font-weight: 600;
	margin-bottom: 4px;
}

.mp-card-standort {
	font-size: 13px;
	color: #555;
	margin-bottom: 8px;
}

.mp-card-desc {
	font-size: 13px;
	color: #444;
	flex: 1;
	margin-bottom: 12px;
}

.mp-reserve-btn {
	align-self: flex-start;
}

/* Modal */
.mp-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100000;
}

.mp-modal.mp-modal-open {
	display: block;
}

.mp-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.mp-modal-content {
	position: relative;
	background: #fff;
	max-width: 780px;
	margin: 5vh auto;
	max-height: 90vh;
	overflow-y: auto;
	border-radius: 8px;
	padding: 28px;
	z-index: 1;
}

.mp-modal-close {
	position: absolute;
	top: 12px;
	right: 16px;
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: #555;
}

.mp-modal-bestand {
	color: #555;
	margin-top: -6px;
}

.mp-modal-body {
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	gap: 24px;
	margin-top: 12px;
}

@media (max-width: 700px) {
	.mp-modal-body {
		grid-template-columns: 1fr;
	}
}

.mp-modal-hint {
	font-size: 13px;
	color: #555;
	margin-bottom: 8px;
}

.mp-modal-form-col label {
	display: block;
	font-weight: 600;
	margin-top: 12px;
	margin-bottom: 4px;
	font-size: 13px;
}

.mp-modal-form-col input,
.mp-modal-form-col textarea {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
	font-size: 14px;
	box-sizing: border-box;
}

.mp-modal-form-col button[type="submit"] {
	margin-top: 16px;
}

.mp-form-message {
	margin-top: 10px;
	font-size: 13px;
	min-height: 18px;
}

.mp-message-error {
	color: #c62828;
}

.mp-message-success {
	color: #2e7d32;
}

.mp-message-info {
	color: #555;
}

.mp-legend {
	margin-top: 10px;
	font-size: 13px;
	color: #444;
}

.mp-dot {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	margin-right: 4px;
	margin-left: 10px;
}

.mp-dot:first-child {
	margin-left: 0;
}

body.mp-modal-active {
	overflow: hidden;
}

/* Admin */
.mp-wrap .mp-filter-form {
	margin: 16px 0;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.mp-table td,
.mp-table th {
	padding: 10px 12px;
	vertical-align: middle;
}

.mp-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
	color: #fff;
}

.mp-badge-angefragt {
	background: #f9a825;
}

.mp-badge-bestaetigt {
	background: #2e7d32;
}

.mp-badge-abgelehnt {
	background: #9e9e9e;
}

.mp-actions {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

#mp-admin-calendar,
#mp-frontend-calendar {
	background: #fff;
	padding: 8px;
	border: 1px solid #e2e4e7;
	border-radius: 6px;
}

.mp-event-details {
	margin-top: 20px;
	max-width: 420px;
	padding: 16px;
	border: 1px solid #e2e4e7;
	border-radius: 6px;
	background: #fff;
}
