/* Melli4Dogs Hundefotos, Mein-Konto-Seite, Version 0.2.0
   Farben laut Markenvorgaben: Schwarz #1C1C1C, Gelb #FFB800, Weiß als Hintergrund.
   Schrift: Outfit für Buttons (lokal geladen, DSGVO).
   Variante 1: Buch (zwei Fotos) links, Papierriss rechts. Variante 2: zwei große Rechtecke. */

.m4d-profil {
	--m4d-schwarz: #1C1C1C;
	--m4d-gelb: #FFB800;
	--m4d-leer: #F3F3F3;
	background: #fff;
	margin: 0 0 2rem;
	/* Aus der schmalen Seitenspalte nach links und rechts ausbrechen, damit die Fotos groß werden und nah am Profil sitzen. */
	position: relative;
	left: 50%;
	transform: translateX(-50%);
	width: min(var(--m4d-breite, 1540px), calc(100vw - 32px));
}
/* Maße aus Mellis Vorlagen (Canva, Seite 4 und Seite 3): Spaltenbreiten im Verhältnis. */
.m4d-profil--v1 { --m4d-breite: 1540px; transform: translateX(-53%); }
.m4d-profil--v2 { --m4d-breite: 1392px; }

.m4d-raster {
	display: grid;
	align-items: center;
	column-gap: 0;
}
.m4d-profil--v1 .m4d-raster { grid-template-columns: 581fr 472fr 487fr; }
.m4d-profil--v2 .m4d-raster { grid-template-columns: 461fr 471fr 460fr; }

.m4d-mitte { min-width: 0; padding: 0 16px; }
.m4d-spalte { min-width: 0; text-align: center; }
.m4d-form { display: none; }

/* ---------- Fotofläche (klickbar) ---------- */

.m4d-flaeche {
	position: relative;
	display: block;
	cursor: pointer;
}
.m4d-flaeche__bild {
	position: absolute;
	inset: 0;
	background-color: var(--m4d-leer);
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
}
.m4d-foto__datei {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

/* ---------- Variante 1: Buch ---------- */

.m4d-buch {
	position: relative;
	aspect-ratio: 608 / 422;
}
/* Seitenflächen im Buch-PNG (608 x 422): links x 23 bis 300, rechts x 305 bis 582, oben bis y 403. */
.m4d-buch__seite {
	position: absolute;
	top: 0;
	width: 45.6%;
	height: 95.5%;
}
.m4d-buch__seite--l { left: 3.78%; }
.m4d-buch__seite--r { left: 50.16%; }
.m4d-buch__rahmen {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image: var(--m4d-rahmen-buch);
	background-size: 100% 100%;
	background-repeat: no-repeat;
}

/* ---------- Variante 1: Papierriss rechts (Foto in der Form des gerissenen Papierrands) ---------- */

.m4d-papier { position: relative; aspect-ratio: 500 / 422; }
.m4d-papier .m4d-flaeche { position: absolute; inset: 0; }
.m4d-papier .m4d-flaeche__bild {
	-webkit-mask-image: var(--m4d-maske-papier);
	mask-image: var(--m4d-maske-papier);
	-webkit-mask-size: 100% 100%;
	mask-size: 100% 100%;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
}

/* ---------- Variante 2: zwei große Rechtecke ---------- */

.m4d-rechteck {
	position: relative;
	aspect-ratio: 4 / 3;
	margin: 0 12px;
	border-radius: 24px;
	overflow: hidden;
}
.m4d-rechteck .m4d-flaeche { position: absolute; inset: 0; }

/* ---------- Knopf "Foto ändern" ---------- */

.m4d-knoepfe {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-top: 12px;
}
.m4d-foto__knopf {
	display: inline-block;
	padding: 8px 18px;
	border: 0;
	border-radius: 999px;
	background: var(--m4d-gelb);
	color: var(--m4d-schwarz);
	font-family: 'Outfit', sans-serif;
	font-weight: 600;
	font-size: 15px;
	line-height: 1.2;
	cursor: pointer;
}
.m4d-foto__knopf:hover,
.m4d-foto__knopf:focus { filter: brightness(0.95); }
.m4d-hochlaeuft .m4d-flaeche__bild { opacity: .6; }
.m4d-hochlaeuft .m4d-foto__knopf { opacity: .6; pointer-events: none; }

/* ---------- Hinweise ---------- */

.m4d-hinweis {
	margin: 0 0 16px;
	padding: 10px 14px;
	border-left: 4px solid var(--m4d-gelb);
	background: #FFF8E1;
	color: var(--m4d-schwarz);
	font-family: 'Open Sans', sans-serif;
}
.m4d-hinweis--fehler { border-left-color: #C62828; background: #FDECEA; }
.m4d-admin { margin: 12px 0 0; font-family: 'Open Sans', sans-serif; font-size: 13px; text-align: center; }

/* ---------- Handy: Fotos klein unter dem Profil (vorläufig, Melli zeigt noch die Wunschansicht) ---------- */

@media (max-width: 768px) {
	.m4d-profil,
	.m4d-profil--v1 { left: 0; transform: none; width: 100%; }
	.m4d-raster,
	.m4d-profil--v1 .m4d-raster,
	.m4d-profil--v2 .m4d-raster {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		align-items: flex-start;
		gap: 16px 4%;
	}
	.m4d-mitte { flex: 0 0 100%; order: 1; padding: 0; }
	.m4d-spalte { order: 2; }
	.m4d-profil--v1 .m4d-spalte--links { flex: 0 0 56%; max-width: 280px; }
	.m4d-profil--v1 .m4d-spalte--rechts { flex: 0 0 36%; max-width: 190px; }
	.m4d-profil--v2 .m4d-spalte { flex: 0 0 44%; max-width: 200px; }
	.m4d-rechteck { margin: 0; border-radius: 14px; }
	.m4d-foto__knopf { padding: 6px 10px; font-size: 12px; }
	.m4d-knoepfe { gap: 6px; }
}

/* ---------- Einwilligung Fotos für Überraschungen (0.3.0) ---------- */
.m4d-einw { max-width: 640px; margin: 18px auto 0; padding: 12px 16px; border: 1px solid #FFB800; border-radius: 12px; background: #fff; font-family: 'Open Sans', sans-serif; font-size: 14px; color: var(--m4d-schwarz, #1C1C1C); }
.m4d-einw__zeile { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.m4d-einw__zeile input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; accent-color: #FFB800; }
.m4d-einw__text { margin: 6px 0 0 28px; font-size: 13px; line-height: 1.45; }
