/* ekosphere DS / ekotheme 1.1.0 – controlled frontend component contract. */

/* Page-end decision note: real block justification, left final line. */
body:not(.wp-admin) .ekex-decision-note,
body:not(.wp-admin) main#content .ekex-decision-note {
  text-align: justify !important;
  text-align-last: left !important;
  hyphens: auto !important;
  -webkit-hyphens: auto !important;
}

/* Real-estate component must stay inside the surrounding content width. */
body:not(.wp-admin) .ek-real-estates,
body:not(.wp-admin) main#content .ek-real-estates,
body:not(.wp-admin) .ek-real-estates__grid,
body:not(.wp-admin) main#content .ek-real-estates__grid {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
}

body:not(.wp-admin) .ek-real-estates__grid,
body:not(.wp-admin) main#content .ek-real-estates__grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 24px !important;
  align-items: stretch !important;
}

/* Every listing card uses the Plan-B turquoise one-pixel outline. */
body:not(.wp-admin) article.ek-real-estate-card,
body:not(.wp-admin) [data-ekex-listing-id].ek-real-estate-card,
body:not(.wp-admin) main#content article.ek-real-estate-card,
body:not(.wp-admin) main#content [data-ekex-listing-id].ek-real-estate-card {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  border: 1px solid #00dcff !important;
  border-radius: 0 !important;
  box-sizing: border-box !important;
}

/* Listing status label. */
body:not(.wp-admin) .ek-real-estate-card__badge,
body:not(.wp-admin) main#content .ek-real-estate-card__badge {
  background: #00dcff !important;
  color: #000000 !important;
  border: 1px solid #000000 !important;
  border-radius: 0 !important;
}

/* Detail and WhatsApp labels remain white in every link state. */
body:not(.wp-admin) .ek-real-estate-card__cta,
body:not(.wp-admin) .ek-real-estate-card__cta:link,
body:not(.wp-admin) .ek-real-estate-card__cta:visited,
body:not(.wp-admin) .ek-real-estate-card__cta:hover,
body:not(.wp-admin) .ek-real-estate-card__cta:focus,
body:not(.wp-admin) .ek-real-estate-card__cta:focus-visible,
body:not(.wp-admin) .ek-real-estate-card__cta:active,
body:not(.wp-admin) main#content .ek-real-estate-card__cta,
body:not(.wp-admin) main#content .ek-real-estate-card__cta:link,
body:not(.wp-admin) main#content .ek-real-estate-card__cta:visited,
body:not(.wp-admin) main#content .ek-real-estate-card__cta:hover,
body:not(.wp-admin) main#content .ek-real-estate-card__cta:focus,
body:not(.wp-admin) main#content .ek-real-estate-card__cta:focus-visible,
body:not(.wp-admin) main#content .ek-real-estate-card__cta:active {
  color: #ffffff !important;
  text-decoration: none !important;
}

body:not(.wp-admin) .ek-real-estate-card__cta--whatsapp,
body:not(.wp-admin) .ek-real-estate-card__cta--whatsapp:link,
body:not(.wp-admin) .ek-real-estate-card__cta--whatsapp:visited,
body:not(.wp-admin) .ek-real-estate-card__cta--whatsapp:hover,
body:not(.wp-admin) .ek-real-estate-card__cta--whatsapp:focus,
body:not(.wp-admin) .ek-real-estate-card__cta--whatsapp:focus-visible,
body:not(.wp-admin) .ek-real-estate-card__cta--whatsapp:active,
body:not(.wp-admin) main#content .ek-real-estate-card__cta--whatsapp,
body:not(.wp-admin) main#content .ek-real-estate-card__cta--whatsapp:link,
body:not(.wp-admin) main#content .ek-real-estate-card__cta--whatsapp:visited,
body:not(.wp-admin) main#content .ek-real-estate-card__cta--whatsapp:hover,
body:not(.wp-admin) main#content .ek-real-estate-card__cta--whatsapp:focus,
body:not(.wp-admin) main#content .ek-real-estate-card__cta--whatsapp:focus-visible,
body:not(.wp-admin) main#content .ek-real-estate-card__cta--whatsapp:active {
  color: #ffffff !important;
}

@media (max-width: 1024px) {
  body:not(.wp-admin) .ek-real-estates__grid,
  body:not(.wp-admin) main#content .ek-real-estates__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 680px) {
  body:not(.wp-admin) .ek-real-estates__grid,
  body:not(.wp-admin) main#content .ek-real-estates__grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 18px !important;
  }
}
