/*
 * GBF - Ações do imóvel
 * Compartilhar e favoritar sobre a galeria-base.
 */

body.single-imovel .gbf-property-actions{
  position:absolute;
  top:16px;
  right:40px;
  z-index:7;

  display:flex;
  align-items:center;
  gap:8px;

  font-family:"Roboto Clean", Roboto, sans-serif;
}

.gbf-property-actions--card{
  position:absolute;
  right:12px;
  bottom:12px;
  z-index:7;

  display:flex;
  align-items:center;
  justify-content:center;

  font-family:"Roboto Clean", Roboto, sans-serif;
  line-height:1;
  pointer-events:auto;
}

body.single-imovel .gbf-property-actions__button,
.gbf-property-actions--card .gbf-property-actions__button{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;

  width:44px;
  height:44px;
  min-width:44px;
  min-height:44px;
  margin:0;
  padding:0;

  border:1px solid rgba(0,0,0,.10);
  border-radius:12px;
  background:rgba(255,255,255,.95);
  color:#262626;
  box-shadow:0 2px 10px rgba(0,0,0,.18);
  backdrop-filter:blur(5px);
  -webkit-backdrop-filter:blur(5px);

  cursor:pointer;
  appearance:none;
  -webkit-appearance:none;
  -webkit-tap-highlight-color:transparent;
  transition:background-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

body.single-imovel .gbf-property-actions__button:hover,
.gbf-property-actions--card .gbf-property-actions__button:hover{
  background:#fff;
  box-shadow:0 4px 14px rgba(0,0,0,.22);
}

body.single-imovel .gbf-property-actions__button:active,
.gbf-property-actions--card .gbf-property-actions__button:active{
  transform:scale(.96);
}

body.single-imovel .gbf-property-actions__button:focus-visible,
.gbf-property-actions--card .gbf-property-actions__button:focus-visible{
  outline:3px solid rgba(19,123,214,.38);
  outline-offset:2px;
}

body.single-imovel .gbf-property-actions__icon,
.gbf-property-actions--card .gbf-property-actions__icon{
  display:block;
  width:22px;
  height:22px;
  pointer-events:none;
}

body.single-imovel .gbf-property-actions__heart,
.gbf-property-actions--card .gbf-property-actions__heart{
  fill:transparent;
  transition:fill .16s ease, stroke .16s ease;
}

body.single-imovel .gbf-property-actions__button--favorite[aria-pressed="true"],
.gbf-property-actions--card .gbf-property-actions__button--favorite[aria-pressed="true"]{
  color:#e11d48;
}

body.single-imovel .gbf-property-actions__button--favorite[aria-pressed="true"] .gbf-property-actions__heart,
.gbf-property-actions--card .gbf-property-actions__button--favorite[aria-pressed="true"] .gbf-property-actions__heart{
  fill:currentColor;
  stroke:currentColor;
}

body.single-imovel .gbf-property-actions__popover[hidden]{
  display:none !important;
}

body.single-imovel .gbf-property-actions__popover{
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  z-index:9;

  display:grid;
  width:220px;
  padding:8px;
  box-sizing:border-box;

  border:1px solid rgba(0,0,0,.10);
  border-radius:14px;
  background:#fff;
  box-shadow:0 12px 32px rgba(0,0,0,.20);
}

body.single-imovel .gbf-property-actions__share-option{
  display:flex;
  align-items:center;
  gap:11px;

  width:100%;
  min-height:44px;
  margin:0;
  padding:0 12px;
  box-sizing:border-box;

  border:0;
  border-radius:9px;
  background:transparent;
  color:#262626;

  font:inherit;
  font-size:15px;
  font-weight:500;
  line-height:1.2;
  text-align:left;

  cursor:pointer;
  appearance:none;
  -webkit-appearance:none;
}

body.single-imovel .gbf-property-actions__share-option:hover,
body.single-imovel .gbf-property-actions__share-option:focus-visible{
  background:#f3f4f6;
  outline:0;
}

body.single-imovel .gbf-property-actions__share-option svg{
  display:block;
  flex:0 0 20px;
  width:20px;
  height:20px;
}

.gbf-property-actions-toast{
  position:fixed;
  left:50%;
  bottom:24px;
  z-index:2147483000;
  transform:translate(-50%, 12px);

  width:max-content;
  max-width:calc(100vw - 32px);
  padding:11px 16px;
  box-sizing:border-box;
  white-space:nowrap;

  border-radius:10px;
  background:rgba(32,32,32,.96);
  color:#fff;
  box-shadow:0 10px 30px rgba(0,0,0,.24);

  font-family:"Roboto Clean", Roboto, sans-serif;
  font-size:14px;
  font-weight:500;
  line-height:1.3;
  text-align:center;

  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}

.gbf-property-actions-toast.is-visible{
  opacity:1;
  visibility:visible;
  transform:translate(-50%, 0);
  transition-delay:0s;
}

/* Toast com ação "Ver favoritos". */
.gbf-property-actions-toast.has-action{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  pointer-events:auto;
}

.gbf-property-actions-toast__message{
  display:block;
  min-width:0;
}

.gbf-property-actions-toast__action{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding-left:14px;

  border-left:1px solid rgba(255,255,255,.34);
  color:#fff !important;

  font:inherit;
  font-weight:700;
  line-height:1.2;
  text-decoration:underline !important;
  text-decoration-thickness:1px !important;
  text-underline-offset:3px;
  white-space:nowrap;
}

.gbf-property-actions-toast__action:hover,
.gbf-property-actions-toast__action:focus-visible{
  color:#fff !important;
  text-decoration-thickness:2px !important;
}

.gbf-property-actions-toast__action:focus-visible{
  outline:2px solid rgba(255,255,255,.92);
  outline-offset:3px;
  border-radius:3px;
}

@media(hover:hover) and (pointer:fine){
  body.single-imovel .gbf-property-actions__button::after,
  .gbf-property-actions--card .gbf-property-actions__button::after{
    content:attr(data-tooltip);
    position:absolute;
    top:calc(100% + 8px);
    right:0;
    z-index:8;

    width:max-content;
    max-width:190px;
    padding:7px 9px;
    border-radius:7px;
    background:rgba(32,32,32,.96);
    color:#fff;

    font-size:12px;
    font-weight:500;
    line-height:1.2;
    white-space:nowrap;

    opacity:0;
    visibility:hidden;
    transform:translateY(-3px);
    pointer-events:none;
    transition:opacity .14s ease, transform .14s ease, visibility 0s linear .14s;
  }


  .gbf-property-actions--card .gbf-property-actions__button::after{
    top:auto;
    bottom:calc(100% + 8px);
  }

  body.single-imovel .gbf-property-actions__button:hover::after,
  body.single-imovel .gbf-property-actions__button:focus-visible::after,
  .gbf-property-actions--card .gbf-property-actions__button:hover::after,
  .gbf-property-actions--card .gbf-property-actions__button:focus-visible::after{
    opacity:1;
    visibility:visible;
    transform:translateY(0);
    transition-delay:.25s;
  }

  body.single-imovel .gbf-property-actions:has(.gbf-property-actions__popover:not([hidden])) .gbf-property-actions__button::after{
    display:none;
  }
}

@media(max-width:767px){
  body.single-imovel .gbf-property-actions{
    top:12px;
    right:12px;
    gap:8px;
  }

  body.single-imovel .gbf-property-actions__button,
  .gbf-property-actions--card .gbf-property-actions__button{
    width:42px;
    height:42px;
    min-width:42px;
    min-height:42px;
    border-radius:11px;
  }

  body.single-imovel .gbf-property-actions__icon,
  .gbf-property-actions--card .gbf-property-actions__icon{
    width:21px;
    height:21px;
  }

  body.single-imovel .gbf-property-actions__popover{
    position:fixed;
    top:72px;
    right:12px;
    left:auto;
    width:min(240px, calc(100vw - 24px));
  }

  .gbf-property-actions-toast{
    bottom:calc(88px + env(safe-area-inset-bottom));
  }
}

@media(max-width:359px){
  .gbf-property-actions-toast.has-action{
    gap:10px;
    padding-right:13px;
    padding-left:13px;
    font-size:13px;
  }

  .gbf-property-actions-toast__action{
    padding-left:10px;
  }
}

@media(prefers-reduced-motion:reduce){
  body.single-imovel .gbf-property-actions__button,
  body.single-imovel .gbf-property-actions__heart,
  .gbf-property-actions--card .gbf-property-actions__button,
  .gbf-property-actions--card .gbf-property-actions__heart,
  .gbf-property-actions-toast{
    transition:none !important;
  }
}
