/* Custom styles for Keyword Research Tool */

/* Drop zone active state */
.drop-zone-active {
  border-color: #3b82f6 !important;
  background-color: #eff6ff;
}

/* Tab styles */
.tab-btn.active {
  background-color: white;
  color: #111827;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

/* Competition badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-low {
  background-color: #dcfce7;
  color: #166534;
}

.badge-medium {
  background-color: #fef9c3;
  color: #854d0e;
}

.badge-high {
  background-color: #fee2e2;
  color: #991b1b;
}

.badge-unknown {
  background-color: #f3f4f6;
  color: #6b7280;
}

/* Table row hover */
tbody tr:hover {
  background-color: #f9fafb;
}

/* Sort indicator */
th.sorted-asc::after {
  content: " ↑";
}

th.sorted-desc::after {
  content: " ↓";
}

/* Loading spinner */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-live {
  background-color: #dcfce7;
  color: #166534;
}

.status-mock {
  background-color: #fef3c7;
  color: #92400e;
}

.status-offline {
  background-color: #fee2e2;
  color: #991b1b;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Responsive table */
@media (max-width: 768px) {
  .overflow-x-auto {
    -webkit-overflow-scrolling: touch;
  }

  table {
    font-size: 0.875rem;
  }

  th,
  td {
    padding: 0.5rem 0.75rem;
  }
}

/* Focus states */
input:focus,
select:focus,
textarea:focus {
  outline: none;
}

/* Button transitions */
button {
  transition: all 0.15s ease-in-out;
}

/* Card hover effect */
.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* Relevance input */
.relevance-input {
  background: transparent;
}

.relevance-input::-webkit-inner-spin-button,
.relevance-input::-webkit-outer-spin-button {
  opacity: 0;
}

.relevance-input:hover::-webkit-inner-spin-button,
.relevance-input:hover::-webkit-outer-spin-button,
.relevance-input:focus::-webkit-inner-spin-button,
.relevance-input:focus::-webkit-outer-spin-button {
  opacity: 1;
}

/* Negative edit input */
.negative-edit {
  background: transparent;
}

.negative-edit:hover,
.negative-edit:focus {
  background: white;
}

/* Modal backdrop */
#negative-modal {
  backdrop-filter: blur(2px);
}

/* Sparkline container */
.sparkline {
  display: inline-block;
  height: 20px;
  vertical-align: middle;
}

.sparkline-bar {
  display: inline-block;
  width: 4px;
  margin-right: 1px;
  background-color: #3b82f6;
  border-radius: 1px;
  vertical-align: bottom;
}

/* Expandable row */
.expandable-row {
  cursor: pointer;
}

.expanded-content {
  background-color: #f9fafb;
}

/* Monthly volume table */
.monthly-table {
  font-size: 0.75rem;
}

.monthly-table td {
  padding: 0.25rem 0.5rem;
  text-align: center;
}

/* Category input */
.category-input {
  background: transparent;
}

.category-input:hover,
.category-input:focus {
  background: white;
}

/* Project cards */
.project-card {
  transition: all 0.2s ease-in-out;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* Pivot table */
.pivot-row-total {
  font-weight: 600;
  background-color: #f9fafb;
}
