/* =====================================================================
 *  Empfehlen-Funktion  ·  metalldetektoren.de  ·  v1
 *  Farben: Navy #163e7c, Crimson #dc143c. Kein calc(), kein max-width
 *  auf Inhaltscontainern (Shop-Vorgaben).
 * ===================================================================== */

/* ---------- Button auf der Produktseite ---------- */
/* v6: dezente Textzeile statt grossem Button (Tippflaeche bleibt 36px hoch) */
.md-emp { width: 100%; margin: 8px 0 0; }
.md-emp-btn {
  display: inline-flex !important; align-items: center !important; justify-content: flex-start !important; gap: 6px !important;
  width: auto !important; min-height: 36px !important; padding: 4px 2px !important; margin: 0 !important;
  background: none !important; color: #163e7c !important; border: 0 !important; border-radius: 4px !important; box-shadow: none !important;
  font: inherit !important; font-size: 14px !important; font-weight: 400 !important; line-height: 1.3 !important;
  text-transform: none !important; letter-spacing: 0 !important; cursor: pointer !important;
}
.md-emp-btn svg { flex: 0 0 auto; width: 16px; height: 16px; }
.md-emp-t1 { font-weight: 600; }
.md-emp-t2 { color: #6b7280; }
.md-emp-btn:hover .md-emp-t1, .md-emp-btn:focus-visible .md-emp-t1 { text-decoration: underline; text-underline-offset: 3px; }
.md-emp-btn:focus-visible { outline: 2px solid #163e7c !important; outline-offset: 2px; }
.md-emp-btn[aria-busy="true"] { opacity: .6; cursor: progress !important; }

/* ---------- Teilen-Fenster ---------- */
html.md-emp-offen, html.md-emp-offen body { overflow: hidden; }
.md-emp-fenster[hidden] { display: none; }
.md-emp-overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(10, 20, 40, .55); z-index: 99998; }
.md-emp-dialog {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 99999;
  max-height: 92vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: #fff; color: #222; border-radius: 14px 14px 0 0;
  padding: 16px 16px 24px; box-shadow: 0 -6px 30px rgba(0, 0, 0, .25);
  font-size: 15px; line-height: 1.45;
}
@media (min-width: 640px) {
  .md-emp-dialog { left: 50%; right: auto; bottom: auto; top: 50%; width: 480px;
    transform: translate(-50%, -50%); border-radius: 12px; max-height: 88vh; padding: 20px 22px 24px; }
}
.md-emp-kopf { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.md-emp-kopf h2 { margin: 0; font-size: 19px; color: #163e7c; }
.md-emp-zu {
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  width: 40px !important; height: 40px !important; padding: 0 !important; border: 0 !important;
  background: #f1f3f7 !important; color: #163e7c !important; border-radius: 50% !important; cursor: pointer !important;
}
.md-emp-zu svg { width: 20px; height: 20px; }
.md-emp-produkt { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-weight: 600; }
.md-emp-produkt img { width: 56px; height: 56px; object-fit: contain; border: 1px solid #e3e6ec; border-radius: 6px; background: #fff; }

.md-emp-hinweis {
  background: #eef3fb; border-left: 4px solid #163e7c; border-radius: 6px;
  padding: 10px 12px; margin: 0 0 14px; font-size: 14px;
}
.md-emp-hinweis a { color: #dc143c; font-weight: 600; }

.md-emp-feldlabel { display: block; font-size: 13px; font-weight: 600; color: #555; margin: 0 0 4px; }
.md-emp-dialog textarea, .md-emp-dialog select, .md-emp-dialog input[type="text"],
.md-emp-linkzeile input[type="text"] {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 14px;
  border: 1px solid #c9ced8; border-radius: 6px; padding: 8px 10px; background: #fff; color: #222;
}
.md-emp-dialog textarea { resize: vertical; min-height: 84px; }

.md-emp-kanaele-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
@media (min-width: 640px) { .md-emp-kanaele-btns { grid-template-columns: repeat(4, 1fr); } }
.md-emp-kanal-btn {
  display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important;
  gap: 4px !important; min-height: 64px !important; padding: 8px 4px !important;
  background: #f6f7fa !important; color: #163e7c !important; border: 1px solid #dde1e8 !important; border-radius: 8px !important;
  font: inherit !important; font-size: 12px !important; font-weight: 600 !important; cursor: pointer !important;
}
.md-emp-kanal-btn:hover, .md-emp-kanal-btn:focus-visible { border-color: #163e7c !important; background: #eef3fb !important; }
.md-emp-kanal-btn svg { width: 24px; height: 24px; }
.md-emp-k-wa svg { color: #1f9e4f; }
.md-emp-k-tg svg { color: #2a8fd0; }

.md-emp-panel { margin: 0 0 14px; }
.md-emp-panel[hidden] { display: none; }
.md-emp-panel .md-emp-knopf { margin-top: 8px; }
.md-emp-qr { text-align: center; }
.md-emp-qr [data-md-qrbild] { width: 200px; height: 200px; margin: 0 auto 8px; }
.md-emp-qr svg { width: 100%; height: 100%; }

.md-emp-listenbox { border-top: 1px solid #e3e6ec; padding-top: 12px; margin-top: 4px; }
.md-emp-listenbox h3 { font-size: 16px; color: #163e7c; margin: 0 0 4px; }
.md-emp-listenbox input[type="text"] { margin-top: 8px; }
.md-emp-listenbox input[hidden] { display: none; }

.md-emp-status { min-height: 20px; margin-top: 10px; font-size: 14px; color: #1f7a3f; font-weight: 600; }
.md-emp-status.md-emp-fehler { color: #dc143c; }
.md-emp-kontolink { display: inline-block; margin-top: 8px; color: #163e7c; font-weight: 600; font-size: 14px; }

/* ---------- Gemeinsame Bausteine ---------- */
.md-emp-linkzeile { display: flex; gap: 8px; align-items: stretch; }
.md-emp-linkzeile input, .md-emp-linkzeile select { flex: 1 1 auto; min-width: 0; }
.md-emp-knopf {
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  padding: 9px 14px !important; min-height: 40px !important;
  background: #163e7c !important; color: #fff !important; border: 2px solid #163e7c !important; border-radius: 6px !important;
  font: inherit !important; font-size: 14px !important; font-weight: 600 !important; text-decoration: none !important;
  cursor: pointer !important; white-space: nowrap !important;
}
.md-emp-knopf:hover, .md-emp-knopf:focus-visible { background: #0f2d5c !important; border-color: #0f2d5c !important; color: #fff !important; }
.md-emp-knopf-hell { background: #fff !important; color: #163e7c !important; }
.md-emp-knopf-hell:hover, .md-emp-knopf-hell:focus-visible { background: #eef3fb !important; color: #163e7c !important; }
.md-emp-knopf-rot { background: #fff !important; color: #dc143c !important; border-color: #dc143c !important; }
.md-emp-knopf-rot:hover, .md-emp-knopf-rot:focus-visible { background: #dc143c !important; color: #fff !important; border-color: #dc143c !important; }
.md-emp-knopf-klein { padding: 6px 10px !important; min-height: 34px !important; font-size: 13px !important; }
.md-emp-klein { font-size: 13px; color: #666; }
.md-emp-leer { color: #666; font-style: italic; }

/* ---------- Kontoseite + oeffentliche Liste ---------- */
.md-emp-konto { width: 100%; padding: 0 0 24px; }
.md-emp-konto h1 { color: #163e7c; margin-bottom: 12px; }
.md-emp-konto h2 { color: #163e7c; font-size: 19px; margin: 26px 0 10px; }
.md-emp-dachzeile { margin: 0; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #dc143c; }

.md-emp-kacheln { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 768px) { .md-emp-kacheln { grid-template-columns: repeat(3, 1fr); } }
.md-emp-kachel { background: #f6f7fa; border: 1px solid #e3e6ec; border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.md-emp-kachel-akzent { border-color: #163e7c; background: #eef3fb; }
.md-emp-zahl { font-size: 22px; font-weight: 700; color: #163e7c; line-height: 1.2; }
.md-emp-label { font-size: 13px; color: #555; }

.md-emp-kanaele { display: flex; flex-direction: column; gap: 6px; }
.md-emp-kanal { display: grid; grid-template-columns: 130px 1fr 44px; align-items: center; gap: 8px; font-size: 14px; }
.md-emp-kanal-balken { height: 10px; background: #e9ecf2; border-radius: 5px; overflow: hidden; }
.md-emp-kanal-balken span { display: block; height: 100%; background: #163e7c; border-radius: 5px; }
.md-emp-kanal-n { text-align: right; font-weight: 600; }

.md-emp-liste { border: 1px solid #e3e6ec; border-radius: 8px; padding: 12px; margin-bottom: 12px; }
.md-emp-liste-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.md-emp-liste-kopf h3 { margin: 0; font-size: 17px; color: #163e7c; }
.md-emp-liste-kopf h3 span { font-weight: 400; font-size: 14px; color: #666; }
.md-emp-liste-aktionen { display: flex; flex-wrap: wrap; gap: 6px; }
.md-emp-artikel { list-style: none; margin: 10px 0 0; padding: 0; }
.md-emp-artikel li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid #f0f1f4; }
.md-emp-artikel img { width: 56px; height: 56px; object-fit: contain; flex: 0 0 auto; }
.md-emp-artikel a { flex: 1 1 auto; color: #222; text-decoration: none; font-weight: 600; }
.md-emp-entfernen {
  flex: 0 0 auto; display: inline-flex !important; align-items: center !important; justify-content: center !important;
  width: 36px !important; height: 36px !important; padding: 0 !important; border: 1px solid #e3e6ec !important;
  background: #fff !important; color: #dc143c !important; border-radius: 6px !important; cursor: pointer !important;
}
.md-emp-fuss { margin-top: 24px; }

.md-emp-raster { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 14px 0; }
@media (min-width: 768px) { .md-emp-raster { grid-template-columns: repeat(4, 1fr); } }
.md-emp-karte { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid #e3e6ec; border-radius: 8px; color: #222 !important; text-decoration: none !important; background: #fff; }
.md-emp-karte:hover { border-color: #163e7c; }
.md-emp-karte-bild { display: flex; align-items: center; justify-content: center; height: 140px; }
.md-emp-karte-bild img { width: 100%; height: 100%; object-fit: contain; }
.md-emp-karte-name { font-weight: 600; font-size: 14px; line-height: 1.3; }
.md-emp-karte-preis { font-weight: 700; color: #163e7c; }
.md-emp-karte-mehr { margin-top: auto; font-size: 13px; font-weight: 600; color: #dc143c; }
.md-emp-teilen-liste { margin-top: 18px; }

/* ---------- Box auf "Mein Konto" (v2) ---------- */
.md-emp-kontobox { width: 100%; box-sizing: border-box; }
.md-emp-kontobox[hidden] { display: none !important; }
.md-emp-kb-intro { margin: 0 0 12px; }
.md-emp-kacheln-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .md-emp-kacheln-4 { grid-template-columns: repeat(4, 1fr); } }
.md-emp-kontobox .md-emp-zahl { font-size: 20px; }
.md-emp-kb-guthaben { margin: 10px 0 0; font-size: 14px; }
.md-emp-kb-block { margin-top: 16px; }
.md-emp-knopf-wa { padding: 6px 10px !important; background: #1f9e4f !important; border-color: #1f9e4f !important; }
.md-emp-knopf-wa:hover, .md-emp-knopf-wa:focus-visible { background: #177a3c !important; border-color: #177a3c !important; }
.md-emp-knopf-wa svg { width: 22px; height: 22px; }
.md-emp-kb-listen { list-style: none; margin: 0; padding: 0; }
.md-emp-kb-listen li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid #f0f1f4; }
.md-emp-kb-liste-name { font-weight: 600; }
.md-emp-kb-liste-name span { font-weight: 400; color: #666; font-size: 14px; }
.md-emp-kb-liste-btns { display: flex; gap: 6px; }
.md-emp-kb-mehr { display: inline-block; margin-top: 14px; color: #163e7c; font-weight: 600; }

/* ---------- v3: Gutschein, Status je Empfehlung, Bedingungen ---------- */
.md-emp-gutschein { border: 2px dashed #dc143c; border-radius: 8px; padding: 12px; margin: 0 0 16px; background: #fff8f9; }
.md-emp-gutschein-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0 6px; }
.md-emp-gutschein-code { font-size: 20px; letter-spacing: .04em; color: #dc143c; font-family: monospace, monospace; }
.md-emp-werbungen { list-style: none; margin: 0; padding: 0; }
.md-emp-werbungen li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 8px 0 8px 12px;
  border-bottom: 1px solid #f0f1f4; border-left: 4px solid #c9ced8; margin-bottom: 4px; }
.md-emp-w-datum { font-weight: 600; }
.md-emp-w-status { font-size: 14px; color: #555; }
.md-emp-st-bestellt, .md-emp-st-wartet { border-left-color: #163e7c !important; }
.md-emp-st-pruefen { border-left-color: #e0a100 !important; }
.md-emp-st-gutgeschrieben { border-left-color: #1f9e4f !important; }
.md-emp-st-gutgeschrieben .md-emp-w-status { color: #1f7a3f; font-weight: 600; }
.md-emp-st-abgelehnt { opacity: .6; }
.md-emp-kb-werbungen { margin-top: 12px; }
.md-emp-bedingungen { padding-left: 18px; font-size: 13px; color: #555; }
.md-emp-bedingungen li { margin-bottom: 6px; }

/* ---------- v5: Teilen-Leiste in Kontobox/Kontoseite, Facebook ---------- */
.md-emp-k-fb svg { color: #1877f2; }
.md-emp-leiste { width: 100%; margin-top: 10px; }
.md-emp-leiste[hidden] { display: none !important; }
.md-emp-leiste .md-emp-kanaele-btns { margin: 0 0 8px; }
.md-emp-leiste .md-emp-panel textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; border: 1px solid #c9ced8; border-radius: 6px; padding: 8px; }
.md-emp-kb-listen li .md-emp-leiste, .md-emp-liste .md-emp-leiste { flex-basis: 100%; }
.md-emp-leiste .md-emp-kanaele-btns { grid-template-columns: repeat(4, 1fr); gap: 6px; }
.md-emp-leiste .md-emp-kanal-btn { min-height: 58px !important; font-size: 11px !important; padding: 6px 2px !important; }
