/*
 Theme Name:   WpResidence child theme
 Theme URI:    https://themeforest.net/item/wp-residence-real-estate-wordpress-theme/7896392
 Description:  WpResidence child theme
 Author:       WpEstate
 Author URI:   http://wpestate.org
 Template:     wpresidence
 * Version:      1.0.48
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
*/

/*=print invoice
--------------------------------------------------------------------------------*/
.invoice_print_title {
    font-size: 25px;
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
    margin-bottom: 5px;
}

/* Property cards: every real cover fills the visual frame without distortion. */
.listing_wrapper .listing-unit-img-wrapper {
  aspect-ratio: 16 / 10;
  overflow: hidden !important;
  background: #f3f5f7;
}

.listing_wrapper .listing-unit-img-wrapper > a,
.listing_wrapper .listing-unit-img-wrapper picture {
  display: block;
  width: 100%;
  height: 100%;
}

.listing_wrapper .listing-unit-img-wrapper .carousel,
.listing_wrapper .listing-unit-img-wrapper .carousel-inner,
.listing_wrapper .listing-unit-img-wrapper .carousel-item > a {
  display: block;
  width: 100%;
  height: 100%;
}

.listing_wrapper .listing-unit-img-wrapper .carousel-item {
  width: 100%;
  height: 100%;
}

.listing_wrapper .listing-unit-img-wrapper img,
.listing_wrapper .listing-unit-img-wrapper picture img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
}

/* Plurihome: stable agency/country row on property cards. */
.listing_wrapper .property_agent_wrapper {
  display: grid !important;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  width: 100%;
  min-height: 40px;
}

.listing_wrapper .property_agent_wrapper .property_agent_image {
  grid-column: 1;
  grid-row: 1;
  margin: 0 !important;
}

.listing_wrapper .property_agent_wrapper .wpestate_card_agent_link {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  margin: 0 !important;
  text-align: left !important;
  justify-self: start;
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.listing_wrapper .property_agent_wrapper .plurihome-property-country {
  grid-column: 3;
  grid-row: 1;
  width: auto;
  min-width: max-content;
  margin: 0 !important;
  text-align: right !important;
  justify-self: end;
  color: #657084;
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
}

/* Plurihome: compact property cards without artificial vertical filler. */
.listing_wrapper {
  display: flex;
}

.listing_wrapper .property_listing {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: auto;
}

.listing_wrapper .property-unit-information-wrapper {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
}

.listing_wrapper .property-unit-information-wrapper > h4,
.listing_wrapper .property_listing > h4 {
  min-height: 48px;
  max-height: 48px;
  margin-bottom: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.listing_wrapper .listing_unit_price_wrapper,
.listing_wrapper .listing-unit-price-wrapper {
  min-height: 0 !important;
  margin-bottom: 0 !important;
}

.listing_wrapper .property_listing_details {
  min-height: 0 !important;
  margin-top: 6px !important;
  padding-top: 6px !important;
  display: flex;
  align-items: center;
}

.listing_wrapper .property_location {
  min-height: 0 !important;
  margin-top: 0 !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.property_agent_wrapper .property_agent_image.plurihome-agency-placeholder {
  background-color: #eef1f5;
  background-image: linear-gradient(135deg, #d8dee7, #f7f8fa) !important;
}

.wpestate_invoice_date{
  font-size: 13px;
}

.wpestate_print_invoice_to_section,
.wpestate_print_invoice_from_whom_section{
  width: 50%;
  float: left;
  margin-top: 45px;
  font-size: 14px;
  margin-bottom: 45px;
  line-height: 1.5em;
}

.wpestate_print_invoice_details_wrapper{
  width: 100%;
  text-align: right;
}

.wpestate_print_invoice_details_detail{
  width: 100%;
  float: left;
  border-bottom: 1px solid #f1f1f1;
  padding: 15px 0px;
  font-size: 13px;
  margin-bottom:0px;
}

.wpestate_print_invoice_details_detail label{
  float:left;
  font-weight: 700;
}

.wpestate_print_invoice_details_wrapper{

}

.wpestate_print_invoice_details_wrapperex_details{
  width: 100%;
  float: left;
  text-align: left;
  margin-top: 30px;
  font-size: 14px;
  line-height: 1.5em;
}

.wpestate_print_invoice_end{
  width: 100%;
  float: left;
  text-align: left;
  margin-top: 30px;
  font-size: 14px;
  line-height: 1.5em;
}

/* Pluricasa: evitar que la hamburguesa reaparezca antes de cerrar el menú lateral */
@media (max-width: 1199.98px) {
  html .mobile_header .mobile-trigger {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transition:
      opacity .12s ease .45s,
      visibility 0s linear .57s !important;
  }

  html.slideout-open .mobile_header .mobile-trigger {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition:
      opacity .12s ease 0s,
      visibility 0s linear .12s !important;
  }
}

/* Plurihome: remove favorite/heart action from public cards. */
.listing_wrapper .fav,
.listing_wrapper .favorite,
.listing_wrapper .icon-fav,
.listing_wrapper .wpestate_fav,
.listing_wrapper .add_favorite,
.listing_wrapper [class*="favourite"],
.listing_wrapper [class*="favorite"] {
  display: none !important;
}


/* Plurihome: property-detail visual cleanup.
 * Keep the parent WPResidence theme untouched.
 */
.single-estate_property #print_page {
  display: none !important;
}

/* Remove the vertical thumbnail rail while preserving WPResidence arrow controls. */
.single-estate_property #carousel-indicators-vertical {
  display: none !important;
}

/* Reclaim the thumbnail-rail width for the main property image. */
.single-estate_property .wpestate_property_carousel.carouselvertical,
.single-estate_property .wpestate_property_carousel.carouselvertical #property_slider_carousel {
  width: 100% !important;
  max-width: 100% !important;
}

/* Keep agency/agent logos visually contained inside the contact-card logo box. */
.single-estate_property .agent_contanct_form_sidebar .agent_unit_widget_sidebar {
  box-sizing: border-box;
  padding: 6px;
  overflow: hidden;
  background-size: contain !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-origin: content-box;
}

.single-estate_property .agent_contanct_form_sidebar .agent_unit_widget_sidebar img,
.single-estate_property .agent_contanct_form_sidebar img.agent_unit_widget_sidebar {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  box-sizing: border-box;
}


/* Plurihome: property-detail title layout.
 * Keep the location between title and Share, with the price isolated on the right.
 */
.single-estate_property .wpresidence_property_page_title_area {
  margin-bottom: 12px !important;
}

.single-estate_property .plurihome-property-title-location {
  display: flex;
  align-items: center;
  gap: 6px;
  width: auto;
  min-width: 0;
  margin: 0;
  color: #26364a;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  clear: both;
}

.single-estate_property .plurihome-property-title-location svg {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  color: #02244A;
}

.single-estate_property .plurihome-property-title-location span {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (min-width: 768px) {
  .single-estate_property .wpresidence_property_page_title_area {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto 102px;
    grid-template-areas:
      "labels labels labels"
      "title price ."
      "location . ."
      "social . .";
    column-gap: 16px;
    row-gap: 6px;
    align-items: start !important;
  }

  .single-estate_property .wpresidence_property_page_title_area .single_property_labels {
    grid-area: labels;
    width: auto !important;
    margin: 0 !important;
  }

  .single-estate_property .wpresidence_property_page_title_area .entry-title.entry-prop {
    grid-area: title;
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
  }

  .single-estate_property .wpresidence_property_page_title_area .price_area {
    grid-area: price;
    width: auto !important;
    margin: 0 !important;
    justify-self: end;
    align-self: center;
    white-space: nowrap;
  }

  .single-estate_property .wpresidence_property_page_title_area .plurihome-property-title-location {
    grid-area: location;
    clear: none;
    justify-self: start;
    align-self: start;
  }

  .single-estate_property .wpresidence_property_page_title_area .prop_social {
    grid-area: social;
    width: auto !important;
    margin: 0 !important;
    justify-self: start;
    align-self: start;
  }
}

@media (max-width: 767px) {
  .single-estate_property .plurihome-property-title-location {
    width: 100%;
    margin: 4px 0 8px;
  }
}


/* Plurihome: compact advanced-search result controls into one visual toolbar.
 * Real WPResidence elements confirmed in production:
 * - .search_unit_wrapper.advanced_search_notice
 * - .saved_search_wrapper
 * - .adv_listing_filters_head.advanced_filters (advanced-search results)
 * - .listing_filters_head (fallback on other WPResidence result layouts)
 *
 * The search-parameter notice is intentionally removed from this UI.
 * Save-search and filter/view controls share the same toolbar.
 * Anonymous visitors see a protected Save search button that opens a login-required modal.
 */
.plurihome-search-results-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: "save filters";
  align-items: center;
  gap: 24px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 16px !important;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #edf0f4;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(2, 36, 74, 0.05);
}

.plurihome-search-results-toolbar .saved_search_wrapper {
  grid-area: save;
}

.plurihome-search-results-toolbar .adv_listing_filters_head.advanced_filters,
.plurihome-search-results-toolbar .listing_filters_head {
  grid-area: filters;
}

.plurihome-search-results-toolbar .saved_search_wrapper,
.plurihome-search-results-toolbar .adv_listing_filters_head.advanced_filters,
.plurihome-search-results-toolbar .listing_filters_head {
  float: none !important;
  width: 100% !important;
  min-width: 0;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.plurihome-search-results-toolbar .saved_search_wrapper {
  display: grid !important;
  grid-template-columns: auto minmax(150px, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.plurihome-search-results-toolbar #save_search_notice {
  min-width: 0;
  margin: 0 !important;
  color: #26364a;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plurihome-search-results-toolbar .saved_search_wrapper.plurihome-save-search-feedback {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.plurihome-search-results-toolbar .saved_search_wrapper.plurihome-save-search-feedback #save_search_notice {
  grid-column: 1 / -1;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

.plurihome-search-results-toolbar .saved_search_wrapper.plurihome-save-search-feedback #search_name {
  grid-column: 1;
}

.plurihome-search-results-toolbar .saved_search_wrapper.plurihome-save-search-feedback #save_search_button {
  grid-column: 2;
}

.plurihome-search-results-toolbar #search_name {
  width: 100% !important;
  min-width: 0;
  height: 38px !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 0 11px !important;
  border: 1px solid #d9e0e8 !important;
  border-radius: 6px !important;
  background: #f8fafc !important;
  box-shadow: none !important;
  font-size: 13px !important;
}

.plurihome-search-results-toolbar #save_search_button,
.plurihome-search-results-toolbar .plurihome-save-search-login-required {
  width: auto !important;
  min-width: 144px;
  height: 38px !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 0 16px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: #02244A !important;
  color: #ffffff !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 38px !important;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}

.plurihome-search-results-toolbar .plurihome-save-search-login-required:hover,
.plurihome-search-results-toolbar .plurihome-save-search-login-required:focus-visible {
  background: #0b3767 !important;
}

body:not(.logged-in) .plurihome-search-results-toolbar .saved_search_wrapper {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
}

.plurihome-search-results-toolbar .adv_listing_filters_head.advanced_filters,
.plurihome-search-results-toolbar .listing_filters_head {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  overflow: visible !important;
}

.plurihome-search-results-toolbar .adv_listing_filters_head.advanced_filters .listing_filter_select,
.plurihome-search-results-toolbar .adv_listing_filters_head.advanced_filters .filter_menu_trigger,
.plurihome-search-results-toolbar .listing_filters_head .listing_filter_select,
.plurihome-search-results-toolbar .listing_filters_head .filter_menu_trigger {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.plurihome-search-results-toolbar .adv_listing_filters_head.advanced_filters .filter_menu_trigger,
.plurihome-search-results-toolbar .listing_filters_head .filter_menu_trigger {
  min-height: 38px;
  line-height: 38px;
}

.plurihome-search-results-toolbar-empty {
  display: none !important;
}

/* Anonymous Save search protection modal. */
.plurihome-save-search-modal[hidden] {
  display: none !important;
}

.plurihome-save-search-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 20px;
  background: rgba(2, 36, 74, 0.52);
}

.plurihome-save-search-modal__dialog {
  position: relative;
  width: min(440px, 100%);
  box-sizing: border-box;
  padding: 28px 28px 24px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(2, 36, 74, 0.22);
  color: #17263a;
}

.plurihome-save-search-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #506074;
  font-size: 28px;
  font-weight: 400;
  line-height: 36px;
  cursor: pointer;
}

.plurihome-save-search-modal__title {
  margin: 0 38px 10px 0;
  color: #02244A;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
}

.plurihome-save-search-modal__text {
  margin: 0 0 20px;
  color: #506074;
  font-size: 15px;
  line-height: 1.55;
}

.plurihome-save-search-modal__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 7px;
  background: #02244A;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.plurihome-save-search-modal__action:hover,
.plurihome-save-search-modal__action:focus-visible {
  background: #0b3767;
}

body.plurihome-save-search-modal-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .plurihome-search-results-toolbar {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "save"
      "filters";
    gap: 0;
    padding: 0;
    overflow: visible;
    border-radius: 10px;
  }

  .plurihome-search-results-toolbar .saved_search_wrapper {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px !important;
  }

  .plurihome-search-results-toolbar .saved_search_wrapper.plurihome-save-search-feedback {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .plurihome-search-results-toolbar #save_search_notice {
    grid-column: 1 / -1;
  }

  .plurihome-search-results-toolbar #save_search_button {
    min-width: 128px;
  }

  body:not(.logged-in) .plurihome-search-results-toolbar .saved_search_wrapper {
    display: flex !important;
    padding: 12px !important;
  }

  body:not(.logged-in) .plurihome-search-results-toolbar .plurihome-save-search-login-required {
    width: 100% !important;
  }

  /*
   * Keep the native WPResidence filter dropdown usable:
   * its menu must be allowed to extend outside the compact toolbar.
   * The visible filter row is intentionally the same 38px height
   * as the Save search button.
   */
  .plurihome-search-results-toolbar .adv_listing_filters_head.advanced_filters,
  .plurihome-search-results-toolbar .listing_filters_head {
    justify-content: space-between;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 14px !important;
    border-top: 1px solid #edf0f4 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  .plurihome-search-results-toolbar .adv_listing_filters_head.advanced_filters .listing_filter_select,
  .plurihome-search-results-toolbar .listing_filters_head .listing_filter_select {
    height: 38px !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    overflow: visible !important;
  }

  .plurihome-search-results-toolbar .adv_listing_filters_head.advanced_filters .filter_menu_trigger,
  .plurihome-search-results-toolbar .listing_filters_head .filter_menu_trigger {
    height: 38px !important;
    min-height: 38px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 38px !important;
  }

  .plurihome-search-results-toolbar .adv_listing_filters_head.advanced_filters .dropdown-menu,
  .plurihome-search-results-toolbar .listing_filters_head .dropdown-menu {
    z-index: 10050 !important;
  }

  .plurihome-save-search-modal {
    padding: 16px;
  }

  .plurihome-save-search-modal__dialog {
    padding: 24px 22px 20px;
  }

  .plurihome-save-search-modal__title {
    font-size: 19px;
  }
}
