/* =========================================================
   Sidebar Favorites — star icon + favorites section styles
   ========================================================= */

/* ---- Star button ---- */
/* High-specificity override: app.min.css sets #sidebar-menu ul li a { display: block }
   which would break the flex layout needed to keep the star icon inline with the text. */
#sidebar-menu ul li a.sidebar-favoriteable,
#side-menu ul li a.sidebar-favoriteable {
  position: relative;
  display: flex;
  align-items: center;
}

/* Reset framework icon styles (app.min.css gives all "a i" a font-size of 1.25rem,
   min-width of 1.75rem and padding-bottom that shift the star off-center). */
#sidebar-menu ul li a .sidebar-favorite-btn i,
#side-menu ul li a .sidebar-favorite-btn i {
  min-width: auto;
  padding-bottom: 0;
  font-size: inherit;
  line-height: inherit;
  vertical-align: middle;
  color: inherit;
}

.sidebar-favorite-btn {
  display: none;
  align-items: center;
  justify-content: center;
  align-self: center;
  margin-left: auto;
  padding: 0 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #adb5bd;
  font-size: 14px;
  line-height: 1;
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.sidebar-favorite-btn:hover,
.sidebar-favorite-btn:focus {
  color: #f5a623;
  outline: none;
}

.sidebar-favorite-btn.is-favorited {
  display: flex;
  color: #f5a623;
}

/* Show star on row hover */
#sidebar-menu ul li a.sidebar-favoriteable:hover .sidebar-favorite-btn,
#sidebar-menu ul li a.sidebar-favoriteable:focus-within .sidebar-favorite-btn,
#side-menu ul li a.sidebar-favoriteable:hover .sidebar-favorite-btn,
#side-menu ul li a.sidebar-favoriteable:focus-within .sidebar-favorite-btn {
  display: flex;
}

/* ---- Favorites section header icon ---- */
.sidebar-favorites-icon {
  color: #f5a623 !important;
}

/* ---- Favorites section items ---- */
.sidebar-favorites-list .sidebar-favorite-item {
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Error / toast notification ---- */
.sidebar-favorites-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  padding: 10px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  max-width: 320px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  animation: sidebar-favorites-fadein 0.2s ease;
}

.sidebar-favorites-toast--error {
  background: #dc3545;
  color: #fff;
}

@keyframes sidebar-favorites-fadein {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Tablet responsiveness (≥ 768px) ---- */
@media (max-width: 992px) {
  .sidebar-favorite-btn {
    padding: 0 6px;
    font-size: 16px;
  }
}
