/* APD 490 — canonical global language / region / currency selector.
 * One visual owner for the footer controls and the locale bottom sheet.
 */

html body.apd490-region-open #apd5-modal-backdrop{
  display:block!important;
  position:fixed!important;
  inset:0!important;
  z-index:2147483645!important;
  background:rgba(0,0,0,.34)!important;
  opacity:1!important;
  visibility:visible!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
html body.apd490-region-open .apd10-mobile-nav{
  visibility:hidden!important;
  pointer-events:none!important;
}
html body .apd5-region-modal{
  z-index:2147483647!important;
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display",Inter,Arial,sans-serif!important;
  -webkit-font-smoothing:antialiased!important;
  text-rendering:optimizeLegibility!important;
}
html body .apd5-region-modal[hidden]{display:none!important;}
html body .apd5-region-modal .apd5-region-dialog{
  box-sizing:border-box!important;
  background:#fff!important;
  color:#222!important;
  box-shadow:0 18px 70px rgba(0,0,0,.18)!important;
}
html body .apd5-region-modal [data-region-panel][hidden]{display:none!important;}
html body .apd5-region-modal .apd5-region-close{
  appearance:none!important;
  -webkit-appearance:none!important;
  border:0!important;
  outline:0!important;
  background:transparent!important;
  color:#222!important;
  box-shadow:none!important;
  cursor:pointer!important;
  font-family:Arial,sans-serif!important;
  font-weight:300!important;
  line-height:1!important;
  display:grid!important;
  place-items:center!important;
  -webkit-tap-highlight-color:transparent!important;
  touch-action:manipulation!important;
}
html body .apd5-region-modal .apd5-region-close:active{transform:scale(.94)!important;}

/* Clean Airbnb-like list language/currency geometry. */
html body .apd5-region-modal :is(.apd5-language-suggested,.apd5-language-all,.apd5-currency-grid){
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
html body .apd5-region-modal :is(.apd5-language-option,.apd5-currency-grid button){
  appearance:none!important;
  -webkit-appearance:none!important;
  width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
  text-align:left!important;
  background:#fff!important;
  color:#222!important;
  border:2px solid transparent!important;
  box-shadow:none!important;
  cursor:pointer!important;
  font:inherit!important;
  -webkit-tap-highlight-color:transparent!important;
  touch-action:manipulation!important;
}
html body .apd5-region-modal :is(.apd5-language-option,.apd5-currency-grid button).is-selected{
  border-color:#222!important;
  box-shadow:none!important;
}
html body .apd5-region-modal :is(.apd5-language-option,.apd5-currency-grid button) strong{
  display:block!important;
  margin:0!important;
  color:#222!important;
  font-weight:500!important;
  letter-spacing:-.01em!important;
}
html body .apd5-region-modal :is(.apd5-language-option,.apd5-currency-grid button) span{
  display:block!important;
  margin:3px 0 0!important;
  color:#6a6a6a!important;
  font-weight:400!important;
}

html body .apd5-region-modal .apd5-auto-translate{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  box-sizing:border-box!important;
  background:#f7f7f7!important;
  border:0!important;
  box-shadow:none!important;
}
html body .apd5-region-modal .apd5-auto-translate>div{min-width:0!important;}
html body .apd5-region-modal .apd5-auto-translate strong{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  color:#222!important;
  font-weight:500!important;
  margin:0 0 8px!important;
}
html body .apd5-region-modal .apd5-auto-translate>div>span:not(.apd490-translate-icon){
  display:block!important;
  color:#6a6a6a!important;
  font-weight:400!important;
  line-height:1.35!important;
}
html body .apd5-region-modal .apd490-translate-icon{
  width:22px!important;
  height:22px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 22px!important;
}
html body .apd5-region-modal .apd490-translate-icon svg{
  width:22px!important;
  height:22px!important;
  fill:none!important;
  stroke:#222!important;
  stroke-width:1.8!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
html body .apd5-region-modal .apd5-switch{
  position:relative!important;
  flex:0 0 auto!important;
  display:block!important;
}
html body .apd5-region-modal .apd5-switch input{
  position:absolute!important;
  opacity:0!important;
  pointer-events:none!important;
}
html body .apd5-region-modal .apd5-switch>span{
  position:relative!important;
  display:block!important;
  margin:0!important;
  background:#b0b0b0!important;
  border:0!important;
  box-shadow:none!important;
  transition:background .16s ease!important;
}
html body .apd5-region-modal .apd5-switch>span::after{
  content:""!important;
  position:absolute!important;
  display:block!important;
  background:#fff!important;
  border:1px solid #ddd!important;
  border-radius:50%!important;
  box-shadow:0 1px 4px rgba(0,0,0,.22)!important;
  transition:transform .16s ease!important;
}
html body .apd5-region-modal .apd5-switch>span::before{
  content:"✓"!important;
  position:absolute!important;
  z-index:2!important;
  color:#222!important;
  font-weight:700!important;
  opacity:0!important;
  transition:opacity .16s ease!important;
}
html body .apd5-region-modal .apd5-switch input:checked+span{background:#222!important;}
html body .apd5-region-modal .apd5-switch input:checked+span::before{opacity:1!important;}

/* Desktop / tablet remains a premium modal, while sharing the same data + controls. */
@media (min-width:768px){
  html body .apd5-region-modal{
    position:fixed!important;
    inset:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:40px!important;
  }
  html body .apd5-region-modal[hidden]{display:none!important;}
  html body .apd5-region-modal .apd5-region-dialog{
    position:relative!important;
    width:min(1040px,calc(100vw - 80px))!important;
    height:min(760px,calc(100dvh - 80px))!important;
    max-width:none!important;
    max-height:none!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    border-radius:24px!important;
  }
  html body .apd5-region-modal .apd5-region-dialog::after{
    content:""!important;
    position:absolute!important;
    top:92px!important;
    left:0!important;
    right:0!important;
    height:1px!important;
    background:#e5e5e5!important;
    pointer-events:none!important;
  }
  html body .apd5-region-modal .apd5-region-close{
    position:absolute!important;
    z-index:4!important;
    left:28px!important;
    top:24px!important;
    width:44px!important;
    height:44px!important;
    font-size:34px!important;
  }
  html body .apd5-region-modal [data-region-panel]{
    position:absolute!important;
    inset:93px 0 0!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    padding:48px 54px 64px!important;
    box-sizing:border-box!important;
  }
  html body .apd5-region-modal [data-region-panel="language"]{padding-top:52px!important;}
  html body .apd5-region-modal h2{
    margin:42px 0 24px!important;
    font-size:26px!important;
    line-height:1.18!important;
    letter-spacing:-.02em!important;
    font-weight:650!important;
  }
  html body .apd5-region-modal [data-region-panel]>h2:first-child{margin-top:0!important;}
  html body .apd5-region-modal .apd5-auto-translate{padding:24px 28px!important;border-radius:16px!important;}
  html body .apd5-region-modal .apd5-auto-translate strong{font-size:18px!important;}
  html body .apd5-region-modal .apd5-auto-translate>div>span:not(.apd490-translate-icon){font-size:17px!important;max-width:620px!important;}
  html body .apd5-region-modal .apd5-switch{width:64px!important;height:36px!important;}
  html body .apd5-region-modal .apd5-switch>span{width:64px!important;height:36px!important;border-radius:999px!important;}
  html body .apd5-region-modal .apd5-switch>span::after{width:30px!important;height:30px!important;left:3px!important;top:3px!important;}
  html body .apd5-region-modal .apd5-switch>span::before{right:11px!important;top:7px!important;font-size:17px!important;}
  html body .apd5-region-modal .apd5-switch input:checked+span::after{transform:translateX(28px)!important;}
  html body .apd5-region-modal :is(.apd5-language-suggested,.apd5-language-all,.apd5-currency-grid){column-gap:34px!important;row-gap:20px!important;}
  html body .apd5-region-modal :is(.apd5-language-option,.apd5-currency-grid button){min-height:78px!important;padding:16px 20px!important;border-radius:12px!important;}
  html body .apd5-region-modal :is(.apd5-language-option,.apd5-currency-grid button) strong{font-size:17px!important;line-height:1.15!important;}
  html body .apd5-region-modal :is(.apd5-language-option,.apd5-currency-grid button) span{font-size:16px!important;line-height:1.2!important;}
}

/* iPhone / mobile reference. */
@media (max-width:767px){
  html body.apd490-region-open{overscroll-behavior:none!important;}
  html body .apd5-region-modal{
    position:fixed!important;
    inset:0!important;
    display:flex!important;
    align-items:flex-end!important;
    justify-content:stretch!important;
    padding:0!important;
    margin:0!important;
    background:transparent!important;
  }
  html body .apd5-region-modal[hidden]{display:none!important;}
  html body .apd5-region-modal .apd5-region-dialog{
    position:relative!important;
    width:100%!important;
    height:92dvh!important;
    max-width:none!important;
    max-height:calc(100dvh - 44px)!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    border-radius:32px 32px 0 0!important;
    transform:translateY(12px)!important;
    opacity:.995!important;
    transition:transform .18s cubic-bezier(.2,.8,.2,1)!important;
  }
  html body .apd5-region-modal.is-open .apd5-region-dialog{transform:translateY(0)!important;}
  html body .apd5-region-modal .apd5-region-dialog::after{
    content:""!important;
    position:absolute!important;
    z-index:3!important;
    top:132px!important;
    left:0!important;
    right:0!important;
    height:1px!important;
    background:#e6e6e6!important;
    pointer-events:none!important;
  }
  html body .apd5-region-modal .apd5-region-close{
    position:absolute!important;
    z-index:5!important;
    left:25px!important;
    top:25px!important;
    width:42px!important;
    height:42px!important;
    padding:0!important;
    font-size:34px!important;
  }
  html body .apd5-region-modal [data-region-panel]{
    position:absolute!important;
    z-index:2!important;
    top:133px!important;
    bottom:0!important;
    left:0!important;
    right:0!important;
    width:100%!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior:contain!important;
    box-sizing:border-box!important;
    background:#fff!important;
    scrollbar-color:#999 transparent!important;
    scrollbar-width:thin!important;
  }
  html body .apd5-region-modal [data-region-panel="language"]{padding:100px 24px 72px!important;}
  html body .apd5-region-modal [data-region-panel="currency"]{padding:52px 24px 72px!important;}

  html body .apd5-region-modal h2{
    margin:48px 0 26px!important;
    color:#222!important;
    font-size:22px!important;
    line-height:1.18!important;
    font-weight:650!important;
    letter-spacing:-.025em!important;
  }
  html body .apd5-region-modal [data-region-panel]>h2:first-child{margin-top:0!important;}
  html body .apd5-region-modal .apd5-language-heading-row{display:block!important;margin:0!important;}
  html body .apd5-region-modal .apd5-language-heading-row h2{margin-top:54px!important;}

  html body .apd5-region-modal .apd5-auto-translate{
    min-height:126px!important;
    padding:20px 18px!important;
    border-radius:14px!important;
  }
  html body .apd5-region-modal .apd5-auto-translate strong{font-size:19px!important;line-height:1.15!important;}
  html body .apd5-region-modal .apd5-auto-translate>div>span:not(.apd490-translate-icon){font-size:17px!important;line-height:1.32!important;max-width:280px!important;}
  html body .apd5-region-modal .apd5-switch{width:62px!important;height:36px!important;}
  html body .apd5-region-modal .apd5-switch>span{width:62px!important;height:36px!important;border-radius:999px!important;}
  html body .apd5-region-modal .apd5-switch>span::after{width:30px!important;height:30px!important;left:3px!important;top:3px!important;}
  html body .apd5-region-modal .apd5-switch>span::before{right:10px!important;top:7px!important;font-size:17px!important;}
  html body .apd5-region-modal .apd5-switch input:checked+span::after{transform:translateX(26px)!important;}

  html body .apd5-region-modal :is(.apd5-language-suggested,.apd5-language-all,.apd5-currency-grid){
    column-gap:18px!important;
    row-gap:22px!important;
    align-items:start!important;
  }
  html body .apd5-region-modal .apd5-language-suggested{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  html body .apd5-region-modal .apd5-language-suggested .apd5-language-option{grid-column:1!important;}
  html body .apd5-region-modal :is(.apd5-language-option,.apd5-currency-grid button){
    min-height:70px!important;
    padding:12px 12px!important;
    border-radius:10px!important;
  }
  html body .apd5-region-modal :is(.apd5-language-option,.apd5-currency-grid button) strong{
    font-size:16px!important;
    line-height:1.15!important;
  }
  html body .apd5-region-modal :is(.apd5-language-option,.apd5-currency-grid button) span{
    font-size:15.5px!important;
    line-height:1.16!important;
  }
  html body .apd5-region-modal .apd5-language-all .apd5-language-option,
  html body .apd5-region-modal .apd5-currency-grid button{
    padding-left:12px!important;
    padding-right:10px!important;
  }

  /* Footer: five controls on one exact baseline, without the old wrap drift. */
  html body .apd24-footer-bottom{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:14px!important;
  }
  html body .apd24-footer-controls{
    order:1!important;
    width:100%!important;
    display:grid!important;
    grid-template-columns:minmax(0,1.55fr) minmax(64px,.72fr) 40px 40px 40px!important;
    align-items:center!important;
    justify-content:stretch!important;
    gap:4px!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
  }
  html body .apd24-footer-legal{order:2!important;margin:0!important;}
  html body .apd10-footer-social{display:contents!important;}
  html body .apd24-footer-control,
  html body .apd10-footer-social a{
    appearance:none!important;
    -webkit-appearance:none!important;
    min-width:0!important;
    height:42px!important;
    min-height:42px!important;
    margin:0!important;
    padding:0 7px!important;
    border:0!important;
    border-radius:999px!important;
    background:transparent!important;
    color:#222!important;
    box-shadow:none!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:7px!important;
    line-height:1!important;
    vertical-align:middle!important;
    text-decoration:none!important;
    transform:none!important;
    -webkit-tap-highlight-color:transparent!important;
    touch-action:manipulation!important;
  }
  html body .apd24-footer-control:first-child{justify-content:flex-start!important;}
  html body .apd24-footer-control .apd5-icon{width:21px!important;height:21px!important;flex:0 0 21px!important;margin:0!important;}
  html body .apd24-footer-control strong{
    min-width:0!important;
    margin:0!important;
    display:inline-flex!important;
    align-items:center!important;
    gap:2px!important;
    color:#222!important;
    font-size:14px!important;
    line-height:1!important;
    font-weight:650!important;
    letter-spacing:0!important;
    white-space:nowrap!important;
  }
  html body .apd10-footer-social a{width:40px!important;padding:0!important;justify-content:center!important;}
  html body .apd10-footer-social a svg{width:20px!important;height:20px!important;margin:0!important;display:block!important;fill:currentColor!important;}
  html body .apd24-footer-control:active,
  html body .apd10-footer-social a:active{background:#ebebeb!important;transform:scale(.96)!important;}
}


/* APD 491 — premium alignment/polish for locale footer controls and mobile sheet. */
html body .apd24-footer-controls{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  row-gap:8px!important;
}
html body .apd10-footer-social{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  margin:0!important;
}
html body .apd24-footer-control,
html body .apd10-footer-social a{
  transition:background-color .16s ease,transform .12s ease,box-shadow .16s ease!important;
}
html body .apd24-footer-control:hover,
html body .apd24-footer-control:focus-visible,
html body .apd10-footer-social a:hover,
html body .apd10-footer-social a:focus-visible{
  background:#f2f2f2!important;
}
html body .apd5-region-modal .apd5-region-dialog{
  border:1px solid rgba(34,34,34,.04)!important;
}
html body .apd5-region-modal :is(.apd5-language-option,.apd5-currency-grid button){
  transition:border-color .16s ease,background-color .16s ease,box-shadow .18s ease,transform .12s ease!important;
}
html body .apd5-region-modal :is(.apd5-language-option,.apd5-currency-grid button):hover{
  background:#fbfbfb!important;
}
html body .apd5-region-modal :is(.apd5-language-option,.apd5-currency-grid button):active{
  transform:scale(.985)!important;
}
html body .apd5-region-modal :is(.apd5-language-option,.apd5-currency-grid button).is-selected{
  border-color:#222!important;
  box-shadow:0 0 0 1px rgba(34,34,34,.04)!important;
}
@media (min-width:768px){
  html body .apd24-footer-controls{justify-content:flex-end!important;gap:10px!important;}
  html body .apd24-footer-control{padding:0 10px!important;min-height:42px!important;height:42px!important;}
  html body .apd10-footer-social a{width:38px!important;height:38px!important;}
}
@media (max-width:767px){
  html body .apd24-footer-bottom{gap:12px!important;}
  html body .apd24-footer-controls{
    width:100%!important;
    justify-content:flex-start!important;
    flex-wrap:nowrap!important;
    gap:10px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    padding-bottom:2px!important;
    scrollbar-width:none!important;
  }
  html body .apd24-footer-controls::-webkit-scrollbar{display:none!important;}
  html body .apd24-footer-control{
    flex:0 0 auto!important;
    height:40px!important;
    min-height:40px!important;
    padding:0 10px!important;
    border-radius:999px!important;
  }
  html body .apd24-footer-control:first-child{justify-content:center!important;}
  html body .apd10-footer-social{margin-left:auto!important;flex:0 0 auto!important;gap:2px!important;}
  html body .apd10-footer-social a{width:38px!important;height:38px!important;flex:0 0 38px!important;}

  html body .apd5-region-modal .apd5-region-dialog{
    height:min(90dvh,900px)!important;
    max-height:min(90dvh,900px)!important;
    border-radius:28px 28px 0 0!important;
    box-shadow:0 18px 48px rgba(0,0,0,.16)!important;
  }
  html body .apd5-region-modal .apd5-region-dialog::after{top:96px!important;background:#ebebeb!important;}
  html body .apd5-region-modal .apd5-region-close{
    left:18px!important;
    top:18px!important;
    width:44px!important;
    height:44px!important;
    font-size:36px!important;
    border-radius:999px!important;
  }
  html body .apd5-region-modal [data-region-panel]{top:97px!important;}
  html body .apd5-region-modal [data-region-panel="language"]{padding:28px 24px 72px!important;}
  html body .apd5-region-modal [data-region-panel="currency"]{padding:28px 24px 72px!important;}
  html body .apd5-region-modal h2{margin:38px 0 20px!important;font-size:20px!important;line-height:1.16!important;}
  html body .apd5-region-modal .apd5-language-heading-row h2{margin-top:42px!important;}
  html body .apd5-region-modal .apd5-auto-translate{min-height:120px!important;padding:20px 18px!important;border-radius:16px!important;}
  html body .apd5-region-modal :is(.apd5-language-suggested,.apd5-language-all,.apd5-currency-grid){column-gap:18px!important;row-gap:18px!important;}
  html body .apd5-region-modal :is(.apd5-language-option,.apd5-currency-grid button){min-height:76px!important;padding:14px 14px!important;border-radius:14px!important;}
}


/* APD 507 — mobile footer parity with the approved Airbnb reference.
   Locale/currency on the first row, socials on the second row, legal copy on the third row. */
@media (max-width:767px){
  html body .apd507-footer-bottom{
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    gap:18px!important;
  }
  html body .apd507-footer-locale{
    width:100%!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    flex-wrap:nowrap!important;
    gap:26px!important;
    overflow:visible!important;
    padding:0!important;
  }
  html body .apd507-footer-locale .apd24-footer-control{
    flex:0 0 auto!important;
    height:auto!important;
    min-height:0!important;
    padding:0!important;
    border-radius:0!important;
    background:transparent!important;
    justify-content:flex-start!important;
  }
  html body .apd507-footer-locale .apd24-footer-control strong{
    font-size:14px!important;
    font-weight:650!important;
  }
  html body .apd507-footer-social{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:18px!important;
    margin:0!important;
  }
  html body .apd507-footer-social a{
    width:40px!important;
    height:40px!important;
    flex:0 0 40px!important;
    background:transparent!important;
  }
  html body .apd507-footer-legal{
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    gap:8px!important;
    margin:0!important;
  }
  html body .apd507-footer-copyright{
    color:#222!important;
    font-size:14px!important;
    line-height:1.35!important;
    font-weight:400!important;
  }
  html body .apd507-footer-legal-links{
    display:flex!important;
    align-items:center!important;
    flex-wrap:wrap!important;
    gap:0 10px!important;
    color:#222!important;
    font-size:14px!important;
    line-height:1.35!important;
  }
  html body .apd507-footer-legal-links a{
    color:#222!important;
    text-decoration:none!important;
  }
}
