/**
 * XMarks Component Styles v2.0
 * 
 * Clean, minimal components with subtle interactions
 */

/* ===================================
   BUTTONS
   =================================== */

/* Primary - amber, used sparingly */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: var(--accent);
  color: var(--text-inverse);
  font-weight: var(--font-medium);
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Secondary - ghost with border */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--border-emphasis);
  color: var(--text-primary);
}

/* Ghost - icon buttons, no border */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: transparent;
  color: var(--text-tertiary);
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-ghost:hover {
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

/* Icon button */
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn-icon svg,
.btn-icon i {
  width: 18px;
  height: 18px;
}

/* ===================================
   INPUTS
   =================================== */
.input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.input::placeholder {
  color: var(--text-tertiary);
}

.input:focus {
  outline: none;
  border-color: var(--border-default);
  background: var(--bg-elevated);
}

.input-with-icon {
  position: relative;
}

.input-with-icon .input {
  padding-left: 36px;
}

.input-with-icon svg,
.input-with-icon i {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  width: 16px;
  height: 16px;
  pointer-events: none;
}

/* Select */
.select {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.select:focus {
  outline: none;
  border-color: var(--border-default);
}

/* ===================================
   AVATAR
   =================================== */
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  overflow: hidden;
  flex-shrink: 0;
}

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

.avatar-sm { width: 28px; height: 28px; font-size: var(--text-xs); }
.avatar-md { width: 36px; height: 36px; }
.avatar-lg { width: 40px; height: 40px; }

/* ===================================
   CARDS
   =================================== */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: border-color var(--transition-fast);
}

.card:hover {
  border-color: var(--border-default);
}

/* ===================================
   CATEGORY DOT
   =================================== */
.category-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-ai { background: var(--cat-ai); }
.dot-business { background: var(--cat-business); }
.dot-career { background: var(--cat-career); }
.dot-health { background: var(--cat-health); }
.dot-personal { background: var(--cat-personal); }
.dot-finance { background: var(--cat-finance); }
.dot-creative { background: var(--cat-creative); }
.dot-other { background: var(--cat-other); }

/* Category pill */
.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-subtle);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 100px;
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
}

.category-pill .category-dot {
  width: 6px;
  height: 6px;
}

/* Category-specific pill colors */
.category-pill[data-category="ai"] { background: rgba(139, 92, 246, 0.1); color: var(--cat-ai); }
.category-pill[data-category="business"] { background: rgba(59, 130, 246, 0.1); color: var(--cat-business); }
.category-pill[data-category="career"] { background: rgba(6, 182, 212, 0.1); color: var(--cat-career); }
.category-pill[data-category="health"] { background: rgba(34, 197, 94, 0.1); color: var(--cat-health); }
.category-pill[data-category="personal"] { background: var(--accent-subtle); color: var(--accent); }
.category-pill[data-category="finance"] { background: rgba(234, 179, 8, 0.1); color: var(--cat-finance); }
.category-pill[data-category="creative"] { background: rgba(236, 72, 153, 0.1); color: var(--cat-creative); }
.category-pill[data-category="other"] { background: rgba(107, 114, 128, 0.1); color: var(--cat-other); }

/* ===================================
   SPINNER
   =================================== */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-subtle);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===================================
   TOAST
   =================================== */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  animation: slideUp 200ms ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toast-success { border-left: 3px solid var(--success); }
.toast-error { border-left: 3px solid var(--error); }
.toast-warning { border-left: 3px solid var(--warning); }

.toast-close {
  margin-left: auto;
  color: var(--text-tertiary);
  padding: var(--space-1);
}

.toast-close:hover {
  color: var(--text-secondary);
}

/* ===================================
   DROPDOWN
   =================================== */
.dropdown {
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  min-width: 180px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  z-index: 100;
  animation: slideUp 150ms ease-out;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-primary);
  text-align: left;
  transition: background var(--transition-fast);
}

.dropdown-item:hover {
  background: var(--bg-surface);
}

.dropdown-item svg,
.dropdown-item i {
  width: 16px;
  height: 16px;
  color: var(--text-tertiary);
}

.dropdown-divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: var(--space-1) 0;
}

/* ===================================
   EMPTY STATE
   =================================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px var(--space-5);
  text-align: center;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
  color: var(--text-tertiary);
}

.empty-state-icon svg,
.empty-state-icon i {
  width: 28px;
  height: 28px;
}

.empty-state-title {
  font-size: var(--text-xl);
  font-weight: var(--font-medium);
  margin-bottom: var(--space-2);
}

.empty-state-description {
  font-size: var(--text-base);
  color: var(--text-secondary);
  max-width: 280px;
  margin-bottom: var(--space-5);
}

/* ===================================
   BADGE
   =================================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  border-radius: 100px;
}

.badge-success {
  background: var(--success-muted);
  color: var(--success);
}

.badge-warning {
  background: var(--warning-muted);
  color: var(--warning);
}

.badge-error {
  background: var(--error-muted);
  color: var(--error);
}

/* ===================================
   TRIAL CARD (Sidebar)
   =================================== */
.trial-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 14px;
  margin-top: var(--space-3);
}

.trial-text {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.trial-text strong {
  color: var(--text-primary);
}

.btn-upgrade {
  width: 100%;
  background: var(--accent);
  color: var(--text-inverse);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  transition: background var(--transition-fast);
}

.btn-upgrade:hover {
  background: var(--accent-hover);
}

/* ===================================
   SEARCH ENHANCEMENTS
   =================================== */
.search-wrapper {
  position: relative;
}

.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-clear:hover {
  color: var(--text-secondary);
  background: var(--bg-surface);
}

/* ===================================
   FILTERS BAR
   =================================== */
.filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.filters-left,
.filters-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background: var(--accent);
  color: var(--text-inverse);
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full);
  cursor: pointer;
}

.filter-chip:hover {
  background: var(--accent-hover);
}

.filter-chip svg {
  opacity: 0.7;
}

/* ===================================
   SKELETON LOADING
   =================================== */
.bookmark-card.skeleton {
  pointer-events: none;
}

.skeleton-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-elevated);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-text-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.skeleton-text {
  height: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.skeleton-footer {
  display: flex;
  justify-content: space-between;
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* ===================================
   BOOKMARK CARD ACTIONS
   =================================== */
.bookmark-actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-left: auto;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.bookmark-card:hover .bookmark-actions {
  opacity: 1;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-tertiary);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.action-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.action-btn-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
}

/* Category dropdown in bookmark card */
.category-menu-wrapper {
  position: relative;
}

.category-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: var(--space-1);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  z-index: 50;
  overflow: hidden;
}

[data-theme="dark"] .category-dropdown {
  background: #1f2937;
}

[data-theme="light"] .category-dropdown {
  background: #ffffff;
}

.category-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  cursor: pointer;
  text-align: left;
  transition: background var(--transition-fast);
}

.category-option:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

[data-theme="dark"] .category-option:hover {
  background: rgba(255, 255, 255, 0.1);
}

.category-option.active {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent);
}

/* ===================================
   PAGINATION
   =================================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-6) 0;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pagination-btn:hover:not(:disabled) {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-info {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

/* ===================================
   SEARCH HIGHLIGHT
   =================================== */
.bookmark-content mark {
  background: rgba(245, 158, 11, 0.3);
  color: inherit;
  padding: 1px 2px;
  border-radius: 2px;
}

/* ===================================
   FIND SIMILAR DRAWER
   =================================== */

/* Clickable bookmark cards */
.bookmark-card.clickable {
  cursor: pointer;
  transition: all var(--transition-fast);
}

.bookmark-card.clickable:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

/* Drawer Overlay */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
}

/* Drawer Panel */
.drawer-panel {
  width: 100%;
  max-width: 520px;
  height: 100vh;
  background: var(--bg-base);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
}

/* Drawer Animations */
.drawer-enter {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.drawer-enter-start {
  transform: translateX(100%);
}
.drawer-enter-end {
  transform: translateX(0);
}
.drawer-leave {
  transition: transform 0.2s ease-in;
}
.drawer-leave-start {
  transform: translateX(0);
}
.drawer-leave-end {
  transform: translateX(100%);
}

/* Drawer Header */
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.drawer-header h2 {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
}

.drawer-close {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-close:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

/* Drawer Content */
.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-6);
}

/* Section Labels */
.drawer-section-label {
  font-size: 11px;
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-info {
  font-weight: var(--font-normal);
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.7;
}

/* Drawer Tweet Cards */
.drawer-tweet-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  transition: all var(--transition-fast);
}

.drawer-tweet-card:hover {
  border-color: var(--border-default);
}

.drawer-tweet-card.featured {
  background: var(--bg-elevated);
  border-color: var(--border-default);
}

.drawer-tweet-card.is-saved {
  border-color: var(--accent);
  background: rgba(245, 158, 11, 0.05);
}

.drawer-tweet-card.is-skipped {
  opacity: 0.5;
}

/* Tweet Header */
.drawer-tweet-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.drawer-tweet-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-elevated);
}

.drawer-tweet-author {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.drawer-author-name {
  font-weight: var(--font-medium);
  font-size: var(--text-sm);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-author-handle {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.drawer-tweet-likes {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.drawer-open-link {
  color: var(--text-tertiary);
  padding: var(--space-1);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.drawer-open-link:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

/* Tweet Content */
.drawer-tweet-content {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
  word-break: break-word;
}

/* Tweet Footer */
.drawer-tweet-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.drawer-category-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: var(--font-medium);
  color: white;
}

.drawer-tweet-metrics {
  display: flex;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

/* Similar Section */
.similar-section {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
}

.similar-list {
  display: flex;
  flex-direction: column;
}

/* Tweet Actions */
.drawer-tweet-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
}

.drawer-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.drawer-action-btn:hover:not(:disabled) {
  border-color: var(--border-default);
  color: var(--text-primary);
}

.drawer-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.drawer-action-btn.action-skip:hover:not(:disabled) {
  border-color: #ef4444;
  color: #ef4444;
}

.drawer-action-btn.action-save:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.drawer-action-btn.action-save.saved {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-inverse);
}

/* Dismiss Button & Menu */
.drawer-action-btn.action-dismiss:hover:not(:disabled) {
  border-color: #f97316;
  color: #f97316;
}

.drawer-action-btn.action-dismiss.dismissed {
  background: #f97316;
  border-color: #f97316;
  color: white;
}

.drawer-action-btn.action-dismiss.menu-open {
  border-color: #f97316;
  color: #f97316;
}

.dismiss-menu-wrapper {
  position: relative;
}

.dismiss-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  overflow: hidden;
}

.dismiss-menu-header {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-subtle);
}

.dismiss-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-primary);
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.dismiss-option:hover {
  background: var(--bg-hover);
}

.dismiss-option svg {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.dismiss-option:last-child {
  border-top: 1px solid var(--border-subtle);
  color: #ef4444;
}

.dismiss-option:last-child svg {
  color: #ef4444;
}

/* Dismissed tweet card state */
.drawer-tweet-card.is-dismissed {
  opacity: 0.4;
  pointer-events: none;
}

/* Toast Undo Button */
.toast-undo {
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  cursor: pointer;
  margin-left: var(--space-2);
  transition: all var(--transition-fast);
}

.toast-undo:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Loading State */
.drawer-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-6);
  color: var(--text-tertiary);
  gap: var(--space-3);
}

.drawer-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-default);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: drawer-spin 0.8s linear infinite;
}

@keyframes drawer-spin {
  to { transform: rotate(360deg); }
}

/* Error State */
.drawer-error-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  color: var(--text-secondary);
}

.drawer-error-state p {
  margin-bottom: var(--space-4);
}

/* Empty State */
.drawer-empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  color: var(--text-tertiary);
}

.drawer-empty-state svg {
  margin-bottom: var(--space-4);
  opacity: 0.5;
}

.drawer-empty-state p {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
}

.drawer-empty-state span {
  font-size: var(--text-xs);
}

/* Load More Button */
.btn-load-more {
  width: 100%;
  margin-top: var(--space-3);
}

/* Responsive */
@media (max-width: 640px) {
  .drawer-panel {
    max-width: 100%;
  }
  
  /* Proper gutters for drawer content */
  .drawer-header {
    padding: var(--space-4) var(--space-4);
  }
  
  .drawer-content {
    padding: var(--space-4);
  }
  
  .drawer-section-label {
    padding: 0 var(--space-1);
  }
  
  /* Icon-only action buttons on mobile */
  .drawer-action-btn .btn-text {
    display: none !important;
  }
  
  .drawer-action-btn {
    padding: var(--space-2);
    min-width: 40px;
    min-height: 40px;
    justify-content: center;
  }
  
  .drawer-tweet-actions {
    gap: var(--space-2);
  }
  
  /* Better tweet card spacing */
  .drawer-tweet-card {
    padding: var(--space-4);
  }
}

/* ===================================
   SYNC PROGRESS OVERLAY - Premium Design
   =================================== */

/* Full-screen overlay */
.sync-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 5, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Main content card */
.sync-overlay-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 4rem;
  max-width: 420px;
  background: linear-gradient(
    145deg,
    rgba(25, 25, 25, 0.95) 0%,
    rgba(15, 15, 15, 0.98) 100%
  );
  border-radius: 28px;
  border: 1px solid rgba(245, 158, 11, 0.15);
  box-shadow: 
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 30px 100px -20px rgba(0, 0, 0, 0.9),
    0 0 80px -10px rgba(245, 158, 11, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Premium animated sync icon */
.sync-icon-container {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 2rem;
}

/* SVG Spinner */
.sync-spinner-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: sync-spin 1.2s linear infinite;
  filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.4));
}

.sync-spinner-arc {
  transform-origin: center;
}

/* Center icon area */
.sync-icon-center {
  position: absolute;
  inset: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    circle,
    rgba(245, 158, 11, 0.1) 0%,
    transparent 70%
  );
  border-radius: 50%;
}

.sync-icon-center svg {
  width: 36px;
  height: 36px;
  color: #f59e0b;
  filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.5));
  animation: sync-icon-pulse 2s ease-in-out infinite;
}

@keyframes sync-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes sync-icon-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.9; }
}

/* Title with subtle gradient */
.sync-title {
  font-size: 1.625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 1.25rem;
  text-shadow: 0 0 40px rgba(245, 158, 11, 0.3);
}

/* Premium progress bar */
.sync-progress-container {
  width: 100%;
  max-width: 280px;
  margin-bottom: 1.5rem;
}

.sync-progress-bar {
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.sync-progress-fill {
  height: 100%;
  background: linear-gradient(
    90deg,
    #f59e0b 0%,
    #fbbf24 50%,
    #f59e0b 100%
  );
  background-size: 200% 100%;
  border-radius: 100px;
  animation: sync-progress-move 2s ease-in-out infinite;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
}

@keyframes sync-progress-move {
  0% { width: 5%; margin-left: 0%; }
  50% { width: 45%; margin-left: 25%; }
  100% { width: 5%; margin-left: 95%; }
}

/* Rotating message */
.sync-message {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.55);
  min-height: 1.5em;
  font-weight: 400;
  letter-spacing: 0.01em;
  padding: 0.6rem 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Stats display */
.sync-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sync-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.sync-stat-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: #f59e0b;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 25px rgba(245, 158, 11, 0.4);
}

.sync-stat-label {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

/* Cancel button */
.sync-cancel-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.75rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sync-cancel-btn:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.sync-cancel-btn svg {
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.sync-cancel-btn:hover svg {
  opacity: 1;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .sync-overlay-content {
    padding: 2.5rem 2rem;
    margin: 1rem;
    max-width: calc(100vw - 2rem);
    border-radius: 20px;
  }
  
  .sync-icon-container {
    width: 100px;
    height: 100px;
    margin-bottom: 1.5rem;
  }
  
  .sync-icon-center svg {
    width: 32px;
    height: 32px;
  }
  
  .sync-title {
    font-size: 1.35rem;
  }
  
  .sync-message {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }
  
  .sync-stats {
    gap: 2rem;
  }
  
  .sync-stat-value {
    font-size: 1.5rem;
  }
}
