/* Button & Interaction Styles */

/* Button variants */
.btn-primary {
  background: linear-gradient(90deg, var(--gradient-primary-start, rgb(var(--color-primary))) 0%, var(--gradient-primary-end, rgb(var(--color-primary-dark))) 100%);
  color: var(--color-text-on-primary, #fff);
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 4px 16px 0 rgba(var(--color-primary), 0.15);
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  position: relative;
  overflow: hidden;
  padding: 0.25rem 1rem;
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--btn-primary-overlay, rgba(255,255,255,0.08));
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.btn-primary:hover {
  background: linear-gradient(90deg, var(--gradient-primary-hover-start, rgb(var(--color-primary-dark))) 0%, var(--gradient-primary-hover-end, rgb(var(--color-primary))) 100%);
  box-shadow: 0 8px 24px 0 rgba(var(--color-primary-dark), 0.18);
  transform: translateY(-2px) scale(1.03);
}

.btn-primary:hover::after {
  opacity: 1;
}

.btn-secondary {
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  background: linear-gradient(90deg, var(--gradient-secondary-start, rgb(var(--color-bg-tertiary))) 0%, var(--gradient-secondary-end, rgb(var(--color-bg-secondary))) 100%);
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px 0 rgba(var(--color-border), 0.08);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  position: relative;
  overflow: hidden;
  color: var(--color-text-primary);
  border: none;
}

.btn-secondary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--btn-secondary-overlay, rgba(var(--color-primary), 0.04));
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.btn-secondary:hover {
  background: linear-gradient(90deg, var(--gradient-secondary-hover-start, rgb(var(--color-bg-secondary))) 0%, var(--gradient-secondary-hover-end, rgb(var(--color-bg-tertiary))) 100%);
  border-color: rgb(var(--color-primary));
  box-shadow: 0 4px 16px 0 rgba(var(--color-primary), 0.10);
  transform: translateY(-1px) scale(1.02);
}

.btn-secondary:hover::after {
  opacity: 1;
}

/* Filter buttons */
.btn-filter {
  border-radius: 0.5rem;
  transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;
  transition-duration: 200ms;
  border: 1px solid rgb(var(--color-border));
  background-color: rgb(var(--color-bg-secondary));
  color: rgb(var(--color-text-primary));
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-filter:hover {
  background-color: rgb(var(--color-bg-secondary));
  border-color: rgb(var(--color-border-focus));
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-filter.active {
  background-color: rgb(var(--color-bg-primary));
  border-color: rgb(var(--color-primary));
  box-shadow: 0 2px 4px rgba(var(--color-primary), 0.3);
}

.btn-filter.active:hover {
  background-color: rgb(var(--color-bg-primary));
  border-color: rgb(var(--color-bg-primary));
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(var(--color-primary), 0.4);
}

.icon-btn {
  padding: 0.5rem;
    color: rgb(var(--color-text-muted));
    color: rgb(var(--color-text-primary));
    background-color: rgb(var(--color-bg-tertiary));
    border-radius: 0.375rem;
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;
    transition-duration: 200ms;
}

/* Action button groups */
.action-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
  overflow: hidden;
}

/* Responsive action button groups */
@media (max-width: 768px) {
  .action-btn-group {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(156, 163, 175, 0.3) transparent;
    padding-bottom: 2px;
  }
  
  .action-btn-group::-webkit-scrollbar {
    height: 4px;
  }
  
  .action-btn-group::-webkit-scrollbar-track {
    background: transparent;
  }
  
  .action-btn-group::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.3);
    border-radius: 2px;
  }
  
  .action-btn-group::-webkit-scrollbar-thumb:hover {
    background-color: rgba(156, 163, 175, 0.5);
  }
  
  /* Gradient fade at edges */
  .action-btn-group::before,
  .action-btn-group::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    pointer-events: none;
    z-index: 1;
  }
  
  .action-btn-group::before {
    left: 0;
    background: linear-gradient(to right, rgb(var(--color-bg-primary)), transparent);
  }
  
  .action-btn-group::after {
    right: 0;
    background: linear-gradient(to left, rgb(var(--color-bg-primary)), transparent);
  }
}

@media (max-width: 480px) {
  .action-btn-group {
    gap: 0.125rem;
  }
  
  .action-btn-group .action-btn {
    flex-shrink: 0;
    min-width: 2rem;
  }
}

/* Action button variants */
.action-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.action-btn-primary {
  background-color: rgb(var(--color-primary));
  color: white;
}

.action-btn-primary:hover {
  background-color: rgb(var(--color-primary-dark));
}

.action-btn-secondary {
  background-color: rgb(var(--color-bg-tertiary));
  color: rgb(var(--color-text-primary));
  border-color: rgb(var(--color-border));
}

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

.action-btn-icon {
  padding: 0.5rem;
  color: rgb(var(--color-text-secondary));
  background: none;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn-icon:hover {
  color: rgb(var(--color-text-primary));
  background-color: rgb(var(--color-bg-tertiary));
}

/* Action button states */
.action-btn-highlighted {
  color: #fbbf24;
}

.action-btn-unhighlighted {
  color: inherit;
}

/* Action button badge */
.action-btn-badge {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: rgb(var(--color-primary));
  color: white;
  border-radius: 9999px;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  z-index: 10;
}



/* Symbol buttons - styled to match emoji reaction buttons */
.btn-symbol {
  display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgb(var(--color-border));
    transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;
    transition-duration: 200ms;
    text-align: center;
  background-color: rgb(var(--color-bg-tertiary));
  border: 1px solid rgb(var(--color-border));
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  color: rgb(var(--color-text-primary));
  cursor: pointer;
  min-width: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.btn-symbol:hover {
  background-color: rgb(var(--color-bg-quaternary));
  border-color: rgb(var(--color-text-muted));
  transform: scale(1.05);
  text-decoration: none;
  color: inherit;
}

.btn-symbol:active {
  transform: scale(0.98);
  background-color: rgb(var(--color-bg-tertiary));
}

/* Symbol button success state */
.btn-symbol-success {
  background-color: rgb(var(--color-success-light)) !important;
  border-color: rgb(var(--color-success)) !important;
  color: rgb(var(--color-success-dark)) !important;
  transform: scale(1.05);
  transition: all 0.2s ease;
}

/* Success animation for buttons */
@keyframes success-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgb(var(--color-success));
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 8px rgba(var(--color-success-rgb), 0.3);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(var(--color-success-rgb), 0);
  }
}

.btn-symbol-success-animation {
  animation: success-pulse 1s ease-out;
}

.btn-symbol:focus {
  outline: none;
    box-shadow: 0 0 0 2px rgb(var(--color-border-focus));
    box-shadow: 0 0 0 2px rgb(var(--color-primary));
    box-shadow: 0 0 0 1px rgb(var(--color-bg-primary)), 0 0 0 3px rgb(var(--color-primary));
  outline: 2px solid transparent;
  outline-offset: 2px;
}


/* Action Buttons */
.btn-action {
  background: rgb(var(--color-bg-primary));
  border: 1px solid rgb(var(--color-border));
  border-radius: 0.5rem;
  padding: 0.5rem;
  font-size: 0.875rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgb(var(--color-text-primary));
}

.btn-action:hover {
  background: rgb(var(--color-bg-secondary));
  border-color: rgb(var(--color-primary) / 0.3);
  transform: translateY(-1px);
}

.btn-action:active {
  transform: translateY(0);
}

/* Search buttons for judgments mode */
.search-btn {
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 4px;
  border: 1px solid;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.search-btn-any {
  color: #1d4ed8;
  background-color: #dbeafe;
  border-color: #93c5fd;
}

.search-btn-any:hover {
  background-color: #bfdbfe;
  border-color: #60a5fa;
}

.dark .search-btn-any {
  color: #93c5fd;
  background-color: #1e3a8a;
  border-color: #3b82f6;
}

.dark .search-btn-any:hover {
  background-color: #1e40af;
  border-color: #2563eb;
}

.search-btn-all {
  color: #166534;
  background-color: #dcfce7;
  border-color: #86efac;
}

.search-btn-all:hover {
  background-color: #bbf7d0;
  border-color: #4ade80;
}

.dark .search-btn-all {
  color: #86efac;
  background-color: #14532d;
  border-color: #22c55e;
}

.dark .search-btn-all:hover {
  background-color: #166534;
  border-color: #16a34a;
}

.search-btn-none {
  color: #dc2626;
  background-color: #fee2e2;
  border-color: #fca5a5;
}

.search-btn-none:hover {
  background-color: #fecaca;
  border-color: #f87171;
}

.dark .search-btn-none {
  color: #fca5a5;
  background-color: #7f1d1d;
  border-color: #ef4444;
}

.dark .search-btn-none:hover {
  background-color: #991b1b;
  border-color: #dc2626;
}

/* Buttons row */
.buttons-row {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  align-items: center;
} 