/* APD 325 — final iPhone mobile-search single-owner layer. */
@media (max-width: 767px) {
  /* Never display the collapsed Lugar card while the actual ¿Dónde? panel is open. */
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal
  #apd5-search[data-active-panel="location"] > [data-search-field="location"],
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open.apd325-location-open .apd186-search-portal
  #apd5-search > [data-search-field="location"] {
    display:none !important;
    visibility:hidden !important;
    height:0 !important;
    min-height:0 !important;
    margin:0 !important;
    padding:0 !important;
    pointer-events:none !important;
  }

  /* Stable ¿Dónde? card: same header before/while editing, no layout jump. */
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal
  #apd5-search .apd5-location-panel {
    padding:22px 24px 22px !important;
    border-radius:29px !important;
    max-height:min(60dvh, 545px) !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal
  #apd5-search .apd5-location-panel > .apd5-panel-title {
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    position:static !important;
    margin:0 5px 18px !important;
    padding:4px 0 0 !important;
    background:transparent !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal
  #apd5-search .apd5-location-panel > .apd5-panel-title > strong {
    display:block !important;
    color:#171717 !important;
    font-size:30px !important;
    line-height:1.05 !important;
    font-weight:700 !important;
    letter-spacing:-.04em !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal
  #apd5-search .apd5-location-panel > .apd5-panel-title > button { display:none !important; }

  /* One destination input and one X only. */
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal
  #apd5-search .apd5-panel-filter {
    position:relative !important;
    display:flex !important;
    align-items:center !important;
    width:100% !important;
    height:58px !important;
    min-height:58px !important;
    margin:0 0 15px !important;
    padding:0 56px 0 52px !important;
    border:1.45px solid #2b2b2b !important;
    border-radius:17px !important;
    background:#fff !important;
    box-shadow:none !important;
    overflow:visible !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal
  #apd5-search .apd5-panel-filter > svg { display:none !important; }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal
  #apd5-search .apd5-panel-filter::before {
    content:'' !important;
    position:absolute !important;
    left:22px !important;
    top:50% !important;
    width:18px !important;
    height:18px !important;
    transform:translateY(-58%) !important;
    border:2.15px solid #222 !important;
    border-radius:50% !important;
    pointer-events:none !important;
    z-index:2 !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal
  #apd5-search .apd5-panel-filter::after {
    content:'' !important;
    position:absolute !important;
    left:37px !important;
    top:calc(50% + 7px) !important;
    width:8px !important;
    height:2px !important;
    background:#222 !important;
    transform:rotate(45deg) !important;
    transform-origin:left center !important;
    border-radius:2px !important;
    pointer-events:none !important;
    z-index:2 !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal
  #apd5-search #apd5-destination-filter {
    width:100% !important;
    min-width:0 !important;
    padding:0 !important;
    border:0 !important;
    outline:0 !important;
    background:transparent !important;
    color:#222 !important;
    font-size:17px !important;
    line-height:1.2 !important;
    font-weight:450 !important;
  }
  html body.apd325-mobile-search-airbnb-parity #apd5-destination-filter::-webkit-search-cancel-button,
  html body.apd325-mobile-search-airbnb-parity #apd26-location-inline-input::-webkit-search-cancel-button {
    -webkit-appearance:none !important;
    appearance:none !important;
    display:none !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal
  #apd5-search .apd325-location-clear {
    position:absolute !important;
    right:10px !important;
    top:50% !important;
    transform:translateY(-50%) !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:38px !important;
    height:38px !important;
    min-width:38px !important;
    border:0 !important;
    border-radius:18px !important;
    background:#efefef !important;
    color:#222 !important;
    font-size:20px !important;
    line-height:1 !important;
    box-shadow:none !important;
    z-index:7 !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal
  #apd5-search .apd325-location-clear[hidden] { display:none !important; }

  /* Collapsed Lugar row: one left label + one persistent committed value. */
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal
  #apd5-search > [data-search-field="location"] > button:first-child {
    display:flex !important;
    align-items:center !important;
    width:100% !important;
    min-width:0 !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal
  #apd5-search > [data-search-field="location"] > button:first-child > span:first-child {
    display:block !important;
    flex:0 0 auto !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal
  #apd5-search > [data-search-field="location"] > button:first-child > #apd5-location-summary,
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal
  #apd5-search > [data-search-field="location"] > button:first-child > .apd26-compact-summary,
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal
  #apd5-search > [data-search-field="location"] > button:first-child > .apd223-location-value,
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal
  #apd5-search > [data-search-field="location"] > button:first-child > .apd26-search-leading-icon {
    display:none !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal
  #apd5-search .apd325-location-value {
    display:none !important;
    margin-left:auto !important;
    max-width:calc(100% - 105px) !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
    color:#171717 !important;
    font-size:16.5px !important;
    line-height:1.2 !important;
    font-weight:650 !important;
    letter-spacing:-.02em !important;
    text-align:right !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal
  #apd5-search > [data-search-field="location"].apd325-has-location .apd325-location-value { display:block !important; }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal
  #apd5-search > [data-search-field="location"] > button:first-child::after { content:none !important; display:none !important; }

  /* Date card always leaves physical room for exact/flexible chips above footer. */
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal
  #apd5-search[data-active-panel="dates"] > [data-search-panel="dates"] {
    padding-bottom:30px !important;
    margin-bottom:14px !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal
  #apd5-search[data-active-panel="dates"] .apd15-date-view[data-apd-date-view="exact"] {
    padding-bottom:12px !important;
    overflow:visible !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal
  #apd5-search[data-active-panel="dates"] .apd15-date-flexibility {
    position:relative !important;
    z-index:2 !important;
    margin-top:12px !important;
    padding:10px 0 12px !important;
    min-height:60px !important;
    flex:0 0 auto !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal
  #apd5-search[data-active-panel="dates"] .apd15-date-flexibility > button {
    flex:0 0 auto !important;
    height:40px !important;
    min-height:40px !important;
    padding:0 17px !important;
    border-radius:999px !important;
    font-size:15px !important;
    line-height:38px !important;
    white-space:nowrap !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal
  #apd5-search[data-active-panel="dates"] .apd15-date-view[data-apd-date-view="flexible"] {
    max-height:none !important;
    overflow:visible !important;
    padding-bottom:8px !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal
  #apd5-search .apd15-flexible-duration {
    display:grid !important;
    grid-template-columns:minmax(0,1.55fr) minmax(0,1.04fr) minmax(0,.82fr) !important;
    gap:10px !important;
    width:100% !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal
  #apd5-search .apd15-flexible-duration > button {
    width:100% !important;
    min-width:0 !important;
    padding:0 8px !important;
    font-size:14px !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
  }

  /* Footer base geometry. APD 325 hard-ownership rules below paint one resilient label. */
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd176-mobile-footer:not([hidden]) {
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    min-height:86px !important;
    padding:12px 16px calc(14px + env(safe-area-inset-bottom, 0px)) !important;
    gap:14px !important;
    background:linear-gradient(180deg, rgba(247,247,247,0) 0%, #f7f7f7 22%) !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd176-mobile-footer .apd176-footer-primary::before,
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd176-mobile-footer .apd176-footer-primary::after,
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd176-mobile-footer .apd176-footer-reset::before,
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd176-mobile-footer .apd176-footer-reset::after {
    content:none !important;
    display:none !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd176-mobile-footer .apd176-footer-reset {
    flex:0 0 auto !important;
    min-width:max-content !important;
    padding:12px 4px !important;
    background:transparent !important;
    color:#171717 !important;
    font-size:17px !important;
    line-height:1 !important;
    font-weight:650 !important;
    text-decoration:none !important;
    text-underline-offset:0 !important;
    white-space:nowrap !important;
    opacity:1 !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd176-mobile-footer .apd176-footer-primary,
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd176-mobile-footer .apd176-footer-primary.is-final-step,
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd176-mobile-footer .apd176-footer-primary.apd212-next-action,
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd176-mobile-footer .apd176-footer-primary.apd212-search-action {
    flex:0 1 146px !important;
    width:auto !important;
    min-width:138px !important;
    max-width:166px !important;
    height:58px !important;
    min-height:58px !important;
    margin:0 !important;
    padding:0 20px !important;
    border:0 !important;
    border-radius:17px !important;
    background-image:none !important;
    color:#fff !important;
    font-size:17px !important;
    line-height:1 !important;
    font-weight:700 !important;
    box-shadow:none !important;
    opacity:1 !important;
    text-shadow:none !important;
    transition:none !important;
    animation:none !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:8px !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd176-mobile-footer .apd176-footer-primary.apd325-next {
    background:#222 !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd176-mobile-footer .apd176-footer-primary.apd325-final {
    background:#e31c5f !important;
    box-shadow:0 8px 20px rgba(227,28,95,.18) !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd176-mobile-footer .apd176-footer-primary:disabled {
    opacity:.45 !important;
    box-shadow:none !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd176-mobile-footer .apd325-footer-icon {
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:18px !important;
    height:18px !important;
    flex:0 0 18px !important;
    color:#fff !important;
    font-size:0 !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd176-mobile-footer .apd325-footer-icon:empty {
    display:none !important;
    width:0 !important;
    flex-basis:0 !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd176-mobile-footer .apd325-footer-icon svg {
    display:block !important;
    width:18px !important;
    height:18px !important;
    max-width:none !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd176-mobile-footer .apd325-footer-label {
    display:block !important;
    color:#fff !important;
    font-size:17px !important;
    line-height:1 !important;
    font-weight:700 !important;
    white-space:nowrap !important;
  }

  /* The scrollable form must finish above the fixed footer on Safari. */
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open .apd186-search-portal #apd5-search {
    padding-bottom:calc(132px + env(safe-area-inset-bottom, 0px)) !important;
    scroll-padding-bottom:calc(132px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Never let a legacy action layer paint another Buscar/Siguiente. */
  html body.apd325-mobile-search-airbnb-parity .apd194-mobile-search-sheet,
  html body.apd325-mobile-search-airbnb-parity .apd302-footer-label { display:none !important; }

  /* APD 325 hard ownership: survive APD 218's older high-specificity CTA CSS. */
  html body.apd218-mobile-services.apd325-mobile-search-airbnb-parity.apd186-search-modal-open
  .apd186-search-portal #apd5-search > [data-search-field="location"].apd325-has-location > button:first-child::after {
    content:attr(data-apd325-location) !important;
    display:block !important;
    margin-left:auto !important;
    max-width:calc(100% - 105px) !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
    color:#171717 !important;
    font-size:16.5px !important;
    line-height:1.2 !important;
    font-weight:650 !important;
    letter-spacing:-.02em !important;
    text-align:right !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open
  .apd186-search-portal #apd5-search > [data-search-field="location"].apd325-has-location > button:first-child::after {
    content:attr(data-apd325-location) !important;
    display:block !important;
    margin-left:auto !important;
    max-width:calc(100% - 105px) !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
    color:#171717 !important;
    font-size:16.5px !important;
    line-height:1.2 !important;
    font-weight:650 !important;
    letter-spacing:-.02em !important;
    text-align:right !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open
  .apd186-search-portal #apd5-search .apd325-location-value {
    display:none !important;
  }

  html body.apd218-mobile-services.apd325-mobile-search-airbnb-parity.apd186-search-modal-open
  .apd176-mobile-footer .apd176-footer-reset,
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open
  .apd176-mobile-footer .apd176-footer-reset {
    color:#171717 !important;
    font-size:17px !important;
    line-height:1 !important;
    font-weight:650 !important;
    text-decoration:none !important;
    background:transparent !important;
  }
  html body.apd218-mobile-services.apd325-mobile-search-airbnb-parity.apd186-search-modal-open
  .apd176-mobile-footer .apd176-footer-reset::before,
  html body.apd218-mobile-services.apd325-mobile-search-airbnb-parity.apd186-search-modal-open
  .apd176-mobile-footer .apd176-footer-reset::after {
    content:none !important;
    display:none !important;
  }

  html body.apd218-mobile-services.apd325-mobile-search-airbnb-parity.apd186-search-modal-open
  .apd176-mobile-footer .apd176-footer-primary,
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open
  .apd176-mobile-footer .apd176-footer-primary {
    position:relative !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:8px !important;
    font-size:0 !important;
    color:transparent !important;
    background-image:none !important;
    padding-left:20px !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open
  .apd176-mobile-footer .apd176-footer-primary > * {
    display:none !important;
  }
  html body.apd218-mobile-services.apd325-mobile-search-airbnb-parity.apd186-search-modal-open
  .apd176-mobile-footer .apd176-footer-primary::after,
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open
  .apd176-mobile-footer .apd176-footer-primary::after {
    content:attr(data-apd325-label) !important;
    display:inline-block !important;
    color:#fff !important;
    font-size:17px !important;
    line-height:1 !important;
    font-weight:700 !important;
    white-space:nowrap !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open.apd325-primary-final
  .apd176-mobile-footer .apd176-footer-primary::before {
    content:"" !important;
    display:block !important;
    width:18px !important;
    height:18px !important;
    flex:0 0 18px !important;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='6.8'/%3E%3Cpath d='m16 16 4.5 4.5'/%3E%3C/svg%3E") !important;
    background-repeat:no-repeat !important;
    background-size:18px 18px !important;
    background-position:center !important;
  }
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open.apd325-primary-next
  .apd176-mobile-footer .apd176-footer-primary::before {
    content:none !important;
    display:none !important;
  }
  html body.apd218-mobile-services.apd325-mobile-search-airbnb-parity.apd186-search-modal-open.apd325-primary-next
  .apd176-mobile-footer .apd176-footer-primary,
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open.apd325-primary-next
  .apd176-mobile-footer .apd176-footer-primary {
    background:#222 !important;
    background-image:none !important;
    color:transparent !important;
    box-shadow:none !important;
  }
  html body.apd218-mobile-services.apd325-mobile-search-airbnb-parity.apd186-search-modal-open.apd325-primary-final
  .apd176-mobile-footer .apd176-footer-primary,
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open.apd325-primary-final
  .apd176-mobile-footer .apd176-footer-primary {
    background:#e31c5f !important;
    background-image:none !important;
    color:transparent !important;
    box-shadow:0 8px 20px rgba(227,28,95,.18) !important;
  }
  html body.apd218-mobile-services.apd325-mobile-search-airbnb-parity.apd186-search-modal-open
  .apd176-mobile-footer .apd176-footer-primary:disabled,
  html body.apd325-mobile-search-airbnb-parity.apd186-search-modal-open
  .apd176-mobile-footer .apd176-footer-primary:disabled {
    background:#222 !important;
    opacity:.42 !important;
    box-shadow:none !important;
  }

}
