/* ===== Favoritos (layout) ===== */
.view-favorites { padding-top: 8px; }
.view-favorites .fav-header { display:flex; align-items:center; gap:12px; }
.view-favorites .brand { color: var(--accent); font-weight: 800; margin-right: 6px; }
.view-favorites .heart { margin-left: 8px; opacity: .6; }

.fav-tabs {
  display:flex; gap: 8px; margin: 12px 0 18px;
  background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,0));
  padding: 6px; border-radius: 14px;
}
.fav-tab {
  position: relative;
  padding: 10px 18px;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}
.fav-tab.is-active {
  color: var(--btn-fg, #fff);
  background: var(--btn-active-bg, #2a2a2a);
  box-shadow: none; 
}

.fav-tab[data-focusable].is-focus::after {
  border-radius: 14px;
}

.fav-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.fav-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  outline: 2px solid transparent;
}

.fav-card.is-focus,
.fav-card:focus-visible {
  outline: 3px solid #ffdf00; 
}
.fav-card__thumb {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  display: grid;
  place-items: center;
}
.fav-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.fav-card__ph { width: 48px; height: 48px; border-radius: 8px; background: rgba(255,255,255,.2); }
.fav-card__title { font-size: 0.95rem; line-height: 1.2; }

.fav-item {
  display:flex; align-items:center; gap:10px;
  background:#1f1d31; border-radius: 14px;
  padding: 12px 14px; min-height: 52px;
  box-shadow: 0 2px 0 rgba(0,0,0,.12) inset;
}
.fav-item .ico {
  width: 22px; height: 22px; flex: 0 0 22px;
  background: currentColor; color: #c9cbe3; opacity: .9;
  -webkit-mask: var(--mask) center/contain no-repeat;
          mask: var(--mask) center/contain no-repeat;
}

.view-favorites .fav-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); 
  gap: 16px;
}


.fav-item .ico.tv {
  --mask: url("data:image/svg+xml;utf8,\
  <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'>\
  <path d='M7.4 3 10 6H6a1 1 0 1 0 0 2h12a1 1 0 1 0 0-2h-6l2.6-3A1 1 0 0 0 13.9.8L11 4 8.1.8A1 1 0 1 0 7.4 3ZM4 9c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2H4Zm0 2h16v7H4v-7Zm6 9a1 1 0 1 0 0 2h4a1 1 0 1 0 0-2h-4Z'/>\
  </svg>");
}
.fav-item .title {
  font-weight: 700; letter-spacing:.2px;
  color: #e9e9f5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.fav-empty {
  margin-top: 18px; text-align: center; color: var(--muted);
}

.fav-item[data-focusable] { position: relative; }
.fav-item[data-focusable].is-focus::after {
  content: ""; position:absolute; inset:-4px; border-radius: 18px;
  outline: 4px solid var(--focus);
  box-shadow: 0 0 0 8px rgba(255,213,79,.15);
}

.fav-btn{
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  margin-right: 10px;
  border-radius: 999px;
  background: #efeff3;
  box-shadow: var(--shadow);
  border: 0;
  cursor: pointer;
}
.fav-btn img{ width: 22px; height: 22px; display:block; }
.fav-btn.is-active{ background:#ffd764; }
.fav-btn.is-focus{ outline: 2px solid rgba(255,215,100,.6); }

.view-favorites {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
  min-height: 100%;
}

.view-favorites > .fav-tabs {
  display: flex !important;  
  flex-direction: column !important;
  gap: 12px;
  margin: 0;                    
  padding: 0;
  background: none;
  border-radius: 0;
  position: sticky;              
  top: 0;
}

.view-favorites .backchip,
.view-favorites .fav-tab {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  text-align: left;
  border: 0;
  border-radius: 10px;
  background: var(--btn-bg, #038192);
  color: var(--btn-fg, #fff);
  font-weight: 700;
  line-height: 1.2;
}

.view-favorites .fav-tab.is-active {
  background: var(--btn-active-bg, #31cee2);
}

.view-favorites [data-focusable].is-focus,
.view-favorites [data-focusable]:focus-visible {
  outline: 3px solid var(--focus, #ffd400);
  outline-offset: 0;
}

.view-favorites .fav-content { min-width: 0; }

.view-favorites .fav-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); /* 220–260 según gusto */
  gap: 16px;
}

.view-favorites .fav-card {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 10px;
  border-radius: 12px;
  padding: 10px;
  background: #31cee2;
  border: 1px solid rgba(255,255,255,.08);
}
.view-favorites .fav-card__thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 10px;
  background: #000;
  display: grid;
  place-items: center;
}
.view-favorites .fav-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.view-favorites .fav-card__title {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
  letter-spacing: .2px;

  display: -webkit-box;
  -webkit-line-clamp: 2;  
  line-clamp: 2;          
  -webkit-box-orient: vertical;
  overflow: hidden;
}


.view-favorites .fav-empty { margin-top: 12px; opacity: .85; font-weight: 600; }

@media (max-width: 960px) {
  .view-favorites { grid-template-columns: 1fr; }
  .view-favorites > .fav-tabs {
    position: static;
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 18px;
  }
  .view-favorites .backchip,
  .view-favorites .fav-tab { width: auto; }
}


