/* ==========================================================================
   TS50 Daily Top Votes (Top 5 do Dia) - v1.3.2
   - Visual inspirado no "list view" do FullCalendar
   - NOVO: abas (Hoje / Últimos 7 dias)
   - NOVO: tendência (▲ ▼ NEW —)
   - NOVO: medalhas Top 3 (gold/silver/bronze)
   ========================================================================== */

.ts50-dtv{
  width: 100%;
  max-width: 520px;
  margin: 10px auto;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: radial-gradient(120% 120% at 50% 0%, rgba(255,255,255,.06) 0%, rgba(0,0,0,.25) 55%, rgba(0,0,0,.45) 100%);
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
  overflow: hidden;
  font-family: inherit;
}

.ts50-dtv-top{
  padding: 10px 12px 8px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}

.ts50-dtv-top-title{
  font-weight: 800;
  letter-spacing: .2px;
  color: rgba(255,255,255,.92);
  font-size: 14px;
}

.ts50-dtv-nav{
  display:flex;
  gap: 8px;
  align-items:center;
}

.ts50-dtv-btn{
  appearance: none;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  color: rgba(255,255,255,.9);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.ts50-dtv-btn:hover{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.18);
}

.ts50-dtv-btn:active{
  transform: translateY(1px);
}

/* =======================
   NOVO: Abas
   ======================= */
.ts50-dtv-tabs{
  display:flex;
  gap: 8px;
  padding: 0 12px 10px;
}

.ts50-dtv-tab{
  flex: 1 1 auto;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.20);
  color: rgba(255,255,255,.78);
  border-radius: 12px;
  padding: 8px 10px;
  cursor:pointer;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .2px;
  transition: background .15s ease, border-color .15s ease;
}

.ts50-dtv-tab:hover{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.18);
}

.ts50-dtv-tab.is-active{
  background: rgba(210, 170, 90, .18);
  border-color: rgba(210, 170, 90, .45);
  color: rgba(255,255,255,.94);
}

/* =======================
   Cabeçalho de data
   ======================= */
.ts50-dtv-dayhead{
  /* [AJUSTE v1.2.5] Visual mais "premium" no cabeçalho (tanto diário quanto semanal) */
  background: linear-gradient(135deg, rgba(210, 170, 90, .82), rgba(186, 145, 62, .78));
  color: rgba(0,0,0,.92);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 9px 12px;
  font-weight: 900;
  letter-spacing: .2px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
  box-shadow: 0 10px 18px rgba(0,0,0,.20);
  position: relative;
  overflow: hidden;
}

/* garante que os textos fiquem acima do fundo */
.ts50-dtv-dayhead > div{
  position: relative;
  z-index: 2;
}

/* [AJUSTE v1.2.5] Destaque do modo semanal no header (sem textura / sem quebra estranha) */
.ts50-dtv-dayhead.is-7d{
  /* [AJUSTE v1.2.5] Semanal com destaque extra (gradiente + borda interna sutil) */
  background: linear-gradient(135deg, rgba(216, 178, 98, .90), rgba(160, 120, 44, .88));
  border-color: rgba(0,0,0,.14);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.14) inset,
    0 14px 26px rgba(0,0,0,.26);
}

.ts50-dtv-modepill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(0,0,0,.18);
  color: rgba(0,0,0,.92);
  font-weight: 900;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}


/* [AJUSTE v1.2.5] Pill da direita com um pouco mais de contraste */
.ts50-dtv-modepill{
  background: rgba(0,0,0,.22);
  border-color: rgba(0,0,0,.22);
  box-shadow: 0 8px 16px rgba(0,0,0,.12);
}

/* dá uma “presença” extra no modo semanal */
.ts50-dtv-dayhead.is-7d .ts50-dtv-modepill{
  background: rgba(0,0,0,.26);
  border-color: rgba(0,0,0,.26);
}


.ts50-dtv-date{
  font-size: 13px;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ts50-dtv-dow{
  font-size: 13px;
  display:flex;
  align-items:center;
  white-space: nowrap;
}

.ts50-dtv-list{
  padding: 4px 0;
}

.ts50-dtv-row{
  display:flex;
  align-items:center;
  gap: 10px; /* [AJUSTE v1.2.2] menos espaço */
  padding: 6px 12px; /* [AJUSTE v1.2.2] linhas mais compactas */
  border-top: 1px solid rgba(255,255,255,.06);
}

.ts50-dtv-row:first-child{
  border-top: none;
}

.ts50-dtv-rank{
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  color: rgba(0,0,0,.92);
  background: rgba(210, 170, 90, .85);
  flex: 0 0 auto;
}

.ts50-dtv-main{
  min-width: 0;
  flex: 1 1 auto;
  display:flex;
  flex-direction:column;
  gap: 4px; /* [AJUSTE v1.2.1] */
}

.ts50-dtv-line1{
  display:flex;
  align-items:center;
  gap: 8px;
  min-width: 0;
}

.ts50-dtv-line1 .ts50-dtv-name,
.ts50-dtv-line1 .ts50-dtv-name-link{
  flex: 1 1 auto;
  min-width: 0;
}

.ts50-dtv-winner{
  flex: 0 0 auto;
  white-space: nowrap;
}

.ts50-dtv-name{
  color: rgba(255,255,255,.95);
  font-weight: 850;
  font-size: 13px;
  line-height: 1.05; /* [AJUSTE v1.2.2] melhor alinhamento com badges */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ts50-dtv-name-link{
  display: block; /* [AJUSTE v1.2.2] evita desalinhamento baseline com o badge */
  line-height: 1.05; /* [AJUSTE v1.2.2] mantém altura consistente */
  text-decoration: none;
  color: rgba(255,255,255,.95);
}
.ts50-dtv-name-link:hover{
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ts50-dtv-sub{
  margin-top: 2px;
  color: rgba(255,255,255,.68);
  font-size: 12px;
}

.ts50-dtv-votes{
  text-align: right;
  flex: 0 0 auto;
  min-width: 76px;
}

.ts50-dtv-v{
  color: rgba(255,255,255,.95);
  font-weight: 950;
  font-size: 14px;
}

.ts50-dtv-vlbl{
  display:block;
  margin-top: 1px;
  color: rgba(255,255,255,.6);
  font-size: 11px;
}

/* =======================
   NOVO: Trend indicator
   ======================= */
.ts50-dtv-trend{
  display:inline-block;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .2px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  color: rgba(255,255,255,.82);
}

.ts50-dtv-trend-up{
  border-color: rgba(60, 210, 110, .45);
  background: rgba(60, 210, 110, .12);
}

.ts50-dtv-trend-down{
  border-color: rgba(255, 120, 120, .45);
  background: rgba(255, 120, 120, .12);
}

.ts50-dtv-trend-new{
  border-color: rgba(210, 170, 90, .55);
  background: rgba(210, 170, 90, .14);
}

.ts50-dtv-trend-same{
  border-color: rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
}

.ts50-dtv-empty{
  padding: 18px 12px;
  text-align: center;
  color: rgba(255,255,255,.75);
}

.ts50-dtv-footnote{
  padding: 8px 12px 12px;
  font-size: 12px;
  color: rgba(255,255,255,.75);
  border-top: 1px solid rgba(255,255,255,.06);
}

@media (max-width: 480px){
  .ts50-dtv{ max-width: 100%; border-radius: 12px; }
  .ts50-dtv-top-title{ font-size: 13px; }
  .ts50-dtv-btn{ padding: 6px 9px; }
}


/* ===========================================================
   [NOVO v1.2.1] Filtro por crônica (dropdown) + badges + winner
   =========================================================== */

.ts50-dtv-filters{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  margin: 6px 0 10px;
}

.ts50-dtv-filter{
  display:flex;
  align-items:center;
  gap:8px;
}

.ts50-dtv-filter-label{
  font-size:12px;
  opacity:.86;
}

.ts50-dtv-select{
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  padding: 7px 30px 7px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: inherit;
  font-size: 12px;
  line-height: 1;
  outline: none;
  cursor: pointer;
  position: relative;
}

.ts50-dtv-select:focus{
  border-color: rgba(255,255,255,.26);
  box-shadow: 0 0 0 3px rgba(255,255,255,.08);
}

.ts50-dtv-chronicle{
  min-width: 150px;
}

.ts50-dtv-badge{
  display:inline-flex;
  align-items:center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  font-size: 11px;
  letter-spacing: .2px;
  opacity: .92;
}

.ts50-dtv-winner{
  display:inline-flex;
  align-items:center;
  justify-content:center; /* [AJUSTE v1.2.2] alinha melhor no centro */
  padding: 3px 10px; /* [AJUSTE v1.2.2] reduz altura */
  line-height: 1; /* [AJUSTE v1.2.2] evita "desalinhado" */
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.10);
  font-size: 11px;
  letter-spacing: .25px;
}


.ts50-dtv-row.is-winner{
  /* =====================================================================
     [AJUSTE v1.3.1] Destaque do 1º lugar VISÍVEL mesmo com cache/minify:
     - Fundo mais forte + faixa lateral dourada.
     - Usa !important para evitar sobrescrita por tema/cache.
     ===================================================================== */
  position: relative;
  border-top-color: rgba(255,255,255,.06) !important;
  background: linear-gradient(90deg,
      rgba(210, 170, 90, .34) 0%,
      rgba(210, 170, 90, .16) 45%,
      rgba(255,255,255,.04) 100%
    ) !important;
  box-shadow:
    0 0 0 1px rgba(210, 170, 90, .22) inset,
    0 12px 18px rgba(0,0,0,.18) !important;
}

.ts50-dtv-row.is-winner:before{
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 0 6px 6px 0;
  background: rgba(210, 170, 90, .85);
  box-shadow: 0 0 0 1px rgba(0,0,0,.10);
  opacity: .95;
}

/* =====================================================================
   [NOVO v1.3.2] Medalhas no Top 3 (Gold/Silver/Bronze)
   - #1 = gold (usa o mesmo destaque de .is-winner e só ajusta a bolinha do rank)
   - #2 = silver
   - #3 = bronze
   ===================================================================== */

/* #1 Gold: garante que a bolinha do rank mantenha a identidade dourada */
.ts50-dtv-row.medal-gold .ts50-dtv-rank{
  background: rgba(210, 170, 90, .92);
}

/* #2 Silver */
.ts50-dtv-row.medal-silver{
  position: relative;
  border-top-color: rgba(255,255,255,.06) !important;
  background: linear-gradient(90deg,
      rgba(220, 220, 220, .22) 0%,
      rgba(220, 220, 220, .10) 45%,
      rgba(255,255,255,.04) 100%
    ) !important;
  box-shadow:
    0 0 0 1px rgba(220, 220, 220, .12) inset,
    0 12px 18px rgba(0,0,0,.18) !important;
}

.ts50-dtv-row.medal-silver:before{
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 0 6px 6px 0;
  background: rgba(220, 220, 220, .88);
  box-shadow: 0 0 0 1px rgba(0,0,0,.10);
  opacity: .95;
}

.ts50-dtv-row.medal-silver .ts50-dtv-rank{
  background: rgba(220, 220, 220, .90);
}

/* #3 Bronze */
.ts50-dtv-row.medal-bronze{
  position: relative;
  border-top-color: rgba(255,255,255,.06) !important;
  background: linear-gradient(90deg,
      rgba(205, 127, 50, .22) 0%,
      rgba(205, 127, 50, .10) 45%,
      rgba(255,255,255,.04) 100%
    ) !important;
  box-shadow:
    0 0 0 1px rgba(205, 127, 50, .12) inset,
    0 12px 18px rgba(0,0,0,.18) !important;
}

.ts50-dtv-row.medal-bronze:before{
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 0 6px 6px 0;
  background: rgba(205, 127, 50, .92);
  box-shadow: 0 0 0 1px rgba(0,0,0,.10);
  opacity: .95;
}

.ts50-dtv-row.medal-bronze .ts50-dtv-rank{
  background: rgba(205, 127, 50, .90);
}

@media (max-width: 520px){
  .ts50-dtv-filters{
    justify-content:flex-start;
  }
  .ts50-dtv-chronicle{
    min-width: 0;
    width: 100%;
  }
}
