/* Unsere Stachelnasen – Kacheln und Beschreibungsseite (mobile first) */

.igel-status { margin: 0; padding: 28px 0; text-align: center; color: var(--ink-soft); font-size: 1.1rem; }

/* ---------- Kachelübersicht ---------- */
.igel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.igel-grid > .igel-status { grid-column: 1 / -1; }

.igel-kachel {
  display: flex; flex-direction: column; background: var(--paper); color: var(--ink);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  text-decoration: none; transition: transform .15s ease, box-shadow .15s ease;
}
.igel-kachel:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.igel-kachel:active { transform: scale(.99); }
.igel-kachel:focus-visible { outline-offset: 3px; border-radius: var(--radius); }

.igel-foto { position: relative; aspect-ratio: 4 / 3; background: var(--green-pale); overflow: hidden; }
.igel-foto img { width: 100%; height: 100%; object-fit: cover; }
.igel-foto img.platzhalter { object-fit: contain; padding: 20%; opacity: .5; }

.igel-badge {
  position: absolute; left: 10px; top: 10px; z-index: 1;
  font-family: var(--sans); font-weight: 700; font-size: .85rem; line-height: 1.2;
  padding: 4px 11px; border-radius: 999px; color: #fff; background: var(--green); box-shadow: var(--shadow-sm);
}
.igel-badge.st-in_behandlung { background: #9a5200; }
.igel-badge.st-in_pflege { background: var(--green); }
.igel-badge.st-ueberwinterung { background: #2f5f86; }
.igel-badge.st-ausgewildert { background: var(--brown-dark); }
.igel-badge.st-verstorben { background: #5b5850; }

.igel-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.igel-body h3 { margin: 0; font-size: 1.4rem; overflow-wrap: anywhere; }
.igel-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-family: var(--sans); font-size: 1rem; color: var(--ink-soft); }
.igel-facts li { display: flex; align-items: flex-start; gap: 8px; line-height: 1.35; }
.igel-facts svg { flex: none; width: 19px; height: 19px; margin-top: 1px; color: var(--brown); }

.igel-pate {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: auto;
  font-family: var(--sans); font-weight: 700; font-size: .9rem; padding: 4px 12px; border-radius: 999px;
}
.igel-pate svg { width: 16px; height: 16px; }
.igel-pate.ja { background: #fde4e8; color: #a3223a; }
.igel-pate.ja svg { fill: var(--heart); stroke: var(--heart); }
.igel-pate.nein { background: var(--paper); color: var(--ink-soft); border: 1px solid rgba(70, 104, 44, .3); }

/* ---------- Beschreibungsseite ---------- */
.igel-detail { display: grid; gap: 24px; }
.igel-detail .igel-foto { border-radius: var(--radius); box-shadow: var(--shadow-sm); aspect-ratio: 4 / 3; }
@media (min-width: 860px) {
  .igel-detail { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: start; }
  .igel-detail .igel-foto { position: sticky; top: calc(var(--header-h) + 20px); }
}
.igel-detail h2 { font-size: 1.45rem; margin-top: 1.2em; }
.igel-detail-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 20px; }
.igel-detail-facts div { background: var(--paper); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow-sm); }
.igel-detail-facts dt { font-family: var(--sans); font-weight: 700; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--brown); }
.igel-detail-facts dd { margin: 2px 0 0; font-size: 1.1rem; overflow-wrap: anywhere; }

.pate-box { display: flex; gap: 14px; align-items: flex-start; background: var(--paper); border: 2px solid var(--green-pale); border-radius: var(--radius); padding: 16px; margin: 0 0 22px; }
.pate-box > svg { flex: none; width: 30px; height: 30px; margin-top: 2px; color: var(--brown); }
.pate-box.ja { border-color: #f3c2cb; background: #fff7f8; }
.pate-box.ja > svg { fill: var(--heart); stroke: var(--heart); }
.pate-box p { margin: 0 0 12px; }
.pate-box p:last-child { margin-bottom: 0; }
.pate-box .btn { width: 100%; }
@media (min-width: 560px) { .pate-box .btn { width: auto; } }
.pate-box .small { font-family: var(--sans); font-size: .95rem; color: var(--ink-soft); }

.igel-text p { white-space: pre-line; }
.igel-back { margin: 26px 0 0; font-family: var(--sans); font-weight: 700; }

/* ---------- Dialog „Pate werden“ ---------- */
.pate-box button.btn { cursor: pointer; font-size: 1.03rem; }
.pate-dialog {
  position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: none; max-height: 92dvh; overflow-y: auto;
  border: 0; border-radius: 22px 22px 0 0; padding: 22px var(--gutter) calc(22px + env(safe-area-inset-bottom, 0px));
  background: var(--cream); color: var(--ink); box-shadow: 0 -10px 40px rgba(0, 0, 0, .3);
}
.pate-dialog::backdrop { background: rgba(44, 42, 37, .55); }
@media (min-width: 640px) {
  .pate-dialog { inset: 0; margin: auto; width: min(540px, 100% - 32px); max-height: min(92dvh, 860px); border-radius: 22px; padding: 28px 30px; }
}
.pd-close {
  position: absolute; top: 8px; right: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: none; font-size: 2rem; line-height: 1; color: var(--ink-soft); cursor: pointer;
}
.pd-close:hover { background: var(--green-pale); }
.pate-dialog h2 { font-size: 1.5rem; margin: 0 40px .4em 0; overflow-wrap: anywhere; }
.pd-intro { margin: 0 0 16px; color: var(--ink-soft); font-size: 1rem; }
.pd-form { display: grid; gap: 14px; }
.pd-field label { display: block; font-family: var(--sans); font-weight: 700; margin-bottom: 4px; }
.pd-field input[type=text], .pd-field input[type=email] {
  width: 100%; font: inherit; font-family: var(--sans); font-size: 1.1rem; padding: 12px 14px;
  border: 1.5px solid #b9b39b; border-radius: 12px; background: #fff; color: var(--ink);
}
.pd-field input:focus-visible { outline: 3px solid var(--brown); outline-offset: 1px; }
.pd-field small, .pd-ref small { display: block; margin-top: 4px; font-family: var(--sans); font-size: .9rem; color: var(--ink-soft); line-height: 1.35; }
.pd-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: -4px; font-family: var(--sans); font-size: .95rem; color: var(--ink-soft); }
.pd-quick span { flex-basis: 100%; }
.pd-quick button {
  min-height: 44px; padding: 6px 16px; border-radius: 999px; border: 2px solid var(--green); background: #fff;
  color: var(--green-dark); font-family: var(--sans); font-weight: 700; font-size: 1rem; cursor: pointer;
}
.pd-quick button:hover { background: var(--green-pale); }
.pd-switch { display: flex; align-items: center; gap: 12px; min-height: 44px; font-family: var(--sans); cursor: pointer; }
.pd-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pd-track { flex: none; position: relative; width: 50px; height: 30px; border-radius: 999px; background: #c9c4b0; transition: background .15s; }
.pd-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.pd-switch input:checked + .pd-track { background: var(--green); }
.pd-switch input:checked + .pd-track::after { transform: translateX(20px); }
.pd-switch input:focus-visible + .pd-track { outline: 3px solid var(--brown); outline-offset: 2px; }
.pd-ref { background: var(--paper); border: 1px dashed rgba(70, 104, 44, .5); border-radius: 12px; padding: 12px 14px; }
.pd-ref-label { font-family: var(--sans); font-weight: 700; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--brown); }
.pd-ref-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.pd-ref code { font-size: 1.1rem; font-weight: 700; color: var(--green-dark); overflow-wrap: anywhere; }
.pd-copy { min-height: 40px; padding: 4px 14px; border-radius: 999px; border: 2px solid var(--green); background: #fff; color: var(--green-dark); font-family: var(--sans); font-weight: 700; cursor: pointer; flex: none; }
.pd-copy:hover { background: var(--green-pale); }
.pd-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.pd-error { margin: 0; padding: 10px 14px; border-radius: 10px; background: #fdeceb; border: 1px solid #e8b4b0; color: #8c1d18; font-family: var(--sans); font-weight: 700; }
.pd-privacy { margin: 0; font-family: var(--sans); font-size: .88rem; color: var(--ink-soft); line-height: 1.35; }
.pd-submit { width: 100%; cursor: pointer; }
.pd-submit:disabled { opacity: .6; cursor: wait; }

.pd-tax { margin: 0; padding: 12px 14px; border-radius: 12px; background: #fff7e3; border: 1px solid #ecd59a; font-family: var(--sans); font-size: .95rem; line-height: 1.4; color: var(--ink); }
.pd-tax strong { color: var(--brown-dark); }
.pd-tax span { display: block; margin-top: 4px; font-size: .82rem; color: var(--ink-soft); }

/* ---------- „Igel melden“ auf der Seite „Igel gefunden?“ ---------- */
.aufnahme-cta { margin: 6px 0 30px; }
.aufnahme-cta .btn { width: 100%; cursor: pointer; }
.btn-gross { min-height: 72px; padding: 18px 32px; font-size: 1.4rem; gap: 14px; box-shadow: 0 6px 18px rgba(52, 82, 31, .35); }
.btn-gross svg { width: 30px; height: 30px; flex: none; }
@media (min-width: 560px) { .aufnahme-cta .btn { width: auto; min-width: 380px; } }
.am-stellen { margin: 0 0 14px; padding: 14px 16px; border-radius: 12px; background: #fff7e3; border: 1px solid #ecd59a; font-family: var(--sans); font-size: 1.02rem; line-height: 1.45; }
.am-stellen p { margin: 0 0 8px; overflow-wrap: anywhere; }
.am-stellen p:last-child { margin-bottom: 0; }
.pate-dialog .pd-privacy { margin: 0 0 14px; }
.pate-dialog .pd-submit { margin-top: 4px; }

/* Formularfelder im Dialog „Igel melden“ */
.pd-field textarea, .pd-field input[type=tel], .pd-field input[type=datetime-local], .pd-field input[type=file] {
  width: 100%; font: inherit; font-family: var(--sans); font-size: 1.1rem; padding: 12px 14px;
  border: 1.5px solid #b9b39b; border-radius: 12px; background: #fff; color: var(--ink);
}
.pd-field textarea { resize: vertical; line-height: 1.4; }
.pd-field input[type=file] { padding: 10px; font-size: 1rem; }
.pd-field textarea:focus-visible, .pd-field input:focus-visible { outline: 3px solid var(--brown); outline-offset: 1px; }
