/* Share popover for the property cards (see assets/js/property-share.js).
 * Plain CSS: it does not depend on which Tailwind classes happen to be compiled. */

.ha-share {
  position: fixed;
  z-index: 1100;
  width: 362px;
  max-width: calc(100vw - 16px);
  border: 1px solid #e7e7e7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
  color: #000;
  font-size: 14px;
  line-height: 20px;
}

.ha-share[hidden] {
  display: none;
}

.ha-share__header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 57px;
  padding: 8px;
  border-bottom: 1px solid #e7e7e7;
}

.ha-share__title {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.ha-share__close {
  position: absolute;
  top: 50%;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #000;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color 0.15s ease;
}

.ha-share__close:hover {
  background: #f3f3f3;
}

.ha-share__options {
  display: flex;
  justify-content: space-around;
  padding: 18px 8px 20px;
}

.ha-share__option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 72px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #000;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
  cursor: pointer;
}

.ha-share__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: background-color 0.15s ease;
}

.ha-share__option:hover .ha-share__icon {
  background: #f3f3f3;
}

/* Messages: the green chat bubble. */
.ha-share__icon--messages {
  background: #22c55e;
  color: #fff;
}

.ha-share__option:hover .ha-share__icon--messages {
  background: #16a34a;
}

.ha-share__option:focus-visible,
.ha-share__close:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.ha-share__status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* The heart and share icons on a property card are buttons inside the card's link: show the hand, not the arrow. */
.property-card [data-share-trigger],
.property-card [data-save-search-open] {
  cursor: pointer;
}
