/*
Theme Name: WpRentals Child theme
Theme URI: http://themeforest.net/user/wpestate
Description: Ultimate WordPress Theme created by WpEstate for accommodation booking. WpRentals is clean, flexible, fully responsive and retina Ready. Its smart settings allow you to build outstanding renting websites easily and fast.
Version: 3.16.7
Author: wpestate.org
Author URI: http://themeforest.net/user/annapx
Tags: white, one-column, two-columns,left-sidebar, right-sidebar, fluid-layout , custom-menu, theme-options, translation-ready
License: GNU General Public License v2.0
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: wprentals

-------------------------------------------------------------- */

/* Mandatory-field banner: ensure clean text reflow during fade animations */
.submit_mandatory {
  transition: none; /* jQuery handles opacity — avoid CSS fighting it */
  white-space: normal;
  word-break: break-word;
}

/* sign-in / sign-up pages: remove the page-header banner */
.wprentals-auth-page .header_media {
  display: none !important;
}
/* Remove forced min-height so content_wrapper sizes to its content */
.wprentals-auth-page .content_wrapper {
  min-height: 0 !important;
  background: #fff;
}

/* Multi-line price ranges: position in-flow so lines don't overflow into the gallery above */
.listing_type_5 .listing_main_image_price {
  position: relative !important;
  bottom: auto !important;
  left: auto !important;
  width: 100% !important;
  margin-left: 0 !important;
  text-align: right;
  font-size: 22px;
  margin-top: 6px;
  z-index: 50;
}

/* Each rate-type price line */
.wprentals-price-line {
  display: block;
  line-height: 1.5;
}

.wprentals-price-line .wprentals-price-unit {
  font-size: 0.75em;
  font-weight: normal;
}

.wprentals-price-line .wprentals-price-meta {
  font-size: 0.7em;
  font-weight: normal;
  opacity: 0.8;
}

/* Rental Period checkboxes on property submit/edit form */
.wprc-rental-period-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding-top: 6px;
}
.wprc-rental-period-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: normal;
  cursor: pointer;
  margin-bottom: 4px;
}
.wprc-rental-period-label input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
}

/* Hide the "Loading Maps" spinner — map loads in the background regardless */
#gmap-loading {
  display: none !important;
}

/* Mobile top white-space fix.
 *
 * .mobile_header_wrap_sticky_yes adds margin-top:70px to .container to compensate
 * for a position:fixed traditional mobile header. The Elementor Studio header does
 * NOT become fixed (only property_list_half.php makes <header> fixed), so that
 * margin creates a blank 70px gap at the top of every other page on mobile.
 */
@media (max-width: 991px) {
  /* Remove the orphaned sticky-header offset for Studio-header pages that don't
       have a fixed <header> (property_list_half.php is the exception — it DOES
       make <header> position:fixed, so we leave its margin alone). */
  body.wpestate-studio-wrapper-wpestate_template_header:not(
      .page-template-property_list_half
    )
    .mobile_header_wrap_sticky_yes
    .container {
    margin-top: 0 !important;
  }
}

/* Mobile menu: split link text from submenu toggle
 * The parent theme puts the caret as a CSS ::after on <a width:100%>,
 * so clicking anywhere on the row follows the link.
 * We replace it with a real <span> toggle button so the two actions
 * can be handled separately. */
.mobilex-menu li.menu-item-has-children {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}
.mobilex-menu li.menu-item-has-children > a {
  flex: 1 1 0;
  width: auto; /* override the parent theme's width:100% */
  min-width: 0;
}
/* Remove the CSS caret — we have a real toggle button now */
.mobilex-menu .menu-item-has-children > a:after {
  content: none;
}
/* The dedicated toggle button */
.wprc-mobile-sub-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  flex-shrink: 0;
  cursor: pointer;
  color: #000000;
  border-left: 1px solid #555;
  transition: background-color 0.15s;
}
.wprc-mobile-sub-toggle:hover {
  background-color: #e02d39;
  color: #ffffff;
}
.wprc-mobile-sub-toggle i {
  transition: transform 0.2s;
  pointer-events: none;
}
.wprc-mobile-sub-toggle.wprc-open i {
  transform: rotate(180deg);
}
/* Sub-menu must span the full row when it drops open */
.mobilex-menu li.menu-item-has-children > .sub-menu {
  width: 100%;
}

/* Map toggle button */
#openmap {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  background-color: #e02d39 !important;
  color: #fff !important;
  border: none;
  border-radius: 4px;
  padding: 7px 16px !important;
  font-size: 13px !important;
  font-weight: 600;
  cursor: pointer;
  position: relative !important;
  bottom: auto !important;
  right: auto !important;
  float: right;
  margin: 6px 15px 6px 0;
}
#openmap:hover {
  background-color: #c0272f !important;
}
#openmap i {
  margin-right: 0 !important;
}

/* Contact modal subtitle padding */
#contact_owner_modal .modal-title {
  padding-left: 20px;
  padding-right: 20px;
}

/* Hide Login / Sign Up links for logged-out visitors (body class set server-side) */
.user-logged-out #user_menu_u {
  display: none !important;
}

/* Map popup card: price sits just above the title in the gradient area */
.info_details .prop_pricex {
  bottom: 80px;
  top: auto;
  left: 10px;
  right: auto;
  background: rgba(255, 255, 255, 0.92);
  color: #c0392b;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  line-height: 1.5;
  max-width: calc(100% - 20px);
}

/* Give title full width so long names don't collide with anything */
.info_details #infobox_title {
  width: 100%;
  padding: 0 10px;
  left: 0;
}

/* Map cluster markers: replace the broken external image with a solid red circle */
.cluster:empty {
  display: none !important; /* hides ghost empty cluster divs (the "lines") */
}
.cluster img {
  display: none !important; /* hides broken external image */
}
.cluster {
  width: 44px !important;
  height: 44px !important;
  background-color: #e02d39 !important;
  border-radius: 50% !important;
  border: 2px solid rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}
.cluster > div {
  width: 44px !important;
  line-height: 44px !important;
  font-size: 13px !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

/* Map property price labels ("Starts from $X") — red background */
.wpestate_marker {
  background-color: #e02d39 !important;
  color: #ffffff !important;
}
.wpestate_marker:before {
  border-top-color: #e02d39 !important; /* downward arrow matches the label */
}
.wpestate_marker .interior_pin_price {
  color: #ffffff !important;
}
.wpestate_marker:hover {
  background-color: #ffffff !important;
  color: #e02d39 !important;
}
.wpestate_marker:hover:before {
  border-top-color: #ffffff !important;
}
.wpestate_marker:hover .interior_pin_price {
  color: #e02d39 !important;
}

/* Hide filter bar on taxonomy/listing-type archive pages */
.wprc-taxonomy-page .listing_filters_head {
    display: none !important;
}

/* ── Amenity tooltip text inputs (edit/add listing amenities step) ────────── */
.wprc-amenity-wrap {
  margin-bottom: 8px;
}
.wprc-amenity-wrap .wprc-amenity-tooltip {
  display: block;
  width: 100%;
  margin-top: -4px;
  margin-bottom: 6px;
  padding: 3px 7px;
  font-size: 11px;
  border: 1px solid #ddd;
  border-radius: 3px;
  color: #555;
  background: #fafafa;
  box-sizing: border-box;
}
.wprc-amenity-wrap .wprc-amenity-tooltip:focus {
  outline: none;
  border-color: #aaa;
  background: #fff;
}

/* ── Amenity tooltip ? icon on property detail page ─────────────────────── */
.wprc-tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 5px;
  font-size: 17px;
  color: #e02d39 !important;
  cursor: help;
  position: relative;
  vertical-align: middle;
  flex-shrink: 0;
}
.wprc-tooltip-icon::after {
  content: attr(data-wprc-tooltip);
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: normal;
  line-height: 1.4;
  white-space: normal;
  min-width: 160px;
  max-width: 240px;
  z-index: 9999;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
  text-align: left;
}
.wprc-tooltip-icon:hover::after {
  display: block;
}

/* ── Booking form daterangepicker: reserved dates ─────────────────────────── */
/* After the isInvalidDate patch in functions.php, booked dates get 'off disabled'
   (not 'available'), so click events are blocked. These rules ensure the cursor
   also shows as non-clickable for the full reserved range. */
.daterangepicker td.calendar-reserved {
  cursor: not-allowed !important;
  pointer-events: auto !important; /* allow cursor to show; event handler guards the rest */
}

/* ── Back-to-back booking separator: white wedge marks start of a new booking ── */
/* JS in functions.php adds .calendar-booking-transition when two consecutive
   reserved days belong to different booking IDs (no free day between them). */
.booking-calendar td.calendar-reserved.calendar-booking-transition {
  background: linear-gradient(135deg, #ffffff 22%, #e02d39 22%);
}
.booking-calendar td.calendar-reserved.calendar-booking-transition:hover {
  background: linear-gradient(135deg, #f0f0f0 22%, #c0272f 22%);
}

/* ── Calendar changeover day: diagonal split (outgoing red / incoming white) ── */
/* The checkout day of a booking is free for new check-ins.
   It gets the .end_reservation class automatically by the calendar renderers.
   The diagonal shows: top-left triangle = outgoing booking (red),
   bottom-right triangle = available for new guest (white). */

/* Public property page: static PHP calendar */
.booking-calendar td.calendar-free.end_reservation.has_future {
  background: linear-gradient(135deg, #e02d39 50%, #ffffff 50%);
  cursor: pointer;
}
.booking-calendar td.calendar-free.end_reservation.has_future:hover {
  background: linear-gradient(135deg, #c0272f 50%, #f0f0f0 50%);
}

/* Owner edit-listing calendar (allinone dashboard) */
.booking-calendar-wrapper-allinone .calendar-free.end_reservation.has_future {
  background: linear-gradient(135deg, #e02d39 50%, #ffffff 50%);
}

/* Booking daterangepicker picker widget */
.daterangepicker td.end_reservation.available {
  background: linear-gradient(135deg, #e02d39 50%, #ffffff 50%) !important;
  cursor: pointer !important;
}
.daterangepicker td.end_reservation.available:hover {
  background: linear-gradient(135deg, #c0272f 50%, #f0f0f0 50%) !important;
}

/* Hide Pets Allowed field in the Edit/Add Listing → Details section.
   Target the inner col-md-6 that wraps the radio <p> directly, not the outer
   container which also holds Cancellation Policy. */
div.col-md-6:has(> p > [name="pets_allowed"]) {
  display: none !important;
}

/* Hide smoking/pets/party/children allowed items; keep Cancellation Policy visible */
#collapseTerms .smoking_allowed,
#collapseTerms .pets_allowed,
#collapseTerms .party_allowed,
#collapseTerms .children_allowed {
  display: none !important;
}

/* Booking list: check-in / check-out period display */
.wprc-booking-period {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wprc-period-row {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.wprc-period-label {
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.wprc-period-date {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}
.wprc-period-arrow {
  color: #e02d39;
  font-size: 10px;
  margin: 4px 0;
  line-height: 1;
  padding-left: 3em;
}

/* Hide Upload an Id Scan section from My Profile page */
#user-id {
  display: none !important;
}

/* Hide View public profile button from My Profile page */
#view_profile {
  display: none !important;
}

/* Hide favorite icon on cards and property detail page */
.property_unit_action,
.property_unit_action_elementor,
.icon-fav,
.fav_wrapper,
#add_favorites {
  display: none !important;
}

/* All In One Calendar: restore mouse events on every booked date so hover tooltip
   works for the full booking period, not just the check-in date.
   The parent theme sets pointer-events:none on .calendar-reserved and only restores
   auto for .start_reservation (check-in date), which we override here. */
.booking-calendar-wrapper-allinone .calendar-reserved {
  pointer-events: auto !important;
  cursor: default !important;
}

/* Suppress the old inline tooltip — we use #wprc-cal-tip instead */
.booking-calendar-wrapper-allinone .allinone_reservation {
  display: none !important;
}

/* All In One Calendar: fixed-position tooltip that floats above the hovered cell */
#wprc-cal-tip {
  position: fixed;
  z-index: 99999;
  display: none;
  transform: translateY(-100%) translateY(-8px);
  background: #fff;
  border-radius: 5px;
  padding: 8px 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  min-width: 200px;
  font-size: 13px;
  color: #333;
  pointer-events: none;
  line-height: 1.5;
}
