/* ══════════════════════════════════════════════════════
   Kanban Board — Content Plan Management
   kanban.css
══════════════════════════════════════════════════════ */

/* ── Wrapper scroll horizontal ── */
#cal-kanban-view {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  padding-bottom: 16px;
  position: relative;  /* untuk sticky hint */
}

/* ── Board container ── */
.kanban-board {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: max-content;
  padding: 4px 2px 8px;
  cursor: grab;
}

.kanban-board:active {
  cursor: grabbing;
}

/* ── Kolom status ── */
.kanban-col {
  width: 240px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 14px;
  background: #f1f5f9;
  overflow: hidden;
}

/* Header kolom */
.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 8px;
  background: #f1f5f9;
  position: sticky;
  top: 0;
  z-index: 2;
}

.kanban-col-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  color: #374151;
}

.kanban-col-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.kanban-col-count {
  font-size: 11px;
  font-weight: 700;
  background: #e2e8f0;
  color: #64748b;
  padding: 1px 7px;
  border-radius: 99px;
  min-width: 22px;
  text-align: center;
}

/* Drop zone dalam kolom */
.kanban-drop-zone {
  min-height: 80px;
  max-height: 690px;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background .15s ease;
}

.kanban-drop-zone::-webkit-scrollbar {
  width: 4px;
}
.kanban-drop-zone::-webkit-scrollbar-track {
  background: transparent;
}
.kanban-drop-zone::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.kanban-drop-zone::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.kanban-drop-zone.drag-over {
  background: rgba(16,185,129,.08);
  border-radius: 10px;
  outline: 2px dashed #10b981;
  outline-offset: -2px;
}

/* ── Kartu konten ── */
.kanban-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 10px 11px;
  box-shadow: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  transition: box-shadow .15s ease, transform .15s ease, opacity .15s ease;
  border: 1.5px solid transparent;
  position: relative;
}

.kanban-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,.1);
  border-color: #e2e8f0;
  transform: translateY(-1px);
}

.kanban-card:active {
  cursor: grabbing;
}

.kanban-card.dragging {
  opacity: .45;
  transform: scale(.97);
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}

.kanban-card.drag-preview {
  opacity: 1 !important;
  transform: rotate(2deg) scale(1.03) !important;
  box-shadow: 0 12px 32px rgba(0,0,0,.22) !important;
  pointer-events: none;
}

/* ── Isi kartu ── */
.kanban-card-title {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kanban-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 7px;
}

.kanban-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
  line-height: 1.3;
}

.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.kanban-card-date {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 500;
}

.kanban-card-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity .15s ease;
}

.kanban-card:hover .kanban-card-actions {
  opacity: 1;
}

.kanban-card-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: background .12s ease, color .12s ease;
}

.kanban-card-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.kanban-card-btn.danger:hover {
  background: #fee2e2;
  color: #ef4444;
}

/* ── Placeholder kartu saat drag ── */
.kanban-placeholder {
  height: 72px;
  border-radius: 10px;
  background: rgba(16,185,129,.08);
  border: 2px dashed #10b981;
  flex-shrink: 0;
  pointer-events: none;
}

/* ── Empty state ── */
.kanban-empty {
  text-align: center;
  color: #cbd5e1;
  font-size: 11px;
  padding: 16px 8px;
  font-weight: 500;
}

.kanban-empty i {
  font-size: 20px;
  display: block;
  margin-bottom: 4px;
}

/* ── Pilar badge ── */
.kanban-pilar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

/* ── Scrollbar tipis untuk board ── */
#cal-kanban-view::-webkit-scrollbar {
  height: 5px;
}
#cal-kanban-view::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 99px;
}

/* ── Ctrl+scroll hint overlay ── */
.kanban-scroll-hint {
  position: sticky;
  left: 50%;
  transform: translateX(-50%);
  bottom: 12px;
  width: max-content;
  max-width: 90vw;
  background: rgba(30,41,59,.82);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 99px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease;
  z-index: 10;
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
}

.kanban-scroll-hint kbd {
  background: rgba(255,255,255,.2);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 11px;
  font-family: monospace;
  margin: 0 2px;
}

.kanban-scroll-hint-visible {
  opacity: 1 !important;
}

/* ── Mobile: kolom lebih sempit ── */
@media (max-width: 767px) {
  .kanban-col {
    width: 200px;
  }

  .kanban-board {
    gap: 8px;
  }

  .kanban-card {
    padding: 8px 9px;
  }

  .kanban-card-actions {
    opacity: 1; /* selalu tampil di mobile */
  }
}
