/*
 * Site Pif Paf Alimentos - estilos próprios da migração.
 *
 * O visual das páginas continua vindo do CSS original do Elementor/tema.
 * Aqui ficam apenas os estilos dos componentes que substituíram plugins:
 * banner de cookies (Real Cookie Banner), leitor de PDF (3D FlipBook) e
 * ajustes do lightbox e dos formulários.
 */

/* ------------------------------------------------------------ banner de cookies */

.pp-cookie-banner {
  --pp-cb-accent: #8c1031;
  --pp-cb-accent-hover: #6f0c27;
  --pp-cb-link: #15779b;
  --pp-cb-link-hover: #11607d;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
  max-height: 500px;
  overflow-y: auto;
  background: #fff;
  color: #2b2b2b;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
  box-shadow: 0 0 17px rgba(0, 0, 0, .2);
  animation: pp-cb-in .5s ease;
}
.pp-cookie-banner--hide { animation: pp-cb-out .3s ease forwards; }
@keyframes pp-cb-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes pp-cb-out { to { transform: translateY(100%); opacity: 0; } }

.pp-cookie-banner * { box-sizing: border-box; }
.pp-cookie-banner__inner { max-width: 1024px; margin: 0 auto; }
.pp-cookie-banner--individual .pp-cookie-banner__inner { max-width: 1980px; }
.pp-cookie-banner__header {
  padding: 17px 20px 15px;
  border-bottom: 1px solid #efefef;
  display: flex;
  align-items: center;
  gap: 12px;
}
.pp-cookie-banner__title { font-size: 20px; font-weight: normal; line-height: 1.3; }
.pp-cookie-banner__body {
  display: flex;
  gap: 30px;
  padding: 15px 20px 5px;
  align-items: flex-start;
}
.pp-cookie-banner__text { flex: 1 1 auto; min-width: 0; }
.pp-cookie-banner__description { margin: 0 0 8px; font-size: 13px; }
.pp-cookie-banner__description a,
.pp-cookie-banner__footer a { color: inherit; text-decoration: underline; }
.pp-cookie-banner__separator { width: 50px; height: 1px; background: var(--pp-cb-link); margin: 0 0 10px; }
.pp-cookie-banner__notice { margin: 0 0 10px; font-size: 12px; color: #757575; }
.pp-cookie-banner__buttons {
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 10px;
}
.pp-cookie-btn {
  display: block;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 3px;
  font: inherit;
  font-size: 18px;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
  transition: background-color .2s;
}
.pp-cookie-btn--primary { background: var(--pp-cb-accent); color: #fff; }
.pp-cookie-btn--primary:hover,
.pp-cookie-btn--primary:focus { background: var(--pp-cb-accent-hover); color: #fff; }
.pp-cookie-btn--secondary { background: #efefef; color: #0a0a0a; }
.pp-cookie-btn--secondary:hover { background: #e8e8e8; color: #000; }
.pp-cookie-link {
  display: block;
  padding: 5px;
  font-size: 16px;
  text-align: center;
  color: var(--pp-cb-link);
  text-decoration: underline;
}
.pp-cookie-link:hover { color: var(--pp-cb-link-hover); }
.pp-cookie-banner__back { display: inline; padding: 0; font-size: 14px; }
.pp-cookie-banner__footer {
  padding: 10px 20px 12px;
  background: #fcfcfc;
  border-top: 1px solid #efefef;
  font-size: 14px;
  color: #757474;
}
.pp-cookie-banner__footer a { display: block; max-width: 1024px; margin: 0 auto; padding: 0 5px; color: #757474; }
.pp-cookie-banner__footer a:hover { color: #2b2b2b; }
.pp-cookie-group {
  margin: 10px 0;
  padding: 15px;
  background: #f4f4f4;
  border: 1px solid #f4f4f4;
  border-radius: 5px;
}
.pp-cookie-group__label { font-size: 16px; display: flex; align-items: center; gap: 6px; }
.pp-cookie-group__description { margin: 6px 0; font-size: 14px; color: #757575; }
.pp-cookie-group__more { display: inline; padding: 0; font-size: 13px; text-align: left; }
.pp-cookie-group__details { margin-top: 8px; font-size: 12px; color: #757575; }

@media (max-width: 768px) {
  .pp-cookie-banner { max-height: 400px; }
  .pp-cookie-banner__header { padding: 10px 18px; }
  .pp-cookie-banner__title { font-size: 18px; }
  .pp-cookie-banner__body { flex-direction: column; gap: 0; padding: 10px 18px 0; }
  .pp-cookie-banner__buttons { flex: none; width: 100%; }
  .pp-cookie-btn { font-size: 16px; }
  .pp-cookie-link { font-size: 14px; }
  .pp-cookie-banner__footer { padding: 6px 18px 8px; font-size: 12px; }
}

/* ------------------------------------------------------------ leitor de PDF (substitui o 3D FlipBook) */

.pp-flipbook {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
}
/* a altura final é calculada pelo flipbook.js (mesma regra do leitor antigo) */
.pp-flipbook { height: 640px; padding: 30px 0 12px; box-sizing: border-box; }
.pp-flipbook--page { background: #fff; }
.pp-flipbook__fallback { margin: auto; color: #96203a; font-weight: 600; text-decoration: underline; }
.pp-flipbook__stage {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.pp-flipbook__viewport { position: relative; height: 100%; display: flex; align-items: center; justify-content: center; transform-origin: center center; transition: transform .25s ease; }
.pp-flipbook__book { transition: transform .5s ease; }
.pp-flipbook button,
.pp-flipbook button:hover,
.pp-flipbook button:focus {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}
.pp-flipbook button:focus-visible { outline: 2px solid #96203a; outline-offset: 2px; }
.pp-flipbook__page { background: #fafafa; overflow: hidden; }
.pp-flipbook__page canvas { display: block; width: 100%; height: 100%; }
.pp-flipbook__page--loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 28px;
  height: 28px;
  border: 3px solid #ddd;
  border-top-color: #96203a;
  border-radius: 50%;
  animation: pp-spin 1s linear infinite;
}
@keyframes pp-spin { to { transform: rotate(360deg); } }
.pp-flipbook__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 64px;
  border: 0;
  background: transparent;
  color: #bdbdbd;
  font-size: 34px;
  cursor: pointer;
}
.pp-flipbook__nav:hover { color: #7a7a7a; }
.pp-flipbook__nav[disabled] { visibility: hidden; }
.pp-flipbook__nav--prev { left: 18px; }
.pp-flipbook__nav--next { right: 18px; }
.pp-flipbook__toolbar {
  flex: 0 0 auto;
  margin: 16px auto 0;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 8px;
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  color: #555;
}
.pp-flipbook__toolbar button {
  width: 28px;
  height: 26px;
  border: 0;
  background: transparent;
  color: #555;
  cursor: pointer;
  font-size: 12px;
}
.pp-flipbook__toolbar button:hover { color: #000; }
.pp-flipbook__pages { display: flex; align-items: center; margin: 0 4px; background: #f3f3f3; }
.pp-flipbook__pages input {
  width: 40px;
  height: 22px;
  border: 0;
  background: transparent;
  text-align: center;
  font-size: 12px;
  padding: 0;
  color: #333;
}
.pp-flipbook__pages span { min-width: 40px; text-align: center; border-left: 1px solid #fff; line-height: 22px; }
.pp-flipbook:fullscreen { height: 100vh; background: #f0eae6; padding: 20px 0; }
@media (max-width: 768px) {
  .pp-flipbook__nav { width: 32px; font-size: 26px; }
  .pp-flipbook__nav--prev { left: 0; }
  .pp-flipbook__nav--next { right: 0; }
}

/* ------------------------------------------------------------ lightbox de imagens (Elementor) */

.pp-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  background-color: rgba(0, 0, 0, .87);
}
.pp-lightbox .dialog-widget-content { position: absolute; inset: 0; width: 100%; height: 100%; background: none; box-shadow: none; }
.pp-lightbox .dialog-message { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 50px 60px; box-sizing: border-box; }
.pp-lightbox .elementor-lightbox-item { display: flex; align-items: center; justify-content: center; max-width: 100%; max-height: calc(100% - 40px); }
.pp-lightbox .elementor-lightbox-image { max-width: 100%; max-height: calc(100vh - 140px); width: auto; height: auto; box-shadow: 0 0 30px rgba(0, 0, 0, .3); }
.pp-lightbox .elementor-slideshow__footer { color: #fff; padding-top: 12px; text-align: center; font-size: 14px; position: static; }
.pp-lightbox .dialog-close-button { position: absolute; top: 15px; right: 20px; color: #fff; font-size: 26px; cursor: pointer; opacity: .8; }
.pp-lightbox .dialog-close-button:hover { opacity: 1; }

/* ------------------------------------------------------------ formulários */

/* O campo "Especifique a ocupação" só aparece quando "Outro - especifique" é escolhido */
#especifique-ocupacao { display: none; }
.elementor-form-waiting button[type="submit"],
.ff_submitting .ff-btn-submit { opacity: .6; cursor: progress; }
