/* APD 549 — one Airbnb-style Favorites system for listings, services,
 * experiences, detail pages and map previews. Loaded last on purpose. */
:root{
  --apd549-heart:#ff385c;
  --apd549-ink:#222222;
  --apd549-muted:#717171;
  --apd549-line:#dddddd;
  --apd549-soft:#f7f7f7;
  --apd549-shadow:0 12px 38px rgba(0,0,0,.16);
}

html.apd549-favorites-open,
body.apd549-favorites-open{overflow:hidden!important;overscroll-behavior:none!important}
body.apd549-favorites-open{
  position:fixed!important;
  inset-inline:0!important;
  top:calc(-1 * var(--apd549-favorite-scroll,0px))!important;
  width:100%!important;
}

/* The same heart on every marketplace surface. */
html body :is(.apd5-favorite,[data-apd-favorite]):not(.apd17-favorite-button):not(.apd52-text-action),
html body.apd534-airbnb-results .apd534-map-preview-heart{
  display:grid!important;
  place-items:center!important;
  width:42px!important;
  min-width:42px!important;
  height:42px!important;
  min-height:42px!important;
  padding:0!important;
  border:0!important;
  border-radius:999px!important;
  background:transparent!important;
  color:#fff!important;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.62))!important;
  cursor:pointer!important;
  touch-action:manipulation!important;
  -webkit-tap-highlight-color:transparent!important;
  transition:transform .18s cubic-bezier(.2,.8,.2,1),color .18s ease!important;
}
html body :is(.apd5-favorite,[data-apd-favorite]):not(.apd17-favorite-button):not(.apd52-text-action) :is(svg,.apd5-icon,.apd52-icon),
html body.apd534-airbnb-results .apd534-map-preview-heart svg{
  width:29px!important;
  height:29px!important;
  color:inherit!important;
  fill:rgba(0,0,0,.18)!important;
  stroke:#fff!important;
  stroke-width:2.25!important;
  paint-order:stroke fill!important;
}
html body :is(.apd5-favorite,[data-apd-favorite]).is-favorite:not(.apd17-favorite-button):not(.apd52-text-action),
html body :is(.apd5-favorite,[data-apd-favorite]).is-saved:not(.apd17-favorite-button):not(.apd52-text-action),
html body.apd534-airbnb-results .apd534-map-preview-heart:is(.is-favorite,.is-saved){
  color:var(--apd549-heart)!important;
}
html body :is(.apd5-favorite,[data-apd-favorite]).is-favorite:not(.apd17-favorite-button):not(.apd52-text-action) :is(svg,.apd5-icon,.apd52-icon),
html body :is(.apd5-favorite,[data-apd-favorite]).is-saved:not(.apd17-favorite-button):not(.apd52-text-action) :is(svg,.apd5-icon,.apd52-icon),
html body.apd534-airbnb-results .apd534-map-preview-heart:is(.is-favorite,.is-saved) svg{
  color:var(--apd549-heart)!important;
  fill:var(--apd549-heart)!important;
  stroke:#fff!important;
}
html body :is(.apd17-favorite-button,.apd52-text-action,[data-apd-favorite-button]):is(.is-favorite,.is-saved,[aria-pressed="true"]){color:var(--apd549-heart)!important}
html body :is(.apd17-favorite-button,.apd52-text-action,[data-apd-favorite-button]):is(.is-favorite,.is-saved,[aria-pressed="true"]) :is(svg,.apd52-icon,.apd5-icon){color:var(--apd549-heart)!important;fill:var(--apd549-heart)!important;stroke:var(--apd549-heart)!important}
html body .apd549-heart-pop{animation:apd549-heart-pop .36s cubic-bezier(.2,1.5,.5,1)!important}
@keyframes apd549-heart-pop{0%{transform:scale(.72)}55%{transform:scale(1.18)}100%{transform:scale(1)}}

/* Bottom sheet. */
.apd549-favorites-root{
  position:fixed!important;
  inset:0!important;
  z-index:2147482000!important;
  display:block!important;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif!important;
  color:var(--apd549-ink)!important;
}
.apd549-favorites-root[hidden]{display:none!important}
.apd549-favorites-backdrop{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  padding:0!important;
  border:0!important;
  background:rgba(0,0,0,.38)!important;
  opacity:0!important;
  transition:opacity .22s ease!important;
}
.apd549-favorites-sheet{
  position:absolute!important;
  right:0!important;
  bottom:0!important;
  left:0!important;
  width:100%!important;
  max-height:min(84dvh,790px)!important;
  overflow:hidden!important;
  border-radius:28px 28px 0 0!important;
  background:#fff!important;
  box-shadow:var(--apd549-shadow)!important;
  transform:translate3d(0,102%,0)!important;
  transition:transform .24s cubic-bezier(.2,.78,.2,1)!important;
  will-change:transform!important;
}
.apd549-favorites-root.is-open .apd549-favorites-backdrop{opacity:1!important}
.apd549-favorites-root.is-open .apd549-favorites-sheet{transform:translate3d(0,0,0)!important}
.apd549-favorites-handle{
  width:42px!important;
  height:5px!important;
  margin:9px auto 1px!important;
  border-radius:999px!important;
  background:#b0b0b0!important;
}
.apd549-favorites-sheet header{
  position:sticky!important;
  top:0!important;
  z-index:2!important;
  display:grid!important;
  grid-template-columns:44px 1fr 44px!important;
  align-items:center!important;
  min-height:58px!important;
  padding:0 15px!important;
  border-bottom:1px solid #ebebeb!important;
  background:#fff!important;
}
.apd549-favorites-sheet header h2{
  margin:0!important;
  color:var(--apd549-ink)!important;
  font-size:20px!important;
  line-height:1.2!important;
  font-weight:760!important;
  letter-spacing:-.25px!important;
  text-align:center!important;
}
.apd549-favorites-sheet header button{
  display:grid!important;
  place-items:center!important;
  width:42px!important;
  height:42px!important;
  padding:0!important;
  border:0!important;
  border-radius:999px!important;
  background:transparent!important;
  color:#222!important;
  font-size:34px!important;
  line-height:1!important;
  touch-action:manipulation!important;
}
.apd549-favorites-sheet header button:active{background:#f1f1f1!important;transform:scale(.95)!important}
.apd549-favorites-lists,
.apd549-favorites-create{
  max-height:calc(min(84dvh,790px) - 15px)!important;
  overflow:auto!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
  background:#fff!important;
}
.apd549-favorite-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:22px 16px!important;
  padding:24px 20px 116px!important;
}
.apd549-favorite-list{
  min-width:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:var(--apd549-ink)!important;
  text-align:left!important;
  cursor:pointer!important;
  touch-action:manipulation!important;
}
.apd549-favorite-list-media{
  position:relative!important;
  display:grid!important;
  place-items:center!important;
  width:100%!important;
  aspect-ratio:1/1!important;
  overflow:hidden!important;
  border-radius:18px!important;
  background:#eeeeee!important;
  color:#777!important;
  font-size:42px!important;
  box-shadow:0 2px 12px rgba(0,0,0,.08)!important;
}
.apd549-favorite-list-media img{width:100%!important;height:100%!important;object-fit:cover!important;display:block!important}
.apd549-favorite-list-media.is-placeholder{background:linear-gradient(145deg,#f7f7f7,#e8e8e8)!important}
.apd549-favorite-list[aria-pressed="true"] .apd549-favorite-list-media::after{
  content:"✓"!important;
  position:absolute!important;
  right:9px!important;
  bottom:9px!important;
  display:grid!important;
  place-items:center!important;
  width:30px!important;
  height:30px!important;
  border:2px solid #fff!important;
  border-radius:50%!important;
  background:var(--apd549-heart)!important;
  color:#fff!important;
  font-size:17px!important;
  font-weight:800!important;
  box-shadow:0 2px 8px rgba(0,0,0,.2)!important;
}
.apd549-favorite-list-copy{display:block!important;padding-top:9px!important}
.apd549-favorite-list-copy strong,
.apd549-favorite-list-copy small{display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
.apd549-favorite-list-copy strong{font-size:17px!important;line-height:1.25!important;font-weight:650!important}
.apd549-favorite-list-copy small{margin-top:3px!important;color:var(--apd549-muted)!important;font-size:15px!important;line-height:1.25!important}
.apd549-favorites-lists>footer{
  position:sticky!important;
  right:0!important;
  bottom:0!important;
  left:0!important;
  z-index:3!important;
  padding:12px 20px calc(12px + env(safe-area-inset-bottom))!important;
  border-top:1px solid #ebebeb!important;
  background:rgba(255,255,255,.97)!important;
  backdrop-filter:blur(14px)!important;
}
.apd549-favorites-lists>footer button,
.apd549-favorites-create>footer button:last-child{
  width:100%!important;
  min-height:54px!important;
  padding:13px 18px!important;
  border:0!important;
  border-radius:12px!important;
  background:#222!important;
  color:#fff!important;
  font-size:18px!important;
  line-height:1.2!important;
  font-weight:700!important;
  touch-action:manipulation!important;
}

/* Create-list step. */
.apd549-favorites-create{min-height:410px!important}
.apd549-favorites-create>label{display:block!important;margin:24px 20px 0!important}
.apd549-favorites-create>label>span:first-child{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important}
.apd549-favorite-input{
  display:flex!important;
  align-items:center!important;
  min-height:76px!important;
  padding:8px 12px 8px 18px!important;
  border:1.5px solid #717171!important;
  border-radius:12px!important;
  background:#fff!important;
}
.apd549-favorite-input::before{content:"Nombre"!important;position:absolute!important;margin-top:-39px!important;color:#717171!important;font-size:12px!important}
.apd549-favorite-input:focus-within{border-color:#222!important;box-shadow:0 0 0 1px #222!important}
.apd549-favorite-input input{flex:1!important;min-width:0!important;padding:15px 0 0!important;border:0!important;outline:0!important;background:transparent!important;color:#222!important;font:400 20px/1.2 inherit!important}
.apd549-favorite-input button{display:grid!important;place-items:center!important;width:34px!important;height:34px!important;padding:0!important;border:0!important;border-radius:50%!important;background:#eee!important;color:#555!important;font-size:22px!important}
.apd549-favorites-create>[data-apd549-create-count]{display:block!important;margin:8px 20px 118px!important;color:#717171!important;font-size:14px!important}
.apd549-favorites-create>footer{
  position:absolute!important;
  right:0!important;
  bottom:0!important;
  left:0!important;
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:14px!important;
  padding:13px 20px calc(13px + env(safe-area-inset-bottom))!important;
  border-top:1px solid #ebebeb!important;
  background:#fff!important;
}
.apd549-favorites-create>footer button:first-child{border:0!important;background:transparent!important;color:#222!important;font-size:17px!important;font-weight:650!important}
.apd549-favorites-create>footer button:last-child{min-height:50px!important}
.apd549-favorites-create>footer button:disabled{background:#dddddd!important;color:#999!important}

/* Save confirmation. */
.apd549-favorite-toast{
  position:fixed!important;
  z-index:2147482100!important;
  right:18px!important;
  bottom:calc(88px + env(safe-area-inset-bottom))!important;
  left:18px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  max-width:590px!important;
  min-height:66px!important;
  margin:auto!important;
  padding:12px 16px!important;
  border:1px solid #dddddd!important;
  border-radius:14px!important;
  background:#fff!important;
  color:#222!important;
  box-shadow:0 10px 30px rgba(0,0,0,.2)!important;
  font-size:17px!important;
  font-weight:580!important;
  opacity:0!important;
  transform:translate3d(0,18px,0)!important;
  pointer-events:none!important;
  transition:opacity .2s ease,transform .22s cubic-bezier(.2,.8,.2,1)!important;
}
.apd549-favorite-toast.is-visible{opacity:1!important;transform:translate3d(0,0,0)!important;pointer-events:auto!important}
.apd549-favorite-toast button{padding:8px 0!important;border:0!important;border-bottom:1px solid #222!important;background:transparent!important;color:#222!important;font-size:16px!important;font-weight:650!important}
.apd549-favorite-toast.is-error{border-color:#d93025!important;color:#a50e0e!important}

@media (min-width:744px){
  .apd549-favorites-sheet{right:50%!important;left:auto!important;width:min(620px,calc(100% - 48px))!important;border-radius:28px!important;transform:translate3d(50%,102%,0)!important}
  .apd549-favorites-root.is-open .apd549-favorites-sheet{transform:translate3d(50%,-24px,0)!important}
  .apd549-favorite-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media (prefers-reduced-motion:reduce){
  .apd549-favorites-backdrop,.apd549-favorites-sheet,.apd549-favorite-toast{transition:none!important}
  html body .apd549-heart-pop{animation:none!important}
}
