/*
Theme Name: Qwery Child Theme
Theme URI: https://qwery.ancorathemes.com/
Description: Qwery is a Premium WordPress theme that has built-in support for popular Page Builders, slider with swipe gestures, and is SEO- and Retina-ready. The unique system of inheritance and override options allows setting up individual parameters for different sections of your site and supported plugins.
Author: AncoraThemes
Author URI: https://ancorathemes.com/
Version: 3.6.1
Tested up to: 6.8
Requires at least: 5.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, e-commerce, portfolio, grid-layout, one-column, two-columns, three-columns, four-columns, left-sidebar, right-sidebar, custom-background, custom-colors, custom-header, custom-logo, custom-menu, editor-style, featured-image-header, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, sticky-post, theme-options, threaded-comments, translation-ready, block-styles, wide-blocks
Text Domain: qwery
Template: qwery
*/


/* =Child-Theme customization starts here
------------------------------------------------------------ */

/* ===== PDF MODAL ===== */
#pdfModal { display: none; }
#pdfModal.is-open { display: block; }

.pdf-modal__backdrop{
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.85);  /* fundo claro */
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 99998;
}

/* Painel */
.pdf-modal__panel{
  position: fixed;
  top: 6vh;
  left: 6vw;
  right: 6vw;
  bottom: 6vh;

  max-width: 1100px;
  margin: 0 auto;

  background: #fff;
  border-radius: 14px;
  overflow: hidden;

  z-index: 99999;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 20px 60px rgba(0,0,0,.22);
}

/* Mobile: quase full */
@media (max-width: 768px){
  .pdf-modal__panel{
    top: 2vh; left: 2vw; right: 2vw; bottom: 2vh;
    max-width: none;
    border-radius: 12px;
  }
}

/* Botão "Fechar" por cima do iframe */
.pdf-modal__close{
  position: absolute;
  top: 14px;
  right: 16px;

  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .5px;

  background: #ffffff;
  color: #000;

  border: 1px solid rgba(0,0,0,.15);
  border-radius: 30px;

  cursor: pointer;

  z-index: 100000; /* maior para ficar acima do viewer */
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
  transition: all .2s ease;
}

.pdf-modal__close:hover{
  background: #000;
  color: #fff;
}

/* IMPORTANTÍSSIMO:
   cria “barra” no topo (60px) para o botão não ficar tapado pelo iframe */
.pdf-modal__frame{
  position: absolute;
  inset: 60px 0 0 0;               /* deixa espaço em cima */
  width: 100%;
  height: calc(100% - 60px);       /* ocupa o resto */
  border: 0;
}

/* Lock scroll */
.pdf-modal-lock{
  overflow: hidden;
}

/* FORÇAR botão Fechar sempre visível */
#pdfModal .pdf-modal__close{
  display: inline-flex !important;
  align-items: center;
  justify-content: center;

  position: fixed !important;   /* <- em vez de absolute */
  top: 80px !important;         /* ajusta se quiseres (80px para não bater na WP admin bar) */
  right: 24px !important;

  padding: 12px 18px !important;
  font-size: 14px !important;
  font-weight: 700 !important;

  background: #fff !important;
  color: #000 !important;

  border: 2px solid #000 !important;
  border-radius: 999px !important;

  z-index: 2147483647 !important; /* acima de tudo */
  box-shadow: 0 12px 30px rgba(0,0,0,.25) !important;

  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* FORCE: botão do PDF clicável em mobile */
#openPdfBtn,
#openPdfBtn *{
  pointer-events: auto !important;
}

/* estado normal: não atrapalha o menu */
#openPdfBtn{
  position: relative;
  z-index: 1;
  transform: none;
}

/* só quando o modal está aberto é que sobe */
#pdfModal.is-open ~ #openPdfBtn,
#pdfModal.is-open #openPdfBtn,
body.pdf-modal-lock #openPdfBtn{
  z-index: 2147483646 !important;
}

/* Se houver overlay invisível a apanhar toques, isto costuma resolver */
.elementor-section .elementor-background-overlay,
.elementor-widget-wrap::before,
.elementor-widget-wrap::after{
  pointer-events: none !important;
}

/* garantir dropdown acima de botões soltos */
.sc_layouts_menu_nav ul,
.sc_layouts_menu_nav ul ul,
.sc_layouts_menu_nav .sub-menu,
.menu-item-has-children > ul{
  z-index: 50000 !important;
  position: relative;
}

/* === FIX: mobile touch a ser "comido" por overlays do Elementor === */

/* Overlays comuns que ficam por cima e bloqueiam o tap */
.elementor-background-overlay,
.elementor-shape,
.elementor-shape-top,
.elementor-shape-bottom,
.elementor-widget-wrap::before,
.elementor-widget-wrap::after,
.trx_addons_parallax_blocks,
.trx_addons_parallax_layers{
  pointer-events: none !important;
}

/* NÃO subir todos os botões do site (isto rebenta menus/dropdowns) */
.elementor-button-wrapper,
a.elementor-button.elementor-button-link{
  position: static !important;
  z-index: auto !important;
}

/* Se precisares mesmo de “forçar” só este botão, faz por ID */
#openPdfBtn,
#openPdfBtn .elementor-button-wrapper,
#openPdfBtn a.elementor-button.elementor-button-link{
  position: relative !important;
  z-index: 1 !important;
}

/* E só quando o modal está aberto é que sobe */
body.pdf-modal-lock #openPdfBtn,
body.pdf-modal-lock #openPdfBtn .elementor-button-wrapper,
body.pdf-modal-lock #openPdfBtn a.elementor-button.elementor-button-link{
  z-index: 2147483646 !important;
}

/* garantir que o dropdown consegue “sair” do header */
header, .top_panel, .top_panel_wrap, .sc_layouts_row, .sc_layouts_menu, .sc_layouts_menu_nav{
  overflow: visible !important;
}

.sc_layouts_menu_nav ul ul,
.sc_layouts_menu_nav .sub-menu{
  position: absolute !important;
  z-index: 999999 !important;
}

/* Fallback no mobile quando iframe PDF não renderiza */
.pdf-modal__fallback{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(255,255,255,.92);
  z-index: 5; /* acima do iframe */
}

.pdf-modal__fallback-inner{
  max-width: 520px;
  width: 100%;
  background: #fff;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 14px;
  padding: 18px 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
}

.pdf-modal__actions{
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.pdf-modal__open,
.pdf-modal__download{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid #000;
  background: #fff;
  color: #000;
}

.pdf-modal__open:hover,
.pdf-modal__download:hover{
  background: #000;
  color: #fff;
}


/* CONTROLAR LAYOUT imagens campanhas na homepage  */
.give-campaigns-component-campaign-image {
    background-size: cover;
    border-radius: 8px 8px 0 0;
    height: 380px !important;
}




/* RETIRAR HYPHENS DOS TITULOS COM CSS CLASS NO-HYPHEN */
.sc_item_title {
  hyphens: none !important;
  -webkit-hyphens: none !important;
  -ms-hyphens: none !important;

  word-break: keep-all !important;
  overflow-wrap: normal !important;
  word-wrap: normal !important;
}

/* Só onde metes a classe no-hyphen (no widget/coluna/section) */
.elementor-element.no-hyphen .elementor-heading-title,
.elementor-element.no-hyphen h1,
.elementor-element.no-hyphen h2,
.elementor-element.no-hyphen h3,
.elementor-element.no-hyphen h4,
.elementor-element.no-hyphen h5,
.elementor-element.no-hyphen h6 {
  -webkit-hyphens: none !important;
  -ms-hyphens: none !important;
  hyphens: none !important;

  /* se houver quebra de palavra, quebre SEM hífen */
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

/* Definir largura do dropdown do menu
/* Ultra específico */
.sc_layouts_menu_nav li.menu-item-has-children > ul {
    width: 360px !important;
    min-width: 360px !important;
}

/* font size dos titulos das campanhas give */
.give-campaigns-component-campaign-title {
    font-size: 24px !important;
    line-height: 1.3;
}