/*
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.14
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

-------------------------------------------------------------- */

/* ==========================================================================
   GLOBAL — translator (gtranslate) sempre top:20vh fixed right em TODA pagina
   ========================================================================== */
#gt_float_wrapper,
.gt_float_switcher,
.gtranslate_wrapper {
    position: fixed !important;
    top: 20vh !important;
    right: 0 !important;
    z-index: 9999 !important;
}

/* === Hide owner avatar on home property cards === */
body.home .property_listing .owner_thumb { display: none !important; }

/* ==========================================================================
   ABOUT (page 37342) — replicar EXATAMENTE Maldives spacing
   - Containers verdes: max-width 1321 + margin lateral 100px (não full-bleed)
   - Espaço última seção -> footer = metade do espaço entre seções
   ========================================================================== */
body.page-id-37342 .e-con.e-parent {
    max-width: 1321px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
body.page-id-37342 .content_wrapper {
    padding-left: 0 !important;
    padding-right: 0 !important;
}
body.page-id-37342 .content_wrapper .row.content-fixed > .col-md-12 {
    padding-left: 0 !important;
    padding-right: 0 !important;
}
/* Espaço entre seções uniforme: 48px (já é o default) */
body.page-id-37342 .e-con.e-parent + .e-con.e-parent {
    margin-top: 48px !important;
}
/* Última seção -> footer = metade do espaço entre seções (24px) */
body.page-id-37342 .e-con.e-parent:last-of-type {
    margin-bottom: 24px !important;
}
body.page-id-37342 .content_wrapper {
    padding-bottom: 0 !important;
}

/* ==========================================================================
   GLOBAL — breadcrumb transparente em archives + page templates específicos
   (preservando default do tema em outras páginas)
   ========================================================================== */
body.blog ol.breadcrumb,
body.archive ol.breadcrumb,
body.page-template-contact_page ol.breadcrumb,
body.page-template-property_list_half ol.breadcrumb,
body.blog .breadcrumb_container,
body.archive .breadcrumb_container,
body.page-template-contact_page .breadcrumb_container,
body.page-template-property_list_half .breadcrumb_container {
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* ==========================================================================
   BLOG LIST — 2 cards/linha (Maldives parity), preserva sidebar nativa
   Aplica em body.blog (archive) e body.page-template-blog_list
   ========================================================================== */
body.blog .blog_list_wrapper,
body.page-template-blog_list .blog_list_wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 24px !important;
    padding: 24px 0 !important;
    grid-template-columns: none !important;
}
body.blog .blog_list_wrapper > .col-md-4,
body.blog .blog_list_wrapper > .col-md-6,
body.page-template-blog_list .blog_list_wrapper > .col-md-4,
body.page-template-blog_list .blog_list_wrapper > .col-md-6 {
    flex: 0 0 calc(50% - 12px) !important;
    max-width: calc(50% - 12px) !important;
    width: auto !important;
    margin: 0 !important;
    float: none !important;
}
@media (max-width: 768px) {
    body.blog .blog_list_wrapper > .col-md-4,
    body.blog .blog_list_wrapper > .col-md-6,
    body.page-template-blog_list .blog_list_wrapper > .col-md-4,
    body.page-template-blog_list .blog_list_wrapper > .col-md-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}
body.blog .blog_unit_back,
body.blog .blog_unit_wrapper,
body.page-template-blog_list .blog_unit_back,
body.page-template-blog_list .blog_unit_wrapper {
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding-bottom: 15px;
    height: 100%;
    transition: box-shadow 0.18s ease;
}
body.blog .blog_unit_back:hover,
body.page-template-blog_list .blog_unit_back:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}
body.blog .blog_unit_back img,
body.page-template-blog_list .blog_unit_back img {
    width: 100% !important;
    aspect-ratio: 16/10;
    object-fit: cover;
    display: block;
}

/* ==========================================================================
   BLOG POST (single) — fix texto vazando + sidebar buttons centralizados
   ========================================================================== */
body.single-post .single-content,
body.single-post article .entry-content {
    padding: 24px 32px !important;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
}
body.single-post .col-md-8 {
    padding-left: 24px;
    padding-right: 24px;
}
body.single-post #sidebar .widget,
body.single-post aside .widget {
    margin-bottom: 24px;
}
body.single-post #sidebar .widget a.button,
body.single-post #sidebar .widget button,
body.single-post #sidebar .button,
body.single-post aside .widget a.button {
    display: block;
    border-radius: 8px;
    padding: 10px 16px;
    text-align: center;
    border: 1px solid #d8e3df;
    background: #fff;
    color: #1c2724;
    text-decoration: none;
    margin-bottom: 8px;
}
body.single-post #sidebar .widget a.button:hover {
    background: #6db5aa;
    color: #fff;
    border-color: #6db5aa;
}

/* ==========================================================================
   PROPERTIES LIST HALF-MAP — filter bar parity Maldives + remove shadow bug
   ========================================================================== */

/* v7l: Card type-line "Rental Type / Cidade" — uniformizar com .category_tagline
   (14px, mesmo font/cor). User: legivel, padronizado. */
body.page-template-property_list_half .lw-card-type-line,
body.archive .lw-card-type-line,
.property_listing .lw-card-type-line,
.listing_wrapper .lw-card-type-line {
    display: block !important;
    font-size: 14px !important;
    color: #5b6470 !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    /* v7n: margin-left 0 pra alinhar com title/tagline (que ficam em x:31) */
    margin: 4px 0 !important;
    line-height: 1.4 !important;
    font-family: 'Manrope', sans-serif !important;
}

/* v7m 2026-05-12: card so 4 linhas (titulo, type-line, hospedes, preco).
   Tema render 2x .category_tagline: a 1a tem .actions_icon e contem
   "Casa inteira" (duplica Rental Type), a 2a contem hospedes/quartos.
   Esconder so a com .actions_icon. */
.listing_wrapper .category_tagline.actions_icon,
.property_listing .category_tagline.actions_icon {
    display: none !important;
}

/* Owner thumb fora do card no half-map (mesmo do home) */
body.page-template-property_list_half .property_listing .owner_thumb {
    display: none !important;
}

/* Filter bar: campos arredondados + ícones bem posicionados */
body.page-template-property_list_half .advanced_search_form_wrapper {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
body.page-template-property_list_half .advanced_search_form_wrapper input[type="text"],
body.page-template-property_list_half .advanced_search_form_wrapper input[type="search"],
body.page-template-property_list_half .advanced_search_form_wrapper select,
body.page-template-property_list_half .advanced_search_form_wrapper .form-control {
    border-radius: 8px !important;
    border: 1px solid #d8e3df !important;
    padding: 10px 14px 10px 38px !important;
    height: 42px;
    font-family: inherit;
}
body.page-template-property_list_half .advanced_search_form_wrapper .custom_icon_class_icon {
    position: absolute !important;
    left: 28px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #6a7975;
    z-index: 2;
    pointer-events: none;
}
body.page-template-property_list_half .advanced_search_form_wrapper > form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
body.page-template-property_list_half .advanced_search_form_wrapper > form > div {
    position: relative;
    flex: 1 1 200px;
}
body.page-template-property_list_half .advanced_search_submit_button {
    border-radius: 8px !important;
    padding: 10px 20px !important;
    background: #6db5aa !important;
    color: #fff !important;
    border: 0 !important;
    height: 42px;
}

/* Dropdowns (UP) — cantos arredondados + padding interno + sombra suave */
body.page-template-property_list_half .advanced_select_options.LW_DROPUP,
body.page-template-property_list_half .twitter-typeahead .tt-menu,
body.page-template-property_list_half .multiselect_dropdown,
body.page-template-property_list_half .selectpicker .dropdown-menu {
    bottom: calc(100% + 8px) !important;
    top: auto !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
    padding: 12px !important;
    border: 0 !important;
    background: #fff !important;
}
body.page-template-property_list_half .ui-autocomplete {
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
    padding: 12px !important;
    border: 0 !important;
    background: #fff !important;
}
body.page-template-property_list_half .advanced_select_options li,
body.page-template-property_list_half .ui-autocomplete li,
body.page-template-property_list_half .selectpicker .dropdown-menu li {
    padding: 8px 12px !important;
    border-radius: 6px;
}
body.page-template-property_list_half .advanced_select_options li:hover {
    background: #f0f7f5;
}

/* ==========================================================================
   Bug 2+3 (2026-05-12): margens entre filters_head, h1 e grid para 1o card
   nao ficar visualmente "colado" na ordenacao.
   Diagnostico: nao havia overlap real, era falta de respiro vertical.
   ========================================================================== */
body.page-template-property_list_half .wprentals_adv_listing_filters_head {
    margin-bottom: 16px;
    justify-content: space-between;
    align-items: center;
}
body.page-template-property_list_half #listing_ajax_container {
    margin-top: 12px;
}
body.page-template-property_list_half #listing_ajax_container > h1.entry-title.title_prop {
    margin-bottom: 16px;
}

/* ==========================================================================
   Bug Reset filters (2026-05-12): botao "Reset" no espaco vazio da barra
   .wprentals_adv_listing_filters_head (427px livres entre results-count e sort).
   ========================================================================== */
/* v7x: Reset filters global = mesmo CSS Reset interno dos campos
   (transparente outlined verde + texto cinza). Tambem em AS2. */
body.page-template-property_list_half .lw-reset-filters,
body.page-template-advanced_search_results .lw-reset-filters {
    background: transparent !important;
    border: 1px solid rgb(109, 181, 170) !important;
    color: rgba(58, 65, 53, 0.65) !important;
    padding: 8px 18px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: background-color .15s ease, color .15s ease !important;
}
body.page-template-property_list_half .lw-reset-filters:hover,
body.page-template-advanced_search_results .lw-reset-filters:hover {
    background: rgba(109, 181, 170, 0.08) !important;
    color: rgb(109, 181, 170) !important;
}
body.page-template-property_list_half .lw-reset-filters[hidden],
body.page-template-advanced_search_results .lw-reset-filters[hidden] {
    display: none !important;
}

/* 2026-05-12: Search button REVERTIDO ao escondido (user feedback Lote 2).
   Done buttons dentro dos popups (price, beds-baths) ja submetem
   individualmente; selects/amenidades submetem via técnica "close = submit"
   (proximo lote). */

/* ==========================================================================
   2026-05-12: bootstrap-select selecionado mantem visual igual ao default
   (user feedback: bg cinza + tamanho diferente confunde mais que ajuda).
   Removido CSS de "verde quando selecionado". Mantemos so ellipsis.
   ========================================================================== */

/* v7k 2026-05-12: REMOVIDO ellipsis dos triggers bootstrap-select e
   filter_menu_trigger. User: "ha bastante espaco pro texto, sem necessidade
   de ...". Texto cresce naturalmente ate caber. Mantemos so no sort
   #a_filter_order que tem largura fixa por design. */
body.page-template-property_list_half .bootstrap-select > .btn .filter-option-inner,
body.page-template-property_list_half .bootstrap-select > .btn .filter-option-inner-inner,
body.page-template-advanced_search_results .bootstrap-select > .btn .filter-option-inner,
body.page-template-advanced_search_results .bootstrap-select > .btn .filter-option-inner-inner,
body.page-template-property_list_half .filter_menu_trigger,
body.page-template-advanced_search_results .filter_menu_trigger {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    max-width: none !important;
}

/* Sort dropdown na barra results: ellipsis tambem */
body.page-template-property_list_half #a_filter_order,
body.page-template-advanced_search_results #a_filter_order {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 200px !important;
}

/* ==========================================================================
   Item 6 (2026-05-12): respiro entre filters_head -> h1 -> grid (regrediu)
   com order_search e outros. Margens vencem tema parent com especificidade alta.
   ========================================================================== */
body.wp-theme-wprentals.page-template-property_list_half .wprentals_adv_listing_filters_head,
body.wp-theme-wprentals.page-template-advanced_search_results .wprentals_adv_listing_filters_head {
    margin-bottom: 16px !important;
    justify-content: space-between !important;
    align-items: center !important;
}
body.wp-theme-wprentals.page-template-property_list_half #listing_ajax_container,
body.wp-theme-wprentals.page-template-advanced_search_results #listing_ajax_container {
    margin-top: 12px !important;
}
body.wp-theme-wprentals.page-template-property_list_half #listing_ajax_container > h1.entry-title,
body.wp-theme-wprentals.page-template-advanced_search_results #listing_ajax_container > h1.entry-title {
    margin-bottom: 16px !important;
    margin-top: 0 !important;
}
/* Container quando h1 ausente: padding fallback */
body.wp-theme-wprentals.page-template-property_list_half #listing_ajax_container:not(:has(> h1.entry-title)),
body.wp-theme-wprentals.page-template-advanced_search_results #listing_ajax_container:not(:has(> h1.entry-title)) {
    padding-top: 46px !important;
}

/* ==========================================================================
   Bug B Lote 2 (2026-05-12): margins respiro entre filters_head -> h1 -> grid
   funciona em TODAS variantes (sort, category, submit=Procurar). Especificidade
   alta + !important pra vencer tema parent. Tambem trata caso h1 ausente
   (URL com submit=) injetando padding-top fallback.
   ========================================================================== */
body.wp-theme-wprentals.page-template-property_list_half #listing_ajax_container,
body.wp-theme-wprentals.page-template-advanced_search_results #listing_ajax_container {
    margin-top: 12px !important;
}
/* Caso h1 ausente (URL com submit=Procurar): inflar padding-top do container
   pra simular o respiro que o h1 normalmente ocupa (~46px) */
body.wp-theme-wprentals.page-template-property_list_half #listing_ajax_container:not(:has(> h1.entry-title)),
body.wp-theme-wprentals.page-template-advanced_search_results #listing_ajax_container:not(:has(> h1.entry-title)) {
    padding-top: 46px !important;
}

/* ==========================================================================
   Bug C (2026-05-12 v2): pagination duplicada.
   Antes: hide TUDO dentro de #listing_ajax_container -> pagination some apos
   AJAX sort (SSR removida pelo tema + AJAX injetada dentro = nada visivel).
   Agora: hide so DUPLICATAS via :not(:last-of-type) (mantem ultima visivel).
   ========================================================================== */
#listing_ajax_container > .pagination:not(:last-of-type),
#listing_ajax_container > ul.pagination:not(:last-of-type),
#listing_ajax_container .pagination_ajax_search_home:not(:last-of-type),
#listing_ajax_container ul.pagination_ajax_search_home:not(:last-of-type),
#listing_ajax_container .pagination_ajax_search:not(:last-of-type),
#listing_ajax_container .pagination_ajax:not(:last-of-type) {
    display: none !important;
}
