/* Isometrie: zusammengefasste Layout- und Tabellenstile */
.isometrie-wohnung-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em 1em;
  margin-bottom: 1em;
}

.isometrie-wohnung-ausgabe {
  margin-bottom: 1em;
  font-weight: bold;
}

.isometrie-table-svg-img {
  width: 100%;
  height: auto;
  max-width: 600px;
  display: block;
}

.isometrie-table-2col {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  align-items: flex-start;
  width: min(100%, var(--wp--style--global--wide-size)) !important;
  max-width: var(--wp--style--global--wide-size) !important;
  overflow: visible;
}

.isometrie-table-2col__left {
  flex: 0 0 auto;
  min-width: 0;
  position: relative;
  z-index: 1;
  overflow: visible;
}

.isometrie-table-scroll-area {
  overflow: visible;
}

.isometrie-table-scroll-top {
  display: none;
}

.isometrie-table-scroll-top__inner {
  height: 1px;
}

.isometrie-table-2col__right {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  z-index: 2;
  height: 100%;
  align-self: center;
  overflow: visible;
}

.isometrie-table-2col__right img {
  max-width: 500px;
  width: 100%;
  height: auto;
  display: block;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.04);
  border-radius: 6px;
  z-index: 2;
}

.isometrie-table-2col__right svg {
  display: block;
  width: 100%;
  max-width: 500px;
  height: auto;
  padding: 0  0 0 clamp(10px, 4vw, 70px);
  overflow: visible !important;
  z-index: 2;
}

.isometrie-table-row:hover td,
.isometrie-table-row.is-active td,
.isometrie-table-row.init-hover td {
  background: var(--wp--preset--color--primary) !important;
  color: #fff;
}

.isometrie-detail-block {
  width: min(100%, var(--wp--style--global--wide-size));
}

.isometrie-list-wrap {
  width: 100%;
}

.isometrie-summary-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--wp--preset--font-size--lg);
}

.isometrie-summary-table thead th {
  padding: 0.9em 1em;
  text-align: left;
  border: none;
  background: none;
}

.isometrie-summary-table > thead > tr > th:last-child,
.isometrie-summary-table > tbody > tr.isometrie-summary-row > td:last-child {
  text-align: right;
  white-space: nowrap;
}

.isometrie-summary-table tbody td {
  padding: 0.95em 1em;
  border: none;
}

.isometrie-summary-table > tbody > tr.isometrie-summary-row:first-child > td:nth-child(2) {
  border-top-left-radius: 14px;
}

.isometrie-summary-table > tbody > tr.isometrie-summary-row:first-child > td:last-child {
  border-top-right-radius: 14px;
}

.isometrie-summary-table > tbody > tr.isometrie-summary-row:nth-last-child(2) > td:nth-child(2) {
  border-bottom-left-radius: 14px;
}

.isometrie-summary-table > tbody > tr.isometrie-summary-row:nth-last-child(2) > td:last-child {
  border-bottom-right-radius: 14px;
}

.isometrie-summary-price {
  font-weight: 600;
  text-align: right;
}

.isometrie-summary-chevron-header,
.isometrie-summary-chevron-cell {
  width: 0;
  padding: 0;
  display: none;
}

.isometrie-summary-chevron {
  display: inline-block;
  width: 100%;
  text-align: center;
  font-size: 0.7rem;
  line-height: 1;
  transition: transform 180ms ease;
}

.isometrie-summary-row {
  cursor: pointer;
}

.isometrie-summary-row td {
  background: #f3f7f2;
}

.isometrie-summary-row[data-available="false"] td {
  background: #e9ebea !important;
  color: #8a8f8b;
}

.isometrie-summary-row[data-available="false"]:hover td {
  background: #e9ebea !important;
  color: #8a8f8b !important;
}

.isometrie-summary-table tbody tr:nth-child(4n + 1) td,
.isometrie-summary-table tbody tr:nth-child(4n + 2) td {
  background: #f3f7f2;
}

.isometrie-summary-table tbody tr:nth-child(4n + 3) td,
.isometrie-summary-table tbody tr:nth-child(4n + 4) td {
  background: #fff;
}

.isometrie-summary-row.is-open td {
  background: var(--wp--preset--color--primary) !important;
  color: #fff;
}

.isometrie-summary-row.is-open .isometrie-summary-chevron {
  transform: rotate(180deg);
}

.isometrie-detail-row > td {
  padding: 0.2rem 0 1rem;
  border: none;
  background: transparent;
}

.isometrie-detail-row .isometrie-detail-card {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.isometrie-detail-row.is-open-active .isometrie-detail-card {
  opacity: 1;
  transform: translateY(0);
}

.isometrie-detail-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1rem;
  background: #fff;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: none;
}

.isometrie-detail-content {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.isometrie-detail-section {
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: #f7f9f7;
  text-align: left;
}

.isometrie-detail-section-title {
  margin: 0 0 0.55rem;
  font-size: var(--wp--preset--font-size--sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
}

.isometrie-detail-list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1rem;
}

.isometrie-detail-list > div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.isometrie-detail-list dt {
  font-size: var(--wp--preset--font-size--sm);
  opacity: 0.65;
}

.isometrie-detail-list dd {
  margin: 0;
  font-size: var(--wp--preset--font-size--md);
}

.isometrie-price-display {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: var(--wp--preset--font-size--md);
}

.isometrie-price-detail {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
}

.isometrie-price-detail span {
  font-size: var(--wp--preset--font-size--sm);
  opacity: 0.7;
}

.isometrie-price-detail strong {
  font-size: var(--wp--preset--font-size--lg);
  line-height: 1;
}

.isometrie-price-value {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.35rem;
  min-width: 9ch;
}

.isometrie-price-prefix {
  font-weight: 700;
  font-size: var(--wp--preset--font-size--md);
  color: rgba(0, 0, 0, 0.72);
  line-height: 1;
}

.isometrie-price-total {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.8rem;
  padding: 0.5rem 0.7rem;
  background: #dce9dc;
  border-radius: 8px;
  margin-top: 0.25rem;
  text-align: left;
}

.isometrie-price-total span {
  font-size: var(--wp--preset--font-size--sm);
  opacity: 0.8;
}

.isometrie-price-total strong {
  font-size: var(--wp--preset--font-size--xl);
  line-height: 1;
}

.isometrie-price-value--total {
  min-width: 11ch;
}

.isometrie-price-value--total .isometrie-price-prefix {
  font-size: var(--wp--preset--font-size--lg);
}

.isometrie-detail-pdf-button {
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  background: var(--wp--preset--color--primary);
  color: #fff;
  text-decoration: none;
  font-size: var(--wp--preset--font-size--sm);
  font-weight: 600;
  transition: opacity 200ms ease;
  width: fit-content;
}

.isometrie-detail-pdf-button:hover {
  opacity: 0.9;
}

.isometrie-pdf-icon {
  flex: 0 0 auto;
  display: block;
}

.isometrie-summary-row:hover td {
  background: #e8f0e6 !important;
  color: #000 !important;
  transition: background-color 150ms ease;
}

.isometrie-summary-row.is-open td {
  background: var(--wp--preset--color--primary) !important;
  color: #fff;
}

.isometrie-detail-isometrie {
  min-height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f9f7;
  border-radius: 12px;
  overflow: hidden;
}

.isometrie-detail-isometrie svg,
.isometrie-detail-isometrie img {
  width: 100%;
  max-width: 440px;
  height: auto;
  display: block;
  padding: 0.5rem;
}

.isometrie-table-block {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 1.5em;
  background: none;
  border-radius: 0;
  overflow: visible;
  font-family: inherit;
  font-size: var(--wp--preset--font-size--lg);
  box-shadow: none;
}

.isometrie-table-block thead th {
  font-weight: inherit;
  background: none;
  border: none;
  padding: 1em 1.2em;
  text-align: left;
}

.isometrie-table-block tbody {
  background: #f3f7f2;
  border-radius: 0;
  overflow: visible;
}

.isometrie-table-block tbody td {
  border: none;
  padding: 1em 1.2em;
  background: transparent;
  text-align: left;
}

/* Verhindert horizontales Springen: Spalten behalten stabile Mindestbreiten. */
.isometrie-table-block th:nth-child(1),
.isometrie-table-block td:nth-child(1) {
  min-width: 5ch;
}

.isometrie-table-block th:nth-child(2),
.isometrie-table-block td:nth-child(2) {
  min-width: 10ch;
}

.isometrie-table-block th:nth-child(3),
.isometrie-table-block td:nth-child(3) {
  min-width: 8ch;
  white-space: nowrap;
}

.isometrie-table-block th:nth-child(4),
.isometrie-table-block td:nth-child(4) {
  min-width: 8ch;
  white-space: nowrap;
}

.isometrie-table-block th:nth-child(5),
.isometrie-table-block td:nth-child(5) {
  min-width: 11ch;
  white-space: nowrap;
}

.isometrie-table-block th:nth-child(6),
.isometrie-table-block td:nth-child(6) {
  min-width: 14ch;
  white-space: nowrap;
}

.isometrie-table-block th:nth-child(7),
.isometrie-table-block td:nth-child(7) {
  min-width: 8ch;
  white-space: nowrap;
}

.isometrie-table-block th:nth-child(8),
.isometrie-table-block td:nth-child(8) {
  min-width: 5ch;
  white-space: nowrap;
}

.isometrie-factsheet-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: inherit;
}

.isometrie-factsheet-icon {
  width: 18px;
  height: auto;
  display: block;
  flex: 0 0 18px;
  fill: currentColor;
}

.isometrie-factsheet-text {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.isometrie-table-block tbody tr:nth-child(odd) td {
  background: #f3f7f2;
}

.isometrie-table-block tbody tr:nth-child(even) td {
  background: #fff;
}

.isometrie-table-block tbody tr:first-child td:first-child {
  border-top-left-radius: 16px;
}

.isometrie-table-block tbody tr:first-child td:last-child {
  border-top-right-radius: 16px;
}

.isometrie-table-block tbody tr:last-child td:first-child {
  border-bottom-left-radius: 16px;
}

.isometrie-table-block tbody tr:last-child td:last-child {
  border-bottom-right-radius: 16px;
}

@media (max-width: 1400px) and (min-width: 960px) {
  .isometrie-table-2col {
    gap: 0.75rem;
  }

  .isometrie-table-2col__left {
    flex: 1 1 auto;
  }

  .isometrie-table-2col__right {
    flex: 0 0 clamp(430px, 34vw, 560px);
  }

  .isometrie-table-block {
    min-width: 640px;
    font-size: var(--wp--preset--font-size--md);
  }

  .isometrie-table-block thead th,
  .isometrie-table-block tbody td {
    padding: 0.8em 0.85em;
  }

  .isometrie-table-block th:nth-child(1),
  .isometrie-table-block td:nth-child(1) {
    min-width: 4.5ch;
  }

  .isometrie-table-block th:nth-child(2),
  .isometrie-table-block td:nth-child(2) {
    min-width: 8.5ch;
  }

  .isometrie-table-block th:nth-child(3),
  .isometrie-table-block td:nth-child(3) {
    min-width: 6.5ch;
  }

  .isometrie-table-block th:nth-child(4),
  .isometrie-table-block td:nth-child(4) {
    min-width: 7ch;
  }

  .isometrie-table-block th:nth-child(5),
  .isometrie-table-block td:nth-child(5) {
    min-width: 11ch;
  }

  .isometrie-table-block th:nth-child(6),
  .isometrie-table-block td:nth-child(6) {
    min-width: 12ch;
  }

  .isometrie-table-block th:nth-child(7),
  .isometrie-table-block td:nth-child(7) {
    min-width: 7ch;
  }

  .isometrie-table-block th:nth-child(8),
  .isometrie-table-block td:nth-child(8) {
    min-width: 5ch;
  }

  .isometrie-table-2col__right img,
  .isometrie-table-2col__right svg {
    max-width: clamp(430px, 34vw, 560px);
  }

  .isometrie-table-2col__right svg {
    padding-left: clamp(10px, 2vw, 32px);
  }

  .isometrie-table-block thead th:nth-child(5),
  .isometrie-table-block thead th:nth-child(6) {
    white-space: normal;
    line-height: 1.2;
  }
}

@media (max-width: 959px) {
  .isometrie-detail-block {
    width: min(100%, var(--wp--style--global--wide-size));
    max-width: min(100%, var(--wp--style--global--wide-size));
    margin-left: 0;
    margin-right: 0;
  }

  .isometrie-list-wrap {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }

  .isometrie-summary-table tbody td {
    padding: 0.85em 0.65em;
    text-align: left;
  }

  .isometrie-summary-table thead th,
  .isometrie-summary-table > thead > tr > th:last-child,
  .isometrie-summary-table > tbody > tr.isometrie-summary-row > td:last-child,
  .isometrie-summary-price {
    text-align: left;
  }

  .isometrie-summary-chevron-header,
  .isometrie-summary-chevron-cell {
    display: table-cell;
    width: 0.9rem;
    min-width: 0.9rem;
    text-align: center;
    vertical-align: middle;
    padding: 0.85em 0.05em 0.85em 0.1em;
  }

  .isometrie-summary-chevron-cell {
    opacity: 1;
    padding-left: 0;
    padding-right: 0;
  }

  .isometrie-summary-chevron {
    display: block;
    margin: 0 auto;
    font-size: 0.64rem;
    line-height: 1;
    opacity: 0.85;
  }

  .isometrie-summary-table > tbody > tr.isometrie-summary-row:first-child > td:first-child {
    border-top-left-radius: 14px;
  }

  .isometrie-summary-table > tbody > tr.isometrie-summary-row:nth-last-child(2) > td:first-child {
    border-bottom-left-radius: 14px;
  }

  .isometrie-summary-table > tbody > tr.isometrie-summary-row:first-child > td:nth-child(2),
  .isometrie-summary-table > tbody > tr.isometrie-summary-row:nth-last-child(2) > td:nth-child(2) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }

  .isometrie-detail-card {
    grid-template-columns: 1fr;
  }

  .isometrie-detail-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem 0.7rem;
  }

  .isometrie-table-2col {
    flex-direction: column;
    gap: 0;
  }

  .isometrie-table-2col__left {
    max-width: 100%;
    min-width: 0;
    flex: 1 1 100% !important;
    overflow-x: visible;
    overflow-y: visible;
  }

  .isometrie-table-scroll-area {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    overflow-x: scroll;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #9aa39a #eef2ee;
    box-sizing: border-box;
  }

  .isometrie-table-block {
    width: max-content;
    min-width: 760px;
    margin-right: 0;
  }

  .isometrie-table-scroll-top {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    height: 14px;
    overflow-x: scroll;
    overflow-y: hidden;
    margin-top: 0;
    margin-bottom: 0.35rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #9aa39a #eef2ee;
  }

  /* Fallback: sichtbare Top-Scrollbar auch ohne JS-Sync */
  .isometrie-table-scroll-top__inner {
    min-width: 760px;
    width: max(100%, 760px);
    height: 1px;
  }

  .isometrie-table-scroll-top::-webkit-scrollbar,
  .isometrie-table-scroll-area::-webkit-scrollbar {
    height: 8px;
  }

  .isometrie-table-scroll-top::-webkit-scrollbar-track,
  .isometrie-table-scroll-area::-webkit-scrollbar-track {
    background: #eef2ee;
    border-radius: 999px;
  }

  .isometrie-table-scroll-top::-webkit-scrollbar-thumb,
  .isometrie-table-scroll-area::-webkit-scrollbar-thumb {
    background: #9aa39a;
    border-radius: 999px;
  }

  .isometrie-table-scroll-top::-webkit-scrollbar-thumb:hover,
  .isometrie-table-scroll-area::-webkit-scrollbar-thumb:hover {
    background: #768076;
  }

  .isometrie-table-2col__right {
    display: none;
  }
}