/**
 * Datei: listings.css
 * Modul: Listings (allgemein)
 * Autor: MARKS MEDIA
 *
 * Zweck:
 *   Grundlegendes Layout und Styling für das Listings-Modul
 *   (z. B. Formulare, Karten, Standortauswahl, Galerie etc.).
 */

/* ============================================================
   1. Allgemeine Elemente
============================================================ */
#mp-listing-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

#mp-listing-form .mp-white-block {
	border-radius: 6px;
	padding: 20px;
}

/* Labels und Inputs */
#mp-listing-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 5px;
}

#mp-listing-form input[type="text"],
#mp-listing-form input[type="number"],
#mp-listing-form textarea,
#mp-listing-form select {
	width: 100%;
	padding: 8px 4px;
	font-size: 15px;
	box-sizing: border-box;
	border: none;
	border-bottom: 2px solid var(--color-6);
	border-radius: 0;
	background: transparent;
	outline: none;
	transition: border-color 0.2s ease;
}

#mp-listing-form input[type="text"]:focus,
#mp-listing-form input[type="number"]:focus,
#mp-listing-form textarea:focus,
#mp-listing-form select:focus {
	border-bottom-color: var(--color-1);
}

#mp-listing-form textarea {
	min-height: 120px;
	resize: vertical;
}
/* Checkbox + Text sauber nebeneinander */
.mp-listing-form .mp-white-block label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mp-listing-form .mp-white-block label input[type="checkbox"] {
    margin: 0;
}

/* ============================================================
   2. Galerie & Bilder
============================================================ */
.mp-gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.mp-gallery-item {
	position: relative;
	width: 112px;		/* 120px; */
	height: 85px;		/* 90px; */
	border: 1px solid var(--color-6);
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	cursor: grab;
}

.mp-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mp-gallery-item .mp-gallery-remove {
	position: absolute;
	top: 4px;
	right: 4px;
	font-size: 13px;
	width: 20px;
	height: 20px;
	line-height: 20px;
	text-align: center;
	border-radius: 50%;
	cursor: pointer;
}

/* ============================================================
   3. Standort-Auswahl
============================================================ */
.mp-locations-select {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.mp-locations-select label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.mp-locations-select input[type="checkbox"] {
	width: auto;
	height: auto;
	transform: scale(1.1);
	accent-color: var(--color-1);
	cursor: pointer;
}

/* ============================================================
   4. Form-Sektionen
============================================================ */
.mp-section-title {
	font-size: 17px;
	font-weight: 600;
	margin-bottom: 10px;
}

.mp-field {
	margin-bottom: 15px;
}

/* ============================================================
   5. Responsiv
============================================================ */
@media (max-width: 768px) {
	#mp-listing-form {
		gap: 15px;
	}

	.mp-gallery-item {
		width: 100px;
		height: 80px;
	}
}

/* ============================================================
   6. Karten & Google Maps
============================================================ */
.mp-map-container {
	position: relative;
	width: 100%;
	height: 300px;
	border: 1px solid var(--color-6);
	border-radius: 6px;
	overflow: hidden;
}

#mp-map {
	width: 100%;
	height: 100%;
}

/* ============================================================
   7. Preistabelle (Layout ohne JS)
============================================================ */
#mp-price-table {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.mp-price-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.mp-price-cell input {
	width: 100%;
	padding: 6px 4px;
	font-size: 14px;
	border: none;
	border-bottom: 2px solid var(--color-6);
	border-radius: 0;
	background: transparent;
	outline: none;
	transition: border-color 0.2s ease;
}

.mp-price-cell input:focus {
	border-bottom-color: var(--color-1);
}

/* ============================================================
   8. Hinweisfelder
============================================================ */
.mp-hint {
	font-size: 13px;
	margin-top: 4px;
}

/* ============================================================
   9. Rechte Spalte – Vermieterbox im Single Listing
============================================================ */

/* Nur Logo-Container zentrieren */
.mp-seller-box { text-align: left; }

.mp-seller-logo {
	display: block;
	margin: 0 auto 10px auto;
	width: 130px;
	height: 130px;
	border-radius: 6px;
	overflow: hidden;
	text-align: center;
}

.mp-seller-logo-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mp-seller-logo-placeholder {
	width: 100%;
	height: 100%;
}

/* ============================================================
   Artikelseite Schriftgrößen
============================================================ */
.single-listing h1 {
	font-size: var(--font-single-title, 30px);
	line-height: 1.2;
	margin-bottom: 12px;
}

.single-listing .mp-white-block-title {
	font-size: var(--font-single-headings, 20px);
	line-height: 1.3;
}

/* ============================================================
   Artikelseite: Untertitel (unter dem Haupttitel)
============================================================ */
.single-listing .untertitel {
	font-size: calc(var(--font-single-title) * 0.6);
	font-weight: 400;
	margin-top: 4px;
	margin-bottom: 14px;
	line-height: 1.4;
}

/* ============================================================
   Artikelseite: Kategorienhierarchie (Breadcrumb)
============================================================ */
.single-listing .listing-category-chain {
	font-size: calc(var(--font-single-headings) * 0.9);
	margin-bottom: 0;
}

.single-listing .listing-category-chain a:hover {
	text-decoration: underline;
}
/* ============================================================
   10. Öffnungszeiten in der Vermieterbox
============================================================ */
.mp-opening-hours {
	margin-top: 10px;
}

.mp-opening-line {
	display: flex;
	justify-content: space-between;
	font-size: 14px;
	color: var(--color-4);
	border-bottom: 1px solid var(--color-6);
	padding: 4px 0;
}

.mp-opening-day {
	font-weight: 500;
}

.mp-opening-time {
	color: var(--color-5);
}

/* ============================================================
   11. Telefon / Pills
============================================================ */

.mp-phone-wrapper {
	margin: 0px;
}

.mp-phone-hint {
	font-size: 12px;
	color: #666;
	margin-bottom: 0px;
}

/* Telefonpills – volle Breite, normale Schrift */
.mp-phone-link,
.mp-seller-pills .mp-pill {
	display: block;
	width: 100%;
	text-align: left;
	font-weight: normal;
	box-sizing: border-box;
	margin-bottom: 5px;
}

.mp-phone-link:hover {
	color: #004466;
}

.mp-phone-link[aria-pressed="true"] {
	color: #003d4d;
}
#mp-location-button.mp-pill {
	display: inline-block;
	width: 100%;
	text-align: left;
}
/* ============================================================
   Fix: Standort-Dropdown-Button im Pill-Style (neutral)
============================================================ */
#mp-location-button.mp-pill {
	background: var(--pill-bg);
	color: var(--pill-color);
	border: 1px solid var(--pill-border);
}

#mp-location-button.mp-pill:hover {
	background: #eee;
	color: var(--pill-color);
	border-color: var(--pill-border);
}
