/* Residence information and unobstructed contact controls. Loaded after legacy styles. */
.calea-enhanced {
  --calea-contact-size: 56px;
  --calea-contact-inset: max(20px, env(safe-area-inset-right));
  --calea-contact-bottom: calc(20px + var(--calea-contact-size) + env(safe-area-inset-bottom));
  --calea-floating-gap: 16px;
}
.calea-enhanced .div-whats,
.calea-enhanced .image-22-copy,
.calea-enhanced .div-flecha-return {
  position: fixed;
  inset: auto var(--calea-contact-inset) var(--calea-contact-bottom) auto;
  width: var(--calea-contact-size);
  height: var(--calea-contact-size);
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: visible;
  z-index: 45;
}
.calea-enhanced .div-flecha-return {
  bottom: calc(var(--calea-contact-bottom) + var(--calea-contact-size) + var(--calea-floating-gap));
}
.calea-enhanced .div-whats > a,
.calea-enhanced .div-whats .image-44,
.calea-enhanced .div-flecha-return > a,
.calea-enhanced .div-flecha-return .image-43 {
  display: block;
  position: static;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  object-fit: contain;
}
.calea-enhanced .div-whats > a,
.calea-enhanced .div-flecha-return > a { border-radius: 50%; touch-action: manipulation; }
.calea-enhanced .div-flecha-return > a { box-shadow: 0 3px 14px #51483d1a; }
.calea-enhanced .div-flecha-return > a:focus-visible { outline-offset: 4px; }
.calea-enhanced .seccion-nombre .calea-residence-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px 24px;
  padding: 0;
  background: transparent;
}
.calea-enhanced .calea-residence-heading::before,
.calea-enhanced .calea-residence-heading::after { display: none; }
.calea-residence-heading .heading-21 { min-width: 0; overflow-wrap: anywhere; }
.calea-residence-heading .text-block-67 { white-space: nowrap; }
.calea-enhanced[data-calea-page="residence"] { background: #f5f3ec; }
.calea-enhanced .seccion-nombre { padding-block: clamp(17px,2.2vw,28px); }
.calea-enhanced #residence-detail {
  padding: clamp(18px,2.8vw,36px) var(--calea-gutter) 0;
  background: transparent;
}
.calea-enhanced[data-calea-page="residence"] .seccion-galeria { background: transparent; }
.calea-enhanced #residence-detail .calea-unit-layout {
  max-width: 1120px;
  column-gap: clamp(16px,2.8vw,36px);
}
.calea-enhanced #residence-detail .calea-plan-panel { padding: 0; }
.calea-unit-summary {
  border: 1px solid #ddd4c6;
  border-radius: var(--calea-photo-radius);
  background: #fbfaf6;
}
.calea-enhanced #residence-detail .calea-unit-contact .calea-primary { border-radius: 6px; }
.calea-enhanced #residence-detail .calea-plan-tabs { gap: 4px; flex-wrap: wrap; }
.calea-enhanced #residence-detail .calea-plan-tabs button {
  min-height: 40px;
  padding: 7px 14px;
  border: 1px solid #d8cdbd;
  border-radius: 6px;
  font: 400 13px/1.3 var(--calea-body);
}
.calea-enhanced #residence-detail .calea-plan-tabs button[aria-selected="true"] {
  background: #75604e; border-color: #75604e; color: white;
}
.calea-enhanced #residence-detail .calea-plan-toolbar { min-height: 0; margin-bottom: 12px; }
.calea-enhanced #residence-detail .calea-floorplan-open {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(215px,20vw,320px);
  padding: clamp(12px,1.6vw,22px);
  border-color: #ddd4c6;
  border-radius: var(--calea-photo-radius);
  background: #fbfaf6;
}
.calea-enhanced #residence-detail .calea-floorplan {
  height: auto;
  min-height: 0;
  max-height: 460px;
}
.calea-tower-plan-open,
.calea-viewer-stage.calea-viewer-plan { container: calea-plan-frame / size; }
@container calea-plan-frame (max-aspect-ratio: 5/6) {
  .calea-enhanced .calea-tower-plan-open > img {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 100cqh;
    height: 100cqw;
    max-width: none;
    max-height: none;
    padding: 10px;
    object-fit: contain;
    translate: -50% -50%;
    rotate: 90deg;
  }
  .calea-viewer-plan > .calea-viewer-image {
    flex: none;
    max-width: 100cqh;
    max-height: 100cqw;
    rotate: 90deg;
  }
}
.calea-plan-expand {
  position: absolute;
  right: 9px;
  bottom: 9px;
  width: 30px;
  height: 30px;
  padding: 6px;
  color: #75604e;
  background: #faf9f5e6;
  border: 1px solid #d8d0c380;
  border-radius: 50%;
  pointer-events: none;
  transition: background-color .18s ease, color .18s ease;
}
.calea-floorplan-open:is(:hover,.calea-pen-hover) .calea-plan-expand { background: #eee9df; color: #51483d; }
.calea-unit-summary { --calea-summary-inset: 28px; }
/* The drawing comes first in both the document and the mobile layout. */
.calea-unit-layout { grid-template-areas: "plan details"; }
.calea-unit-layout > .calea-plan-panel { grid-area: plan; }
.calea-unit-layout > .calea-unit-summary { grid-area: details; }
@media (min-width:901px) {
  .calea-enhanced #residence-detail .calea-unit-layout {
    grid-template-columns: minmax(0,1.06fr) minmax(0,1fr);
  }
}
@media (max-width:700px), (min-width:701px) and (max-width:1024px) and (orientation:portrait) {
  .calea-enhanced #residence-detail .calea-unit-layout {
    grid-template-areas: "plan" "details";
    grid-template-columns: minmax(0,1fr);
  }
  .calea-enhanced #residence-detail .calea-floorplan-open {
    min-height: 0;
    padding: clamp(10px,2.8vw,22px);
    padding-bottom: 24px;
  }
  #residence-detail .calea-plan-expand { width: 20px; height: 20px; padding: 3px; right: 7px; bottom: 2px; }
}
@media (min-width:701px) and (max-width:1024px) and (orientation:portrait) {
  .calea-enhanced #residence-detail .calea-unit-layout { row-gap: 18px; }
  .calea-enhanced #residence-detail .calea-floorplan { max-height: min(36svh,410px); }
  .calea-enhanced #residence-detail .calea-unit-summary {
    padding-block: 20px 12px;
    padding-inline-end: max(var(--calea-summary-inset),calc(var(--calea-contact-inset) + var(--calea-contact-size) + 8px - var(--calea-gutter)));
  }
}
.calea-unit-summary dt,
.calea-summary-price > span,
.calea-sold-note,
.calea-plan-tabs button,
.calea-payment-tabs button span,
.calea-price-line > div > span,
.calea-payment-steps h3 { font-size: 14px; color: #665f55; }
.calea-unit-summary dd { white-space: normal; text-align: right; }
.calea-summary-price small,
.calea-payment-footnote,
.calea-payment-steps p { font-size: 13px; line-height: 1.65; color: #665f55; }
.calea-contact-unit { min-height: 44px; display: flex; align-items: center; justify-content: center; line-height: 1.55; }
.calea-payment-steps article { min-width: 0; }
.calea-payment-steps article > strong { overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .calea-unit-summary { --calea-summary-inset: 22px; }
}
@media (max-width: 700px) {
  .calea-enhanced {
    --calea-contact-size: 50px;
    --calea-contact-inset: max(14px, env(safe-area-inset-right));
    --calea-contact-bottom: calc(14px + var(--calea-contact-size) + env(safe-area-inset-bottom));
  }
  .calea-enhanced .seccion-nombre { padding-block: 15px; }
  .calea-enhanced .seccion-nombre .calea-residence-heading { display: flex; flex-wrap: wrap; gap: 3px 14px; justify-content: space-between; padding: 0; }
  .calea-enhanced .calea-residence-heading .heading-21 { text-align: left; }
  .calea-enhanced .calea-residence-heading .text-block-67 { font-size: 14px; }
  .calea-enhanced #residence-detail { padding: 14px max(clamp(12px,3.6vw,20px),env(safe-area-inset-left),env(safe-area-inset-right)) 0; }
  .calea-enhanced #residence-detail .calea-unit-summary { padding-block: 14px 8px; }
  .calea-enhanced #residence-detail .calea-plan-toolbar { margin-bottom: 7px; }
  .calea-enhanced .seccion-nombre .heading-21 { font-size: clamp(24px,6.4vw,30px); }
  .calea-enhanced #residence-detail .calea-unit-layout { gap: 12px; }
  .calea-unit-summary { --calea-summary-inset: 14px; }
  .calea-payment-tabs button span { font-size: 13px; line-height: 1.5; }
}
@media (max-width: 700px), (max-width: 950px) and (orientation: landscape) and (max-height: 500px) {
  /* Reserve one shared column, keeping facts, copy and actions clear of both floating controls. */
  .calea-enhanced #residence-detail .calea-unit-summary {
    min-width: 0;
    padding-inline: var(--calea-summary-inset) calc(var(--calea-contact-size) + 7px);
  }
  .calea-enhanced #residence-detail .calea-unit-summary dt { min-width: 0; }
  .calea-enhanced #residence-detail .calea-unit-summary dd { flex-shrink: 0; }
  .calea-enhanced #residence-detail .calea-unit-contact :is(.calea-primary, .calea-advisor-channel, .calea-unit-form, .calea-unit-available) {
    width: 100%;
    margin-inline: 0;
  }
}
@media (max-width: 950px) and (orientation: landscape) and (max-height: 500px) {
  .calea-enhanced .seccion-nombre { padding-block: 16px; }
  .calea-enhanced .seccion-nombre .calea-residence-heading { padding-block: 0; gap: 6px 16px; }
  .calea-enhanced .calea-residence-heading .heading-21 { font-size: 27px; }
}

/* Let the English conversion wrap as a unit if a tower fact has a narrow column. */
.calea-area-row dd > span,
.calea-area-feet { display: inline-block; white-space: nowrap; }
.calea-area-feet { font-size: .82em; font-weight: 400; color: #6c6257; }

/* The same two groups read down the page when only one column fits. */
.calea-unit-summary, .calea-tower-detail { container: residence-summary / inline-size; }
.calea-residence-facts, .calea-residence-notes {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  column-gap: clamp(18px,2vw,32px);
}
.calea-residence-facts {
  row-gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--calea-line);
}
.calea-residence-facts dl { display:grid; align-content:start; row-gap:8px; min-width:0; margin:0; }
.calea-residence-facts dl > div {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  padding: 0;
  border: 0;
}
.calea-residence-facts dt {
  display:flex; flex:1 1 auto; align-items:baseline; gap:5px;
  min-width:0; margin:0; color:#665f55; font:400 13px/1.5 var(--calea-body);
}
.calea-residence-facts dt::after {
  content:""; flex:1 1 12px; min-width:5px; align-self:baseline;
  border-bottom:1px dotted #b7aa98;
}
.calea-residence-facts dd {
  max-width:58%; min-width:0; margin:0; text-align:right; color:var(--calea-ink);
  font:400 15px/1.5 var(--calea-body); font-variant-numeric:tabular-nums; white-space:normal;
}
.calea-residence-notes { gap:9px clamp(18px,2vw,32px); margin-top:16px; }
.calea-residence-notes p { margin:0; color:#5e554a; font:400 14px/1.55 var(--calea-body); }
.calea-unit-summary .calea-unit-contact { margin-top:16px; }
@container residence-summary (min-width:26rem) {
  .calea-residence-facts, .calea-residence-notes { grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); }
  .calea-residence-facts { row-gap:8px; }
  @supports (grid-template-rows:subgrid) {
    .calea-residence-facts dl { grid-row:span 3; grid-template-rows:subgrid; }
  }
}

/* On phones, one short row describes the layout. Each area retains a full
   label and enough room for its metric and imperial measurements. */
@media (max-width:700px), (pointer:coarse) and (max-width:960px) and (max-height:480px) {
  /* Keep the gallery, its controls and the final inquiry together on phones. */
  .calea-enhanced[data-calea-page="residence"] .seccion-galeria { padding-bottom: 0; }
  .calea-enhanced[data-calea-page="residence"] .seccion-cta {
    min-height: 0;
    padding-block: 20px 26px;
  }
  .calea-enhanced[data-calea-page="residence"] .seccion-cta .container-15 { padding-block: 0; }
  .calea-compact-facts .calea-residence-facts {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    row-gap: 10px;
    padding-bottom: 10px;
  }
  .calea-compact-facts .calea-residence-facts dl { grid-row: auto; grid-template-rows: none; row-gap: 3px; }
  .calea-compact-facts .calea-residence-facts dl:first-child {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    column-gap: 8px;
  }
  .calea-compact-facts .calea-residence-facts dl:first-child > div {
    display: grid;
    align-content: start;
    justify-content: start;
    gap: 1px;
    padding: 0;
    border: 0;
  }
  .calea-compact-facts .calea-residence-facts dl:first-child dt::after { display: none; }
  .calea-compact-facts .calea-residence-facts dl:first-child dd { max-width: none; text-align: left; }
  .calea-compact-facts .calea-residence-facts dt { font-size: 13px; line-height: 1.35; }
  .calea-compact-facts .calea-residence-facts dd { font-size: 14px; line-height: 1.4; }
  #residence-detail .calea-residence-notes { margin-top: 10px; row-gap: 6px; }
  #residence-detail .calea-residence-notes p, #residence-detail .calea-sold-note { font-size: 13px; line-height: 1.45; }
  #residence-detail .calea-unit-contact { margin-top: 12px; }
  #residence-detail .calea-unit-contact .calea-primary { min-height: 44px; padding: 8px 12px; }
}
