/* Bookmark Sidebar - Bookmark-specific styles (base styles in SidebarBase.css) */

/* Bookmark List */
.bookmark-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Bookmark Items */
.bookmark-item-wrapper {
  display: flex;
  flex-direction: column;
}

.bookmark-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 0.65rem;
  cursor: default;
  transition: all 0.2s ease;
  background: transparent;
  border: 1px solid transparent;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  text-align: left;
  outline: none;
}

.bookmark-item--clickable {
  cursor: pointer;
  background: color-mix(in srgb, var(--bg-toolbar) 86%, transparent);
}

.bookmark-item--clickable:hover {
  background: color-mix(in srgb, var(--text-primary) 8%, var(--bg-toolbar));
  border-color: color-mix(
    in srgb,
    var(--text-primary) 20%,
    var(--border-subtle)
  );
  transform: translateX(2px);
}

.bookmark-item--clickable:active {
  transform: translateX(3px);
}

.bookmark-item--clickable:focus-visible {
  outline: 2px solid
    color-mix(in srgb, var(--text-primary) 30%, var(--border-subtle));
  outline-offset: 2px;
}

/* Expand Icon */
.bookmark-item__expand-icon {
  flex-shrink: 0;
  transition: transform 0.2s ease;
  width: 2rem;
  height: 2rem;
}

.bookmark-item:hover .bookmark-item__expand-icon {
  transform: scale(1.05);
}

/* Dash for items without children */
.bookmark-item__dash {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 1.25rem;
  opacity: 0.5;
  font-weight: 300;
}

/* Content */
.bookmark-item__content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.bookmark-item__title {
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: var(--text-primary);
}

.bookmark-item--clickable:hover .bookmark-item__title {
  color: var(--text-primary);
}

.bookmark-item__page {
  line-height: 1.3;
  font-size: 0.75rem;
}

/* Children Container */
.bookmark-item__children {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.25rem;
}

/* Smooth expand/collapse animation */
@keyframes bookmark-fade-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bookmark-item__children {
  animation: bookmark-fade-in 0.2s ease;
}

/* Accessibility & Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .bookmark-item,
  .bookmark-item__expand-icon,
  .bookmark-item__children {
    transition: none;
    animation: none;
  }
}
