/* Reset and Base Styles */
.wp-roadmap-kanban * {
  box-sizing: border-box;
}

.wp-roadmap-kanban {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #f8fafc;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.kanban-container {
  max-width: 100%;
  margin: 0 auto;
}

/* Header Styles */
.kanban-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.header-content {
  flex: 1;
}

.kanban-main-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.kanban-main-description {
  font-size: 1.1rem;
  margin: 0;
  opacity: 0.9;
  font-weight: 300;
}

.header-actions {
  flex-shrink: 0;
}

.btn-feature-request {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.btn-feature-request:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  color: white;
  text-decoration: none;
}

/* Kanban Board Styles - Horizontal Scroll */
.kanban-board {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 20px;
  scroll-behavior: smooth;
}

.kanban-board::-webkit-scrollbar {
  height: 8px;
}

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

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

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

.kanban-column {
  flex: 0 0 320px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  height: fit-content;
}

.kanban-column-header {
  padding: 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.column-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.item-count {
  background: #e2e8f0;
  color: #64748b;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.kanban-column-content {
  padding: 20px;
  min-height: 200px;
}

/* Card Styles */
.kanban-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.kanban-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.kanban-card:last-child {
  margin-bottom: 0;
}

.card-content {
  margin-bottom: 12px;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: #1e293b;
  line-height: 1.4;
}

.card-description {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* Card Footer */
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.card-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.8rem;
  color: #64748b;
}

.card-date,
.card-views {
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-date .dashicons,
.card-views .dashicons {
  font-size: 14px;
  width: 14px;
  height: 14px;
}

/* Vote Button Styles */
.card-vote {
  flex-shrink: 0;
}

.vote-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 60px;
  justify-content: center;
}

/* Vote Button States */
.vote-btn.not-voted {
  background: #ef4444;
  color: white;
}

.vote-btn.not-voted:hover:not(:disabled) {
  background: #dc2626;
  transform: translateY(-1px);
}

.vote-btn.voted {
  background: #22c55e;
  color: white;
}

.vote-btn.voted:hover:not(:disabled) {
  background: #16a34a;
  transform: translateY(-1px);
}

.vote-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.vote-btn .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.vote-count {
  font-weight: 700;
}

/* Status Color Variations */
.kanban-column:nth-child(1) .item-count {
  background: #6f42c1;
  color: white;
}

.kanban-column:nth-child(2) .item-count {
  background: #28a745;
  color: white;
}

.kanban-column:nth-child(3) .item-count {
  background: #007bff;
  color: white;
}

.kanban-column:nth-child(4) .item-count {
  background: #28a745;
  color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
  .wp-roadmap-kanban {
    padding: 15px;
    margin: 15px 0;
  }

  .kanban-header {
    padding: 20px;
    flex-direction: column;
    text-align: center;
  }

  .kanban-main-title {
    font-size: 2rem;
  }

  .kanban-column {
    flex: 0 0 280px;
  }

  .kanban-column-content {
    padding: 15px;
  }

  .card-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .card-meta {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .kanban-column {
    flex: 0 0 260px;
  }

  .kanban-main-title {
    font-size: 1.8rem;
  }

  .btn-feature-request {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}

/* Loading States */
.vote-btn.loading {
  position: relative;
  color: transparent;
}

.vote-btn.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Legacy Widget Styles (for compatibility) */
.button-box {
  display: inline-block;
  padding: 8px 12px;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.button-box.btn-active {
  background: #007cba;
  color: white;
  border-color: #005a87;
}

.wp-roadmap-loadmore {
  display: none;
}

.view-more {
  color: #007cba;
  cursor: pointer;
  text-decoration: underline;
}

.view-more:hover {
  color: #005a87;
}

/* Tab Styles (for compatibility) */
.tabcontent {
  display: none;
  padding: 20px;
  border-top: none;
}

.tabcontent.active {
  display: block;
}

.tablinks {
  background-color: #f1f1f1;
  color: black;
  float: left;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 14px 16px;
  transition: 0.3s;
}

.tablinks:hover {
  background-color: #ddd;
}

.tablinks.active {
  background-color: #ccc;
}

/* Accessibility */
.vote-btn:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.kanban-card:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .wp-roadmap-kanban {
    box-shadow: none;
    background: white;
  }

  .kanban-header {
    background: #f8fafc !important;
    color: black !important;
  }

  .vote-btn {
    border: 1px solid #ccc !important;
    background: white !important;
    color: black !important;
  }
}
