/* Oficina Portátil V75.31 — Pesquisa SAP / PDF */

/* ------------------------------------------------------------------------
   PESQUISA SAP — botão PDF
   ------------------------------------------------------------------------ */
.sap-pdf-actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  margin:12px 2px 18px;
}

.sap-pdf-button{
  min-width:112px;
  min-height:46px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:10px 18px;
  border-radius:18px;
  border:1px solid color-mix(in srgb,var(--text) 13%,transparent);
  color:var(--text);
  font:inherit;
  font-weight:850;
  letter-spacing:.02em;
  cursor:pointer;
  background:color-mix(in srgb,var(--panel-solid) 58%,transparent);
  -webkit-backdrop-filter:blur(16px) saturate(1.3);
  backdrop-filter:blur(16px) saturate(1.3);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.28),
    0 10px 24px rgba(0,0,0,.14);
  transition:transform .16s ease,filter .16s ease,box-shadow .16s ease;
}

.sap-pdf-button:hover{
  transform:translateY(-1px);
  filter:brightness(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.36),
    0 12px 30px color-mix(in srgb,var(--accent) 18%,rgba(0,0,0,.14));
}

.sap-pdf-button:active{ transform:translateY(0) scale(.98); }

.sap-pdf-button img{
  width:27px;
  height:27px;
  object-fit:contain;
  display:block;
}

/* ------------------------------------------------------------------------
   POPUP DE GERAÇÃO DO PDF
   ------------------------------------------------------------------------ */
.op-sap-pdf-overlay{
  position:fixed;
  inset:0;
  z-index:100400;
  display:grid;
  place-items:center;
  padding:18px;
  background:rgba(4,15,15,.24);
  -webkit-backdrop-filter:blur(7px);
  backdrop-filter:blur(7px);
  animation:op-sap-pdf-fade-in .16s ease both;
}

.op-sap-pdf-dialog{
  width:min(410px,calc(100vw - 30px));
  border-radius:24px;
  padding:24px;
  color:var(--text);
  border:1px solid color-mix(in srgb,var(--text) 12%,transparent);
  background-color:color-mix(in srgb,var(--panel-solid) 86%,transparent);
  background-image:
    radial-gradient(110% 90% at 0 0,rgba(255,255,255,.15),transparent 44%),
    radial-gradient(85% 75% at 100% 100%,color-mix(in srgb,var(--accent) 12%,transparent),transparent 55%);
  -webkit-backdrop-filter:blur(26px) saturate(1.45);
  backdrop-filter:blur(26px) saturate(1.45);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.24),0 28px 78px rgba(0,0,0,.32);
}

.op-sap-pdf-head{
  display:flex;
  align-items:center;
  gap:14px;
}

.op-sap-pdf-head img{
  width:44px;
  height:44px;
  object-fit:contain;
}

.op-sap-pdf-head > div{
  display:grid;
  gap:2px;
}

.op-sap-pdf-head strong{
  font-size:20px;
  font-weight:900;
}

.op-sap-pdf-head small,
.op-sap-pdf-status{
  color:var(--muted);
}

.op-sap-pdf-progress{
  height:9px;
  margin-top:20px;
  overflow:hidden;
  border-radius:999px;
  background:color-mix(in srgb,var(--text) 9%,transparent);
}

.op-sap-pdf-progress > i{
  display:block;
  width:0%;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,var(--accent),color-mix(in srgb,var(--accent) 60%,#8ef2e8));
  box-shadow:0 0 18px color-mix(in srgb,var(--accent) 48%,transparent);
  transition:width .2s ease;
}

.op-sap-pdf-foot{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-top:10px;
  font-size:12px;
}

.op-sap-pdf-percent{ font-weight:900; }

.op-sap-pdf-dialog.is-done .op-sap-pdf-progress > i{ width:100%!important; }

@keyframes op-sap-pdf-fade-in{
  from{opacity:0;transform:scale(.985)}
  to{opacity:1;transform:scale(1)}
}

@media(max-width:640px){
  .sap-pdf-actions{margin-top:10px}
  .sap-pdf-button{width:100%;min-height:48px}
}
