/* Widget flutuante — capa da edição do mês */
.wed{
  position:fixed;
  left:14px;
  bottom:24px;
  z-index:350;
  width:132px;
  margin:0;
  padding:0;
  background:var(--card);
  border:1px solid var(--rule);
  border-top:4px solid var(--red);
  box-shadow:0 12px 28px rgba(17,17,17,.18);
  font-family:var(--sans);
}
.wed[hidden]{display:none !important}
.wed-a{
  display:block;
  color:inherit;
  text-decoration:none;
  background:var(--paper);
}
.wed-a img{
  display:block;
  width:100%;
  height:auto;
  max-height:188px;
  object-fit:contain;
  object-position:center top;
  background:var(--paper);
}
.wed-k{
  display:block;
  padding:7px 8px 9px;
  font-family:var(--cond);
  font-size:12px;
  font-weight:800;
  letter-spacing:1.4px;
  text-transform:uppercase;
  text-align:center;
  color:var(--red);
  line-height:1.2;
}
.wed-x{
  position:absolute;
  top:-10px;
  right:-10px;
  width:28px;
  height:28px;
  border:0;
  border-radius:50%;
  background:var(--red);
  color:#fff;
  font-family:var(--sans);
  font-size:18px;
  line-height:1;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  box-shadow:0 2px 8px rgba(0,0,0,.28);
}
.wed-x:hover{background:var(--red-dk)}
.wed-x:focus-visible,
.wed-a:focus-visible{
  outline:2px solid var(--gold-lt);
  outline-offset:2px;
}

@media (min-width:1081px) and (max-width:1520px){
  .wed{width:104px;left:10px;bottom:18px}
  .wed-a img{max-height:148px}
}

@media (max-width:1080px){
  .wed{
    width:72px;
    left:8px;
    bottom:calc(14px + env(safe-area-inset-bottom, 0px));
  }
  .wed-a img{max-height:100px}
  .wed-k{display:none}
  .wed-x{
    width:32px;
    height:32px;
    top:-12px;
    right:-10px;
    font-size:20px;
  }
}

@media print{
  .wed{display:none !important}
}

/* Desktop sem margem livre ao lado do conteúdo (901 a 1779px, mouse): a capa ficava por cima
   do texto das matérias. Fica recolhida numa aba vermelha na borda esquerda e abre ao passar o mouse. */
@media (min-width:901px) and (max-width:1779px) and (hover:hover) and (pointer:fine){
  .wed{
    left:0;
    width:104px;
    transform:translateX(calc(-100% + 14px));
    transition:transform .25s ease, box-shadow .25s ease;
    box-shadow:0 8px 20px rgba(17,17,17,.16);
  }
  .wed::after{
    content:'Edição do mês';
    position:absolute;
    top:-4px;
    right:0;
    bottom:0;
    width:14px;
    background:var(--red);
    color:#fff;
    font-family:var(--cond);
    font-size:9px;
    font-weight:800;
    letter-spacing:1.2px;
    text-transform:uppercase;
    writing-mode:vertical-rl;
    transform:rotate(180deg);
    display:flex;
    align-items:center;
    justify-content:center;
    pointer-events:none;
    transition:opacity .2s ease;
  }
  .wed .wed-x{opacity:0;pointer-events:none;transition:opacity .2s ease}
  .wed:hover,
  .wed:focus-within{transform:none;box-shadow:0 12px 28px rgba(17,17,17,.18)}
  .wed:hover::after,
  .wed:focus-within::after{opacity:0}
  .wed:hover .wed-x,
  .wed:focus-within .wed-x{opacity:1;pointer-events:auto}
}
