/**
 * Datei: image-upload.css
 * Modul: Listings
 * Autor: MARKS MEDIA
 *
 * Zweck:
 *   Galerie-Layout ohne Dragging, mit Stern und Kreuz.
 */

/* ============================================================
   Dropzone
============================================================ */
#mp-gallery-dropzone {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	border: 2px dashed var(--color-6);
	border-radius: 8px;
	padding: 25px 20px;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.25s, background 0.25s;
}

#mp-gallery-dropzone:hover {
	border-color: var(--color-5);
}

#mp-gallery-dropzone.dragover {
	border-color: var(--color-3);
}

#mp-gallery-dropzone i {
	font-size: 42px;
}

#mp-gallery-dropzone p {
	margin: 0;
	font-size: 15px;
	text-align: center;
}

/* Zentrierter Upload-Text */
#mp-gallery-dropzone .mp-upload-text {
	text-align: center;
}

#mp-gallery-input[type="file"] {
	appearance: auto;
	-webkit-appearance: auto;
	display: inline-block;
	width: auto;
	padding: initial;
	border: initial;
	background: initial;
	color: inherit;
	font: inherit;
}

/* ============================================================
   Galerie
============================================================ */
.mp-gallery-basic {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 15px;
}

.mp-gallery-item {
	position: relative;
	width: calc(20% - 10px);
	max-width: 200px;
	border: 1px solid var(--color-6);
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.mp-gallery-item img {
	width: 200px;
	height: 150px;
	object-fit: cover;
	display: block;
}

/* ============================================================
   Stern (Titelbild)
============================================================ */
.mp-gallery-star {
	position: absolute;
	top: 6px;
	left: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 1px solid var(--color-3);
	cursor: pointer;
	transition: all 0.2s ease;
}

.mp-gallery-star i {
	opacity: 0.5;
}

.mp-gallery-star.active i {
	opacity: 1;
}

.mp-gallery-star:hover {
	background: var(--color-3);
	color: var(--color-8);
}

/* ============================================================
   Kreuz (Löschen)
============================================================ */
.mp-gallery-remove {
	position: absolute;
	top: 6px;
	right: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 1px solid var(--color-2);
	cursor: pointer;
	transition: all 0.2s ease;
}

.mp-gallery-remove:hover {
	background: var(--color-2);
	color: var(--color-8);
}

/* ============================================================
   Responsive
============================================================ */
@media (max-width: 768px) {
	.mp-gallery-item {
		width: calc(33.333% - 10px);
	}
}

@media (max-width: 480px) {
	.mp-gallery-item {
		width: calc(50% - 10px);
	}
}
