/* Port Notify Bar - CSS
   Barra fija inferior estilo "gob.mx" (aproximado)
*/
:root{
  --pnb-accent: #6A0F2E;
  --pnb-btn: #8B6B2F;
  --pnb-text: #fff;
  --pnb-shadow: 0 10px 30px rgba(0,0,0,.22);
}

.pnb{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--pnb-text);
  pointer-events: none; /* se habilita solo en el wrapper */
}

.pnb__wrap{
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--pnb-accent);
  box-shadow: var(--pnb-shadow);
  border-top: 1px solid rgba(255,255,255,.12);
}

.pnb--min .pnb__body,
.pnb--min .pnb__nav{
  display: none;
}

.pnb__tag{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: rgba(255,255,255,.08);
  color: #fff;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
}

.pnb__tagText{
  font-weight: 700;
  letter-spacing: .02em;
  font-size: 13px;
  text-transform: uppercase;
}

.pnb__badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(0,0,0,.25);
  font-size: 12px;
  font-weight: 700;
}

.pnb__body{
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.pnb__title{
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pnb__link{
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  text-decoration: underline;
  opacity: .95;
  white-space: nowrap;
}

.pnb__link:hover{ opacity: 1; }

.pnb__nav{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pnb__navBtn{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.15);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.pnb__count{
  font-size: 12px;
  opacity: .9;
  min-width: 42px;
  text-align: center;
}

.pnb__toggle{
  width: 40px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.18);
  background: var(--pnb-btn);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

@media (max-width: 640px){
  .pnb__wrap{ gap: 8px; padding: 10px; }
  .pnb__navBtn{ width: 32px; height: 32px; border-radius: 9px; }
  .pnb__toggle{ width: 38px; height: 32px; border-radius: 9px; }
  .pnb__title{ font-size: 13px; }
}



/* Modal (PRIORIDAD=1) */
.pnbm{
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: none;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
.pnbm.is-open{ display: block; }

.pnbm__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}

.pnbm__card{
  position: relative;
  max-width: 760px;
  width: calc(100% - 24px);
  margin: 6vh auto;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

.pnbm__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--pnb-accent);
  color: #fff;
}

.pnbm__title{
  font-weight: 800;
  letter-spacing: .02em;
}

.pnbm__close{
  border: 0;
  background: rgba(255,255,255,.18);
  color: #fff;
  width: 38px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
}

.pnbm__body{
  padding: 16px;
  color: #111;
}
.pnbm__body a{ color: var(--pnb-accent); }

/* Body layout: title + subtitle */
.pnb__body{ display:flex; flex-direction:column; justify-content:center; gap:2px; min-width:0; }
.pnb__title{ font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pnb__subtitle{ font-size:12px; opacity:.9; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.pnb__link{ margin-left:0; align-self:flex-start; font-weight:800; text-decoration:none; }
.pnb__link:hover{ text-decoration:underline; }

/* Minimized: hide body + nav, move toggle next to tag */
.pnb--min .pnb__body,
.pnb--min .pnb__nav{ display:none !important; }
.pnb--min .pnb__wrap{ gap:10px; }
.pnb--min .pnb__toggle{ margin-left:0; }

/* Expandible panel */
.pnb__panel{
  position: fixed;
  left:0; right:0;
  bottom: 54px; /* arriba de barra */
  background: #fff;
  color:#111;
  border-top: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 18px 55px rgba(0,0,0,.28);
  opacity: 0;
  transform: translateY(14px);
  pointer-events:none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 999998;
}
.pnb--open .pnb__panel{
  opacity:1;
  transform: translateY(0);
  pointer-events:auto;
}
.pnb__panelInner{
  max-width: 100%;
  margin: 0 auto;
  padding: 14px 18px 18px;
}
.pnb__panelTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.pnb__pill{
  display:inline-flex;
  align-items:center;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--pnb-accent);
  color:#fff;
  font-weight: 900;
  letter-spacing:.06em;
  font-size: 12px;
}
.pnb__date{
  color:#777;
  font-size: 12px;
}
.pnb__panelTitleWrap{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding-top: 12px;
}
.pnb__panelMark{
  width: 4px;
  height: 26px;
  border-radius: 4px;
  background: var(--pnb-btn);
  margin-top: 6px;
}
.pnb__panelTitle{
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  color: var(--pnb-accent);
}
.pnb__panelBox{
  margin-top: 12px;
  background: rgba(0,0,0,.03);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  padding: 14px 16px;
}
.pnb__panelText{
  font-size: 14px;
  color:#333;
  line-height: 1.45;
}
.pnb__panelText a{
  color: var(--pnb-accent);
  font-weight: 900;
  text-decoration: underline;
}
@media (max-width: 640px){
  .pnb__panelInner{ padding: 12px 12px 16px; }
  .pnb__panelTitle{ font-size: 18px; }
}

.pnb--open .pnb__toggle{ transform: rotate(180deg); }

/* ===== v1.4.0 Panel Animation ===== */
#pnb-root.pnb{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 999999;
}
#pnb-root .pnb__link{
  display: none !important;
}
#pnb-root .pnb__panel{
  position: fixed;
  left: 0; right: 0;
  bottom: 54px;
  background: #fff;
  opacity: 0;
  transform: translateY(20px);
  transition: transform .25s cubic-bezier(.2,.9,.2,1), opacity .2s ease;
  pointer-events: none;
  z-index: 999998;
}
#pnb-root.pnb--open .pnb__panel{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#pnb-root.pnb--open .pnb__toggle{
  transform: rotate(180deg);
}


/* ===== v1.4.2 Overlay + Slide behavior (panel behind bar) ===== */
:root{
  --pnb-bar-h: 58px; /* ajusta si tu barra mide distinto */
}

/* Barra siempre fija y por encima del panel */
#pnb-root{
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 2147483000 !important; /* muy alto */
}

/* Panel fijo arriba de la barra y por debajo en z-index */
#pnb-root .pnb__panel{
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: var(--pnb-bar-h) !important;
  max-height: calc(70vh - 10px) !important;
  overflow: auto !important;

  z-index: 2147482990 !important;

  opacity: 0 !important;
  transform: translateY(18px) !important;
  pointer-events: none !important;
  transition:
    transform .26s cubic-bezier(.2,.9,.2,1),
    opacity .18s ease !important;
}

#pnb-root.pnb--open .pnb__panel{
  opacity: 1 !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}


/* ===== v1.4.4 Modal navigation ===== */
#pnb-modal .pnbm__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}
#pnb-modal .pnbm__nav{
  display:none;
  align-items:center;
  gap: 8px;
  margin-left:auto;
  margin-right: 6px;
}
#pnb-modal .pnbm__navBtn{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(0,0,0,.04);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
#pnb-modal .pnbm__navBtn:disabled{
  opacity: .45;
  cursor: default;
}
#pnb-modal .pnbm__count{
  font-size: 12px;
  color: rgba(0,0,0,.65);
  min-width: 44px;
  text-align:center;
}
@media (max-width: 520px){
  #pnb-modal .pnbm__nav{ gap:6px; }
  #pnb-modal .pnbm__navBtn{ width:32px; height:32px; }
}
