/*
 * Units badge (ee-core/includes/units-badge.php): the same look as the property card's OFF-PLAN
 * label (block 919, element 104). Loaded by the "Units Badge for EE" element and by the
 * "EE > Units badge" dynamic data field.
 */
.ee-units-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: "Pt Sans Pro Narrow";
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  background-color: var(--bde-palette-color-5);
  color: var(--bde-palette-steel-bg-blue-4);
  padding: 2px 8px;
  border: 1px solid var(--bde-headings-color);
  border-radius: 3px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.ee-units-badge:focus-visible {
  outline: 2px solid var(--bde-headings-color);
  outline-offset: 2px;
}

/* Explanation: on hover (mouse), keyboard focus, or a tap (.is-open, set by the script). */
.ee-units-badge__tip {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  padding: 6px 10px;
  border: 1px solid var(--bde-headings-color);
  border-radius: 3px;
  background-color: var(--bde-palette-color-5);
  color: var(--bde-palette-steel-bg-blue-4);
  font-size: 15px;
  text-transform: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-3px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  pointer-events: none;
  z-index: 3;
}
.ee-units-badge__tip::before {
  content: "";
  position: absolute;
  bottom: 100%;
  right: 12px;
  border: 6px solid transparent;
  border-bottom-color: var(--bde-headings-color);
}
@media (hover: hover) {
  .ee-units-badge:hover .ee-units-badge__tip {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}
.ee-units-badge:focus-visible .ee-units-badge__tip,
.ee-units-badge.is-open .ee-units-badge__tip {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* "Várólista" in a text (property page box, project cards): the text's own style, underlined as a link. */
.ee-units-waitlink {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ee-units-waitlink:focus-visible,
.ee-units-notice:focus-visible {
  outline: 2px solid var(--bde-headings-color);
  outline-offset: 2px;
}

/* Property page, above Alapadatok, while the waiting list is the way in. */
/* The bold of the Alapadatok values (.prop-iconbox_data); Open Sans has no bold loaded on the site. */
.bde-text.ee-units-notice-line {
  margin-bottom: 16px;
  font-family: "Open Sans Condensed", sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}
.ee-units-notice {
  cursor: pointer;
}
.ee-units-notice__link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* A sold-out unit's "Részletek" button on a project card: the same look as a hand-made sold-out card. */
.ee-imagebox-button.ee-units-btn-soldout {
  --bde-button-primary-background-color: #cca87740;
  --bde-button-primary-background-color-hover: #cca87740;
  --bde-button-primary-border-color: transparent;
  --bde-button-primary-border-color-hover: transparent;
  --bde-button-primary-text-color: #fff;
  --bde-button-primary-text-color-hover: #fff;
  background-color: #cca87740 !important;
  border-color: transparent !important;
  color: #fff !important;
  cursor: default;
  pointer-events: none;
}
.ee-imagebox-button.ee-units-btn-soldout::after {
  display: none; /* the arrow icon */
}

/* In a line of text: the explanation opens centred under the badge (element placement "inline"). */
.ee-units-badge--inline {
  vertical-align: middle;
  text-align: left;
}
.ee-units-badge--inline .ee-units-badge__tip {
  right: auto;
  left: 50%;
  transform: translate(-50%, -3px);
}
.ee-units-badge--inline .ee-units-badge__tip::before {
  right: auto;
  left: 50%;
  margin-left: -6px;
}
@media (hover: hover) {
  .ee-units-badge--inline:hover .ee-units-badge__tip {
    transform: translate(-50%, 0);
  }
}
.ee-units-badge--inline:focus-visible .ee-units-badge__tip,
.ee-units-badge--inline.is-open .ee-units-badge__tip {
  transform: translate(-50%, 0);
}
