/* Layer: Favorites Layer */
/* Displays user's favorite channels in a vertical list format */

[data-layer="favorites"] {
  position: fixed;
  top: var(--navbar-bottom);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-component);
  padding: 4.444vh var(--gutter) 2.963vh;
  background: transparent;
  overflow-y: auto;
}

.favorites-container {
  max-width: 100%;
  margin: 0;
}

.favorites-header {
  margin-bottom: 3.704vh; /* 40px at 1080p */
}

.favorites-title {
  font-size: 4.07vh; /* ~44px at 1080p */
  font-weight: 300;
  color: #E3E2E6;
  margin: 0;
}

.favorites-list {
  display: flex;
  flex-direction: column;
  gap: 1.852vh; /* 20px at 1080p */
}

.favorites-item {
  display: flex;
  align-items: center;
  gap: 2.222vh; /* 24px at 1080p */
  padding: 2.222vh 2.5vw; /* 24px vertical, 48px horizontal at 1920px */
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
  outline: none;
}

.favorites-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.favorites-item.focused {
  background-color: #E5E1E6;
}

.favorites-item.focused .favorites-item-title,
.favorites-item.focused .favorites-item-description {
  color: #1A1C1E;
}

.favorites-item-icon {
  flex-shrink: 0;
  width: 7.407vh; /* 80px at 1080p */
  height: 7.407vh;
  border-radius: 50%;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.1);
}

.favorites-item-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.favorites-item-avatar-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(168, 200, 255, 0.3) 0%, rgba(168, 200, 255, 0.1) 100%);
}

.favorites-item-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.556vh; /* 6px at 1080p */
}

.favorites-item-title {
  font-size: 2.5vh; /* ~27px at 1080p */
  font-weight: 500;
  color: #E3E2E6;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.favorites-item-description {
  font-size: 1.852vh; /* ~20px at 1080p */
  font-weight: 400;
  color: rgba(227, 226, 230, 0.7);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.favorites-item-delete {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5.556vh; /* 60px at 1080p */
  height: 5.556vh;
  background-color: transparent;
  border: 0.185vh solid rgba(255, 255, 255, 0.2); /* 2px at 1080p */
  border-radius: 50%;
  color: rgba(227, 226, 230, 0.7);
  cursor: pointer;
  transition: all var(--transition-fast);
  outline: none;
}

.favorites-item-delete:hover {
  background-color: rgba(255, 100, 100, 0.2);
  border-color: rgba(255, 100, 100, 0.5);
  color: #ff6464;
}

.favorites-item-delete.focused {
  background-color: #ff6464;
  border-color: #ff6464;
  color: #fff;
  outline: 0.185vh solid #fff;
  outline-offset: 0.185vh;
}

.favorites-item-delete svg {
  width: 2.222vh; /* 24px at 1080p */
  height: 2.222vh;
}

/* When item is focused but delete is not, dim the delete button */
.favorites-item.focused .favorites-item-delete:not(.focused) {
  border-color: rgba(26, 28, 30, 0.3);
  color: rgba(26, 28, 30, 0.5);
}

/* Empty State */
.favorites-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  text-align: center;
  padding: 4.444vh;
}

.favorites-empty-icon {
  color: rgba(227, 226, 230, 0.3);
  margin-bottom: 2.963vh; /* 32px at 1080p */
}

.favorites-empty-icon svg {
  width: 11.111vh; /* 120px at 1080p */
  height: 11.111vh;
}

.favorites-empty-text {
  font-size: 3.333vh; /* ~36px at 1080p */
  font-weight: 500;
  color: #E3E2E6;
  margin: 0 0 1.481vh 0; /* 16px bottom at 1080p */
}

.favorites-empty-subtext {
  font-size: 2.222vh; /* ~24px at 1080p */
  font-weight: 400;
  color: rgba(227, 226, 230, 0.6);
  margin: 0;
}
