/* ============================================================================
 * PAGE STYLES: Watchlists Page (css/pages/watchlists.css)
 * ============================================================================ */

.breadcrumb .custom-select-container {
  width: 100%;
  max-width: 40rem; /* 320px */
} 

.watchlist-return-badge--neutral {
  color: var(--theme-text-70-solid);
  background: var(--theme-bg-600);
}

/* --- Ranking Table Layout --- */
.ranking .table {
  min-width: 54.6875rem; /* 875px */
}

.ranking .table th {
  padding: var(--spacing-3, 1.2rem) var(--spacing-4, 1.5rem);
}

.ranking .table td {
  padding: 0.95rem var(--spacing-4, 1.5rem);
}

.ranking .table th,
.ranking .table td {
  font-size: var(--fs-body-xs);
}

/* --- Table Header Typography --- */
.table .header h4 {
  font-size: var(--fs-body-sm, 0.9rem);
  font-weight: var(--fw-bold, 700);
}

/* --- Table Column Alignments --- */
.ranking table th:nth-child(1),
.ranking table td:nth-child(1),
.ranking table th:nth-child(2),
.ranking table td:nth-child(2),
.ranking table th:nth-child(7),
.ranking table td:nth-child(7) {
  text-align: left;
}

.ranking table th:nth-child(3),
.ranking table td:nth-child(3),
.ranking table th:nth-child(4),
.ranking table td:nth-child(4),
.ranking table th:nth-child(5),
.ranking table td:nth-child(5),
.ranking table th:nth-child(6),
.ranking table td:nth-child(6),
.ranking table th:nth-child(8),
.ranking table td:nth-child(8) {
  text-align: center;
}

/* --- Table Components --- */
.ranking .table td .chart {
  width: 10rem; /* 160px */
  aspect-ratio: 1.1;
}

.ranking .table td .badge {
  min-width: 5.625rem; /* 90px */
}

/* --- Pagination Styles --- */
.pagination-wrapper {
  background: var(--theme-bg-500);
}


/* ============================================================================
 * IN-TABLE EMPTY STATE STYLES
 * ============================================================================ */

.ranking table td.table-empty-cell {
  text-align: center !important;
  padding: 4rem 1.5rem !important;
}

.table-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.table-empty-state .empty-icon {
  font-size: 2rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  opacity: 0.6;
}

.table-empty-state .empty-title {
  font-size: var(--fs-body-md, 1rem);
  font-weight: var(--fw-bold, 700);
  color: var(--text-main);
  margin: 0 0 0.35rem 0;
}

.table-empty-state .empty-text {
  font-size: var(--fs-body-xs, 0.825rem);
  color: var(--text-muted);
  margin: 0;
}

/* ============================================================================
 * SKELETON ANIMATIONS & ALIGNMENT FIXES
 * ============================================================================ */

.button-inactive {
  cursor: not-allowed !important;
  opacity: 0.75 !important;
  pointer-events: none !important;
}

.watchlist-icon-button {
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--theme-text-70);
  background: var(--theme-bg-400);
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.watchlist-icon-button:hover,
.watchlist-icon-button:focus-visible {
  color: var(--theme-color);
  background: color-mix(in srgb, var(--theme-color) 12%, transparent);
  border-color: var(--theme-color);
  transform: translateY(-1px);
}

.watchlist-delete-button:hover,
.watchlist-delete-button:focus-visible {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
}

.watchlist-icon-button i {
  font-size: 0.95rem;
}

.guest-auth-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-2, 16px);
  background: var(--theme-bg-400);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--theme-color);
  padding: var(--spacing-3, 24px);
  border-radius: var(--radius-md, 12px);
  margin-top: var(--spacing-3, 24px);
  margin-bottom: var(--spacing-3, 24px);
  box-shadow: var(--shadow-sm);
}

.guest-auth-banner .banner-icon {
  font-size: var(--fs-icon-xl, 2rem);
  color: var(--theme-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.guest-auth-banner .banner-text {
  flex: 1;
}

.guest-auth-banner .banner-text h3 {
  font-size: var(--fs-h5, 1rem);
  font-weight: var(--fw-bold, 700);
  margin: 0 0 4px 0;
  color: var(--text-main);
}

.guest-auth-banner .banner-text p {
  font-size: var(--fs-body-sm, 0.875rem);
  color: var(--text-muted);
  margin: 0;
}

@media (max-width: 768px) {
  .guest-auth-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .guest-auth-banner .banner-action {
    width: 100%;
    margin-top: var(--spacing-1, 8px);
  }
  .guest-auth-banner .banner-action button {
    width: 100%;
    justify-content: center;
  }
}

.skeleton-box {
  background: linear-gradient(
    90deg,
    var(--theme-text-10, rgba(17, 24, 39, 0.1)) 25%,
    var(--theme-text-20, rgba(17, 24, 39, 0.2)) 37%,
    var(--theme-text-10, rgba(17, 24, 39, 0.1)) 63%
  );
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm, 6px);
}

@keyframes skeleton-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

.skeleton-dropdown {
  width: 100%;
  height: 42px;
  border-radius: var(--radius-sm, 6px);
}

.skeleton-title {
  width: 140px;
  height: 22px;
}

.skeleton-meta {
  width: 110px;
  height: 18px;
}

.skeleton-stock {
  display: flex;
  align-items: center;
  gap: 12px;
}

.skeleton-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full, 9999px);
  flex-shrink: 0;
}

.skeleton-text {
  height: 14px;
}

.skeleton-text.short {
  width: 60px;
}

.ranking table td:nth-child(2) .skeleton-text.medium {
  width: 90px;
  margin: 0;
}

.ranking table td:nth-child(5) .skeleton-text.short {
  width: 60px;
  margin: 0 auto;
}

.skeleton-text.tiny {
  width: 40px;
  height: 10px;
}

.skeleton-badge {
  width: 70px;
  height: 24px;
  margin: 0 auto;
  border-radius: var(--radius-full, 9999px);
}

.skeleton-chart {
  width: 50px;
  height: 50px;
  margin: 0 auto;
  border-radius: var(--radius-full, 9999px);
}

.skeleton-actions {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.skeleton-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm, 6px);
}

.skeleton-pagination {
  width: 280px;
  height: 32px;
}

.watchlist-toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 2000;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm, 6px);
  color: #fff;
  background: var(--color-green, #16834b);
  box-shadow: var(--shadow-md);
}

.watchlist-toast.error {
  background: var(--color-red, #c33b45);
}