/* Contact The Davis Team */
.flexmls-actions-wrapper button.flexmls-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 10px 14px;                /* Balanced spacing */
    font-size: 0 !important;           /* Completely hides original text layout */
    color: transparent !important;
    text-shadow: none !important;
    pointer-events: auto;
    overflow: hidden;
    border-radius: 6px;
    white-space: nowrap;
    width: fit-content;                /* Shrinks button to match content */
    max-width: 100%;                  /* Prevents overflow on small screens */
    box-sizing: border-box;
}

.flexmls-actions-wrapper button.flexmls-btn-primary::before {
    content: "Contact The Davis Team";
    font-size: 14px;
    font-weight: 600;
    font-family: 'Cinzel', serif;
    background-color: black;
    color: white;
    letter-spacing: 0.3px;
    pointer-events: none;
    text-align: center;
    line-height: 1;
}

.flexmls-primary-color-background {
    background-color: #000000 !important;
}

.back-to-search-link.flexmls-primary-color-font {
    color: #000000 !important;
}

/* Contact The Davis Team Form */
h3.flexmls-primary-color-font {
    font-size: 0;
    position: relative;
    height: 12px;        /* Reduced from 36px */
    margin-bottom: 4px;  /* You can set this lower or even to 0 */
}

h3.flexmls-primary-color-font::after {
    content: "Contact The Davis Team";
    font-size: 21px;
    font-weight: bold;
    color: inherit;
    position: absolute;
    top: 20px;  /* adjust to reposition vertically */
    left: 0;
}

#SendOne {
    color: white !important;
}

/* New Listing Tag Black on Property Cards*/
.flexmls-v2-templates .new-listing-tag, .flexmls-v2-widget .new-listing-tag {
    background: #000000 !important; /* Black background */
    color: #fff !important;
    padding: 8px 20px 5px !important;
    border-radius: 3px !important;
    line-height: 1 !important;
    display: inline-block !important;
    text-transform: uppercase !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

/* Open House Tag Specific Color on Property Cards */
.flexmls-v2-templates .new-listing-tag.open-house, .flexmls-v2-widget .new-listing-tag.open-house {
    background: #bda76e !important; /* Specific color for open-house */
}

/* To hide just the "Profile Edit Review" button on TDT Profile*/
#edit_review {
    display: none !important;
}

/* To hide the entire TDT profile review update wrapper */
.add_review_wrapper {
    display: none !important;
}

/* Hide Review Notice on TDT Profile */
h5.review_notice {
    display: none !important;
}

#login_trigger_modal {
    display: none !important;
}

/* Map Pop-Up text on Mobile forcing scroll */
/* Global styles for .gm-style .gm-style-iw */
.gm-style .gm-style-iw {
    font-weight: 400 !important; /* Makes font weight take precedence */
    font-size: 12px !important; /* Makes font size take precedence */
    overflow: hidden !important; /* Makes overflow take precedence */
}

/* Mobile-specific styles */
@media only screen and (max-width: 650px) {
    .gm-style-iw.gm-style-iw-c {
        max-width: 100vw !important; /* Sets width to 90% of viewport width */
        min-width: 280px !important; /* Ensures a minimum width for readability */
        max-height: none !important; /* Removes max-height restriction for content flow */
        padding: 10px !important; /* Adds padding for better spacing */
    }

    .gm-style-iw-d {
        max-height: none !important; /* Allows content to expand vertically */
        overflow-y: auto !important; /* Enables scrolling if content overflows */
    }
}

/* Flexmls FBS Advanced Search Color Styles */
input[type=checkbox] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #fff;
    border: 3px solid #000000; /* Changed from #e7e7e7 to #000000 */
}



/* Removes the old padding on FBS Contact Form  */
@media (max-width: 768px) {
  #flexmls_connect {
    width: 100% !important; /* Force full width */
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  #flexmls_connect #flexmls_connect__cboxTopLeft,
  #flexmls_connect #flexmls_connect__cboxTopCenter,
  #flexmls_connect #flexmls_connect__cboxTopRight,
  #flexmls_connect #flexmls_connect__cboxMiddleLeft,
  #flexmls_connect #flexmls_connect__cboxMiddleRight,
  #flexmls_connect #flexmls_connect__cboxBottomLeft,
  #flexmls_connect #flexmls_connect__cboxBottomCenter,
  #flexmls_connect #flexmls_connect__cboxBottomRight {
    width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
  }

  #flexmls_connect .choxContent {
    width: 100% !important;
    height: auto !important;
    padding: 10px !important;
    box-sizing: border-box !important;
  }

  #flexmls_connect input,
  #flexmls_connect textarea {
    width: 100% !important;
    padding: 8px !important;
    box-sizing: border-box !important;
  }

  #flexmls_connect textarea {
    height: 100px !important; /* Controlled height */
  }
}

/* Hides the mobile advanced search bar on all archive and category pages. */
.archive #adv-search-header-mobile,
.category #adv-search-header-mobile {
  display: none !important;
}



/* This media query targets devices with a specific screen resolution,
   a pixel ratio of 2, and in a portrait orientation. This is a common
   combination for the iPad 10th generation and other modern iPads. */
@media only screen and (min-width: 820px) and (max-width: 1180px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait) {
  .row.rate-calc-head {
    margin-right: 100px;
  }
}




/* ========================================================= */
/* BASE STYLES: Centering, Padding, and Mobile Max-Width     */
/* ========================================================= */

.jp-relatedposts {
    /* BLOCK CENTERING: Centers the entire section on the page */
    margin-left: auto !important;
    margin-right: auto !important;
    
    /* PADDING: 20px Top/Bottom, 30px Left/Right for small screens */
    padding: 20px 30px 20px 30px !important; 
    
    /* Default max-width for the smallest screens (up to 480px) */
    max-width: 100% !important;
}

/* INNER CONTENT CENTERING (Flexbox and Overrides) - Keeps content centered */
.jp-relatedposts-items-wrapper {
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
}
.jp-relatedposts-items-wrapper .jp-relatedposts-post {
    float: none !important; 
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
}


/* ========================================================= */
/* MEDIA QUERIES: Targeted Width Adjustments                  */
/* (LANDSCAPES ARE NOW SLIGHTLY NARROWER)                    */
/* ========================================================= */

/* 1. Standard Phone/Small Tablet (from 480px up) */
@media (min-width: 480px) {
    .jp-relatedposts {
        max-width: 98% !important;
    }
}

/* 2. iPad 10th Gen (Portrait) / Tablet Portrait (from 820px up) */
@media (min-width: 820px) {
    .jp-relatedposts {
        max-width: 95% !important; 
    }
}

/* 3. iPad Pro 12.9" (Portrait) / Tablet Landscape (from 1024px up) */
@media (min-width: 1024px) {
    .jp-relatedposts {
        max-width: 90% !important; 
    }
}

/* 4. iPad 10th Gen (Landscape) (from 1180px up) */
@media (min-width: 1180px) {
    .jp-relatedposts {
        /* Reduced from 85% to 80% to be slightly narrower for landscape view */
        max-width: 80% !important; 
    }
}

/* 5. Laptop / Small Desktop (Your 1440px setting) */
@media (min-width: 1440px) {
    .jp-relatedposts {
        /* Reduced from 1200px to 1100px to be slightly narrower */
        max-width: 1100px !important; 
        
        /* Reset padding for larger screens to standard 20px left/right */
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

/* 6. Widescreen (1920px and up) */
@media (min-width: 1920px) {
    .jp-relatedposts {
        /* Reduced from 1400px to 1280px */
        max-width: 1280px !important; 
    }
}


/* --- WP Residence Advanced Search Widget Hiding --- */
/*
This rule globally hides the Advanced Search Widget when it appears in a sidebar.
The specific widget ID is targeted to remove the entire block from all pages
where it is placed, such as blog search results.
*/
#advanced_search_widget-1 {
    display: none !important;
}


/* Stop iOS focus-zoom by ensuring 16px+ on inputs */
input,
select,
textarea,
button {
  font-size: 16px !important;
}

/* If your base font is already 16px, ensure search specifically isn’t smaller on mobile */
@media (max-width: 767px) {
  input[type="search"],
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px !important;
    line-height: 1.4;
  }
}




/*
 * Fixes the mobile zoom issue when tapping into the Ivory Search input field.
 * iOS/Safari zooms automatically on input fields with font-size < 16px.
 */
#is-search-input-45422,
.is-search-input {
    font-size: 16px !important;
}
