/* Card sharing only: listing details keep their existing share layout. */
#main.im-home-shortened #immobilien-auswahl article.im-home-offer-card > a.im-home-offer-photo {
  display: block;
  text-decoration: none;
}
#main.im-home-shortened #immobilien-auswahl .im-home-offer-content h4 > a.im-home-offer-title,
#alle-objekte .property-highlight h3 > a.property-highlight-title {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
}
#main.im-home-shortened #immobilien-auswahl .im-home-offer-title:hover,
#alle-objekte .property-highlight-title:hover {
  text-decoration: underline;
  text-underline-offset: .18em;
  text-decoration-thickness: 1px;
}
.im-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid #dce3d9;
  box-sizing: border-box;
}
#main.im-home-shortened #immobilien-auswahl .im-card-actions > a.im-home-offer-action,
#alle-objekte .im-card-actions > a.property-highlight-action {
  display: block;
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 10px 0;
  border: 0;
  color: #244d35;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
  white-space: normal;
  overflow-wrap: anywhere;
  box-sizing: border-box;
}
.im-card-actions > a > span[aria-hidden] { font: inherit; white-space: nowrap; }
.im-card-actions > .im-card-share-button {
  appearance: none;
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  max-width: 50%;
  margin: 0 0 0 auto;
  padding: 8px 12px;
  border: 1px solid #b8cbb9;
  border-radius: 7px;
  background: #f1f6ef;
  color: #244d35;
  font: 600 16px/1.5 'DM Sans', Arial, sans-serif;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  box-sizing: border-box;
  cursor: pointer;
  box-shadow: none;
}
.im-card-share-button > svg { flex: 0 0 18px; width: 18px; height: 18px; }
.im-card-actions > .im-card-share-button:hover { background: #e5efe2; border-color: #718e77; }
.im-card-actions > .im-card-share-button:disabled { opacity: .6; cursor: progress; }
.im-card-actions > :is(a, button):focus-visible,
#main.im-home-shortened #immobilien-auswahl a.im-home-offer-title:focus-visible,
#alle-objekte a.property-highlight-title:focus-visible {
  outline: 3px solid #47725a;
  outline-offset: 3px;
}
#main.im-home-shortened #immobilien-auswahl article.im-home-offer-card > a.im-home-offer-photo:focus-visible {
  outline: 3px solid #47725a;
  outline-offset: -4px;
}

/* The dialog is attached outside the scrolling cards. */
dialog.im-card-share-dialog {
  width: min(440px, calc(100% - 28px));
  max-width: 440px;
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 20px;
  border: 1px solid #d3dfd1;
  border-radius: 16px;
  background: #fff;
  color: #213e2e;
  font: 400 16px/1.6 'DM Sans', Arial, sans-serif;
  box-shadow: 0 22px 72px rgb(19 44 29 / 24%);
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
dialog.im-card-share-dialog[open] { display: block; }
dialog.im-card-share-dialog::backdrop { background: rgb(17 36 25 / 48%); }
.im-card-share-dialog .im-card-share-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #dfe7dc;
  background: #fff;
}
.im-card-share-dialog .im-card-share-title {
  min-width: 0;
  margin: 0;
  color: #213e2e;
  font-family: 'Manrope', Arial, sans-serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
.im-card-share-dialog .im-card-share-close {
  appearance: none;
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  max-width: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #244d35;
  font: 400 30px/1 'DM Sans', Arial, sans-serif;
  white-space: nowrap;
  overflow-wrap: normal;
  cursor: pointer;
}
.im-card-share-dialog .im-card-share-property {
  margin: 14px 0 18px;
  color: #344d3c;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.im-card-share-dialog .im-card-share-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}
.im-card-share-dialog .im-card-share-action,
.im-card-share-dialog .im-card-share-more > summary {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 48px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 11px 12px;
  border: 1px solid #bfd0bc;
  border-radius: 8px;
  background: #f3f7f0;
  color: #244d35;
  font: 600 16px/1.5 'DM Sans', Arial, sans-serif;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  box-sizing: border-box;
  cursor: pointer;
}
.im-card-share-dialog .im-card-share-copy { grid-column: 1 / -1; background: #fff; }
.im-card-share-dialog .im-card-share-property-title { display: block; font-size: 15px; font-weight: 600; }
.im-card-share-dialog .im-card-share-property-meta { display: block; margin-top: 5px; color: #647068; font-size: 13px; }
.im-card-share-dialog .im-card-share-image { flex-direction: row; gap: 14px; min-height: 96px; padding: 12px; border-color: #245f91; background: #245f91; color: #fff; }
.im-card-share-dialog .im-card-share-image-preview { display: block; flex: 0 0 120px; width: 120px; height: 90px; max-width: 38%; margin: 0; border-radius: 4px; object-fit: contain; background: #fff; }
.im-card-share-dialog .im-card-share-image-text { display: flex; flex: 1 1 0; min-width: 0; flex-direction: column; gap: 5px; }
.im-card-share-dialog .im-card-share-image-caption { color: #f1f6fb; font: 400 12px/1.45 'DM Sans', Arial, sans-serif; }
.im-card-share-dialog .im-card-share-more { margin: 12px 0 0; border: 0; padding: 0; }
.im-card-share-dialog .im-card-share-more > summary { gap: 10px; list-style: none; }
.im-card-share-dialog .im-card-share-more > summary::-webkit-details-marker { display: none; }
.im-card-share-dialog .im-card-share-more > summary::after { content: '⌄'; font-size: 18px; line-height: 1; }
.im-card-share-dialog .im-card-share-more[open] > summary::after { transform: rotate(180deg); }
.im-card-share-dialog .im-card-share-more-options { margin-top: 8px; }
.im-card-share-dialog .im-card-share-more-options .im-card-share-action { font-size: 14px; }
.im-card-share-dialog :is(.im-card-share-action, .im-card-share-close):hover,
.im-card-share-dialog .im-card-share-more > summary:hover { background: #e6efe1; border-color: #718e77; }
.im-card-share-dialog .im-card-share-image:hover { background: #1c4d78; border-color: #1c4d78; }
.im-card-share-dialog button:disabled { opacity: .6; cursor: progress; }
.im-card-share-dialog :is(a, button, textarea, summary):focus-visible { outline: 3px solid #47725a; outline-offset: 3px; }
.im-card-share-dialog .im-card-share-help,
.im-card-share-dialog .im-card-share-status {
  margin: 18px 0 0;
  color: #536057;
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.im-card-share-dialog .im-card-share-status:empty { margin: 0; }
.im-card-share-dialog .im-card-share-manual {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin-top: 18px;
  color: #344d3c;
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.im-card-share-dialog .im-card-share-field {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 96px;
  max-height: 220px;
  padding: 10px 12px;
  border: 1px solid #a8bda7;
  border-radius: 7px;
  background: #fafcf8;
  color: #213e2e;
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-sizing: border-box;
  resize: vertical;
}
.im-card-share-button[hidden],
.im-card-share-dialog[hidden],
.im-card-share-dialog [hidden] { display: none !important; }
@media (max-width: 380px) {
  dialog.im-card-share-dialog { width: calc(100% - 24px); padding: 18px; border-radius: 12px; }
  .im-card-share-dialog .im-card-share-head { gap: 10px; }
  .im-card-share-dialog .im-card-share-title { font-size: 21px; }
  .im-card-share-dialog .im-card-share-action,
  .im-card-share-dialog .im-card-share-more > summary { padding-inline: 8px; }
  .im-card-actions { gap: 8px; }
  .im-card-actions > .im-card-share-button { padding-inline: 10px; }
}

