/* === ISOMETRIE BLOCK: FRONTEND STYLES === */

.wp-block-rocket-isometrie,
.isometrie-block {
  width: 100%;
  max-width: none !important;
  color: var(--color-font, #1a171b);
  font-family: var(--wp--preset--font-family--body, inherit);
}

.isometrie-house-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0.5rem;
  background: #ffffff;
  margin-bottom: 1.5rem;
}

.isometrie-house-button {
  border: 0;
  background: #ffffff;
  color: #5d8392;
  font: inherit;
  font-weight: 700;
  padding: 0.7rem 1.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.isometrie-house-button:hover {
  background: #d6c096;
}

.isometrie-house-button.is-active {
  background: #6f8f9d;
  color: #ffffff;
}

.isometrie-house-panel.isometrie-block.two-column {
  display: none;
}

.isometrie-house-panel.isometrie-block.two-column.is-active {
  display: grid;
}

.isometrie-block.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--wp--preset--spacing--5, 1.25rem);
  max-width: none;
  width: 100%;
  margin: 0;
}

.isometrie-table-container {
  display: flex;
  flex-direction: column;
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 300px;
  background: transparent;
  width: 100%;
  box-sizing: border-box;
}

.isometrie-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  table-layout: fixed;
  border: 0;
}

.isometrie-col-name { width: 16%; }
.isometrie-col-rooms { width: 13%; }
.isometrie-col-area-usable { width: 17%; }
.isometrie-col-area-external { width: 21%; }
.isometrie-col-price { width: 21%; }
.isometrie-col-status { width: 12%; }

.isometrie-table thead th {
  background: transparent;
  color: #ffffff;
  padding: 0.58rem 0.25rem 0.74rem;
  text-align: left;
  vertical-align: top;
  overflow: hidden;
  border: 0;
}

.isometrie-table thead th:first-child {
  padding-left: 0.5rem;
}

.isometrie-table thead th:last-child {
  padding-right: 0.5rem;
}

.isometrie-th-label {
  display: block;
  line-height: 0.98;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.isometrie-th-subtitle {
  display: block;
  width: 100%;
  margin-top: 0.06rem;
  line-height: 1.02;
  font-size: 0.72em;
  font-weight: 300;
  white-space: nowrap;
}

.isometrie-th-name,
.isometrie-th-status {
  text-align: left;
}

.isometrie-table tbody tr {
  background: #ffffff;
  transition: background-color 0.18s ease;
  cursor: pointer;
}

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

.isometrie-table tbody tr.isometrie-row-muted {
  opacity: 0.55;
}

.isometrie-table tbody tr.isometrie-row-muted:nth-child(even) {
  background: #cbb98a;
}

.isometrie-table tbody tr:hover,
.isometrie-table tbody tr.isometrie-row-active {
  background: #7f97a7;
}

.isometrie-table tbody tr:hover td,
.isometrie-table tbody tr.isometrie-row-active td {
  color: #ffffff;
}

.isometrie-table td {
  padding: 0.88rem 0.25rem 0.82rem;
  text-align: left;
  color: #1f1b1d;
  line-height: 1;
  /* font-weight: 400; */
  border: 0;
  background: transparent;
}

.isometrie-table td:first-child,
.isometrie-table td:last-child {
  text-align: left;
}

.isometrie-table td:first-child {
  padding-left: 0.5rem;
}

.isometrie-table td:last-child {
  padding-right: 0.5rem;
}

.isometrie-svg-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 1.45rem 1.05rem;
  overflow: auto;
}

.isometrie-svg-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(88deg, rgba(190, 152, 91, 0.00) 61%, #BE985B 96%);
  pointer-events: none;
  z-index: 1;
}

.isometrie-house-panel[data-house-panel="6"] .isometrie-svg-container::before {
  background: linear-gradient(90deg, #BE985B 6%, rgba(190, 152, 91, 0) 18%, rgba(190, 152, 91, 0) 82%, #BE985B 120%);
}

.isometrie-svg {
  position: relative;
  z-index: 0;
  max-width: 100%;
  height: auto;
  display: block;
}

.isometrie-svg-inline {
  width: 100%;
  height: auto;
}

.isometrie-svg-shape-color {
  transition: fill 0.2s ease;
  opacity: 1;
}

.isometrie-svg-shape-color.isometrie-shape-active {
  fill: #7f97a7 !important;
  opacity: 1;
}

.isometrie-svg-inline .isometrie-floor-group,
.isometrie-svg-inline g[id*="-og"],
.isometrie-svg-inline g[id*="dg"],
.isometrie-svg-inline g[id*="eg"] {
  transition: transform 0.3s ease;
  transform-origin: center center;
  transform-box: fill-box;
}

.isometrie-svg-inline .isometrie-floor-lifted {
  transform: translateY(-24px);
}

.isometrie-mobile-drawer-row td {
  padding: 0;
  border-bottom: none;
  background: #d6c39b;
}

.isometrie-mobile-drawer {
  background: #d6c39b;
  padding: 1rem 1.05rem;
  width: 100%;
  margin: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.isometrie-mobile-drawer-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 0;
}

.isometrie-mobile-detail-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 0.75rem;
  align-items: start;
}

.isometrie-mobile-detail-label {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.isometrie-mobile-detail-label span {
  font-size: 1rem;
  font-weight: 600;
  color: #23201f;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.isometrie-mobile-detail-label em {
  font-style: normal;
  font-size: 0.78rem;
  line-height: 1.02;
  font-weight: 200;
  color: #2d281a;
}

.isometrie-mobile-detail-value {
  font-size: 1.05rem;
  font-weight: 200;
  color: #171416;
  text-align: left;
  line-height: 1.1;
}

.isometrie-mobile-detail-value a,
.isometrie-mobile-detail-value a:link,
.isometrie-mobile-detail-value a:visited {
  color: #171416;
}

.isometrie-mobile-pdf-link {
  width: 1.45rem;
  height: 1.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.isometrie-mobile-pdf-link svg {
  width: 100%;
  height: 100%;
  color: currentColor;
  fill: currentColor;
}

.isometrie-mobile-drawer-visual {
  background: #d6c39b;
  width: 100%;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
  margin: 0;
  position: relative;
}

.isometrie-mobile-drawer-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(88deg, rgba(214, 195, 155, 0.00) 61%, #d6c39b 96%);
  pointer-events: none;
  z-index: 2;
}

.isometrie-house-panel[data-house-panel="6"] .isometrie-mobile-drawer-visual::before {
  background: linear-gradient(90deg, #d6c39b 6%, rgba(214, 195, 155, 0) 18%, rgba(214, 195, 155, 0) 82%, #d6c39b 120%);
}

.isometrie-mobile-drawer-svg {
  width: 100%;
  height: auto;
  display: block;
  transform: none;
  transform-origin: center top;
}

@media (max-width: 781px) {
  .isometrie-house-switcher {
    display: flex;
    width: 100%;
    margin-bottom: 0.7rem;
    padding: 0.35rem;
    background: #ffffff;
    box-sizing: border-box;
  }

  .isometrie-house-button {
    flex: 1;
    padding: 0.55rem 0.45rem;
    text-align: center;
    transition: background-color 0.2s ease;
  }

  .isometrie-house-button:hover {
    background: #d6c096;
  }

  .isometrie-block.two-column {
    grid-template-columns: 1fr;
    gap: var(--wp--preset--spacing--4, 1rem);
  }

  .isometrie-house-panel.isometrie-block.two-column.is-active {
    display: grid;
  }

  .isometrie-table-container {
    min-height: auto;
    order: -1;
    background: transparent;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
  }

  .isometrie-svg-container {
    display: none;
  }

  .isometrie-table {
    table-layout: fixed;
  }

  .isometrie-table thead {
    display: table-header-group;
  }

  /* Mobile: nur 4 Kernspalten wie im Figma-Layout */
  .isometrie-col-area-external,
  .isometrie-col-price,
  .isometrie-table thead th:nth-child(4),
  .isometrie-table thead th:nth-child(5),
  .isometrie-table tbody td:nth-child(4),
  .isometrie-table tbody td:nth-child(5) {
    display: none;
  }

  .isometrie-col-name { width: 24%; }
  .isometrie-col-rooms { width: 23%; }
  .isometrie-col-area-usable { width: 30%; }
  .isometrie-col-status { width: 23%; }

  .isometrie-table tbody tr {
    height: 52px;
  }

  .isometrie-table thead th {
    padding: 0.35rem 0.5rem 0.74rem;
    font-weight: 600;
  }

  .isometrie-table thead .isometrie-th-subtitle {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 200;
  }

  .isometrie-table thead th:first-child {
    padding-left: 0.5rem;
  }

  .isometrie-table thead th:last-child {
    padding-right: 0.5rem;
  }

  .isometrie-table td {
    padding: 0.62rem 0.5rem;
  }

  .isometrie-table td:first-child {
    padding-left: 0.5rem;
  }

  .isometrie-table td:last-child {
    padding-left: 0;
    padding-right: 0.5rem;
    position: relative;
    white-space: nowrap;
  }

  .isometrie-mobile-drawer {
    padding: 1rem 0.58rem 0.65rem;
    box-sizing: border-box;
  }

  .isometrie-mobile-drawer-grid {
    gap: 0.72rem;
    margin-bottom: 0.85rem;
  }

  .isometrie-mobile-detail-row {
    gap: 0.55rem;
  }

  .isometrie-mobile-drawer-visual {
    margin-top: 1.6rem;
    padding-top: 0.08rem;
  }

  .isometrie-mobile-drawer-svg {
    position: relative;
    z-index: 1;
  }

  .isometrie-table tbody .isometrie-row td:last-child::after {
    content: '';
    position: absolute;
    right: 0.55rem;
    top: 50%;
    width: 0.94rem;
    height: 0.5rem;
    background-image: url("data:image/svg+xml,%3Csvg width='15' height='8' viewBox='0 0 15 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.705758 0L0 0.688062L7.5 8L15 0.688062L14.2942 0L7.5 6.62388L0.705758 0Z' fill='%231f1b1d'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.16s ease;
    pointer-events: none;
  }

  .isometrie-table tbody .isometrie-row.isometrie-row-active td:last-child::after {
    transform: translateY(-50%) rotate(180deg);
  }

  .isometrie-table tbody tr:hover,
  .isometrie-table tbody tr.isometrie-row-active {
    background: #ffffff;
  }

  .isometrie-table tbody tr:nth-child(even):hover,
  .isometrie-table tbody tr:nth-child(even).isometrie-row-active {
    background: #d6c096;
  }

  .isometrie-table tbody tr:hover td,
  .isometrie-table tbody tr.isometrie-row-active td {
    color: #1f1b1d;
  }

  .isometrie-mobile-drawer-row {
    background: #d6c39b;
  }
}

/* === TEMPLATE MATCH OVERRIDES (2026-07) === */

.wp-block-rocket-isometrie.isometrie-block {
  --iso-ochre: #be985b;
  --iso-table-bg: #ffffff;
  --iso-table-alt: #d6c096;
  --iso-text: #26242a;
  color: var(--iso-text);
}

.isometrie-block.two-column {
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--wp--preset--spacing--5, 1.25rem);
  align-items: stretch;
}

.isometrie-table-container {
  width: max-content;
  min-width: 0;
  max-width: 100%;
  background: transparent;
}

.isometrie-table {
  width: max-content;
  min-width: 0;
  table-layout: auto;
  font-size: inherit;
}

.isometrie-col-name { width: 9ch; }
.isometrie-col-rooms { width: 5ch; }
.isometrie-col-area-usable { width: 7ch; }
.isometrie-col-area-external { width: 7ch; }
.isometrie-col-price { width: 11ch; }
.isometrie-col-status { width: 7ch; }
.isometrie-col-factsheet { width: 3.2rem; }

.isometrie-table thead th {
  background: var(--iso-ochre);
  color: #ffffff;
  padding: 0.88rem 0.92rem 0.66rem;
  font-weight: 700;
  font-size: inherit;
}

.isometrie-th-label {
  line-height: 1.1;
}

.isometrie-th-subtitle {
  margin-top: 0.2rem;
  color: #ffffff;
  font-size: 0.64em;
  font-weight: 400;
}

.isometrie-table tbody tr {
  background: var(--iso-table-bg);
}

.isometrie-table tbody tr:nth-child(even) {
  background: var(--iso-table-alt);
}

.isometrie-table tbody tr:hover,
.isometrie-table tbody tr.isometrie-row-active {
  background: #6f8f9d;
}

.isometrie-table tbody tr:hover td,
.isometrie-table tbody tr.isometrie-row-active td,
.isometrie-table tbody tr:hover .isometrie-factsheet-link,
.isometrie-table tbody tr.isometrie-row-active .isometrie-factsheet-link {
  color: #ffffff;
}

.isometrie-table td {
  padding: 1.34rem 0.92rem;
  color: var(--iso-text);
  font-size: inherit;
  font-weight: 400;
}

.isometrie-table thead th:first-child,
.isometrie-table td:first-child {
  padding-left: 1rem;
}

.isometrie-table thead th:last-child,
.isometrie-table td:last-child {
  padding-right: 1rem;
}

.isometrie-table thead th:nth-child(7),
.isometrie-table td:nth-child(7) {
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.isometrie-table td:nth-child(2),
.isometrie-table td:nth-child(3),
.isometrie-table td:nth-child(4),
.isometrie-table td:nth-child(5) {
  text-align: right;
}

.isometrie-table thead th:nth-child(2),
.isometrie-table thead th:nth-child(3),
.isometrie-table thead th:nth-child(4),
.isometrie-table thead th:nth-child(5) {
  text-align: right;
}

.isometrie-table td:nth-child(6),
.isometrie-table td:nth-child(7) {
  text-align: left;
}

.isometrie-cell-status {
  vertical-align: middle;
  text-transform: lowercase;
}

.isometrie-cell-factsheet {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.isometrie-status-dot {
  display: none;
}

.isometrie-factsheet-link {
  width: 1.9rem;
  height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1f1b1d;
  text-decoration: none;
}

.isometrie-factsheet-link:link,
.isometrie-factsheet-link:visited {
  color: #1f1b1d;
}

.isometrie-factsheet-link svg {
  color: currentColor;
  fill: currentColor;
  width: 100%;
  height: 100%;
}

.isometrie-factsheet-empty {
  color: #8d8781;
  font-weight: 500;
}

.isometrie-status-legend {
  display: none;
}

.isometrie-svg-container {
  background: var(--iso-ochre);
  min-height: 100%;
  padding: 0.2rem 0.4rem;
  overflow: hidden;
}

.isometrie-svg-container::before {
  display: none;
}

.isometrie-svg,
.isometrie-svg-inline {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}

@media (max-width: 1080px) {
  .isometrie-block.two-column {
    grid-template-columns: 1fr;
  }

  .isometrie-table-container,
  .isometrie-table {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 781px) {
  .isometrie-table thead th {
    padding: 0.65rem 0.6rem;
  }

  .isometrie-table td {
    padding: 0.72rem 0.6rem;
    font-size: inherit;
  }

  .isometrie-col-factsheet,
  .isometrie-table thead th:nth-child(7),
  .isometrie-table tbody td:nth-child(7) {
    display: none;
  }

  .isometrie-status-legend {
    display: none;
  }

  .isometrie-table tbody tr.isometrie-row-active {
    background: #ffffff;
  }

  .isometrie-table tbody tr:nth-child(even).isometrie-row-active {
    background: #d6c096;
  }

  .isometrie-table tbody tr.isometrie-row-active td,
  .isometrie-table tbody tr.isometrie-row-active .isometrie-factsheet-link {
    color: #1f1b1d;
  }
}
